ServerManager 2012 customization

Hello,

Since Windows Server 2012, we got a totally new Server Manager, I think you noticed that.
But do you know it’s customizable ?

Indeed, you can manage several servers from one ServerManager console, you just need to add them with the “Manage / Add Servers” button.
When you add a server, it populates and XML file :

"$env:APPDATA\Microsoft\Windows\ServerManagerServerList.xml"

Also, the “Tool” menu actually display the content of a directory :

"$env:PROGRAMDATA\Microsoft\Windows\Start Menu\Programs\Administrative Tools"

Now, let’s play with it :
Create a PowerShell script with this :

[xml]$xml = (Get-Content "$env:APPDATA\Microsoft\Windows\ServerManagerServerList.xml")
$xml.ServerList.ServerInfo.Name | % {
Get-WmiObject -Class Win32_OperatingSystem -ComputerName $_
} | Select-Object -Property CSName,Caption,Version,@{Label="RAM";Expression={$_.TotalVisibleMemorySize/1MB -as [int]}},OSArchitecture,@{Label="LastBootUpTime";Expression={[System.Management.ManagementDateTimeConverter]::ToDateTime($_.LastBootUpTime)}} | Out-GridView -Title "System Info" -Wait

Save it in “C:PowerShellSystemInfo.ps1”, now, create a shortcut in the “Tool” folder with that target :

%windir%\system32\WindowsPowerShell\v1.0\powershell.exe -WindowStyle Hidden "C:\PowerShell\SystemInfo.ps1"

Finally, click again on the “Tool” menu, you’ll see :

ServerManager-SysteInfo

Click on “SystemInfo” to lunch our script :

ServerManager-SysteInfo-OGV

Pretty nice, no ?

Leave a Reply