brittonv
asked on
Powershell server health script with winrm
I am looking for a script that I can run from a central server where I can create a report on server health on a list of servers.
The output of the script some thing pretty for managment and an spreadsheet of results for me.
I have WinRM configured, if it matters...
Things I am looking for
Verify a service is installed an running
check that the local Administrator account was renamed
Verify MTU Settings
The way I envision it is a bunch of functions, in a loop from get-content script.
Is this even possible?
The output of the script some thing pretty for managment and an spreadsheet of results for me.
I have WinRM configured, if it matters...
Things I am looking for
Verify a service is installed an running
check that the local Administrator account was renamed
Verify MTU Settings
The way I envision it is a bunch of functions, in a loop from get-content script.
Is this even possible?
If you tell us what you mean with such sloppy expressions like "verify MTU settings", we might be able to supply a precise solution. Else the above, when removing the first $computer from line 5, should give you an idea.
Oh, haven't noticed it...
I think the author would like to get the MTU size. PoSh doesn't display it for me either on my Win7 or Win2008 R2. Strange.
I think the author would like to get the MTU size. PoSh doesn't display it for me either on my Win7 or Win2008 R2. Strange.
ASKER
Thank you, yes, I am trying to get the MTU Settting on a 2008R2 Server.
I can't find a way and the above script doesn't seem to give the requested information.
Additionally the Adminsitrator name portion was taking forever, apparently hanging. Turns out it just needed a little Tweaking and now it runs in seconds:
$c = Get-WmiObject Win32_UserAccount -ComputerName $computer -Filter "domain='$computer'" | Where-Object {$_.SID -like 'S-1-5-21-*-500'} | Format-Table -HideTableHeaders Name, SID
I can't find a way and the above script doesn't seem to give the requested information.
Additionally the Adminsitrator name portion was taking forever, apparently hanging. Turns out it just needed a little Tweaking and now it runs in seconds:
$c = Get-WmiObject Win32_UserAccount -ComputerName $computer -Filter "domain='$computer'" | Where-Object {$_.SID -like 'S-1-5-21-*-500'} | Format-Table -HideTableHeaders Name, SID
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, it appears that 2k8 uses some kind of dynamic MTU thing now...
Thansk for the help!
Thansk for the help!
Open in new window
I have some problems with hash arrays and such so someone else would have to clean this mess ;)