PowerShell Question
hello,
i need write script in powershell needs go out list of servers , run read chkdsk on remote servers. far managed create txt file list of servers , can have script see content of txt file nothing more. confused on how make script see list , go out , start chkdsk.
thank help.
i need write script in powershell needs go out list of servers , run read chkdsk on remote servers. far managed create txt file list of servers , can have script see content of txt file nothing more. confused on how make script see list , go out , start chkdsk.
thank help.
check out:
http://www.windowsnetworking.com/articles_tutorials/how-windows-server-2008-winrm-winrs.html
i'd suggest use winrs run remote commands.
like:
ps>get-content servers.txt|foreach{winrs -r:"http://$_" chkdsk}
i've not tried it, , can't right though, might give starting point.
http://www.windowsnetworking.com/articles_tutorials/how-windows-server-2008-winrm-winrs.html
i'd suggest use winrs run remote commands.
like:
ps>get-content servers.txt|foreach{winrs -r:"http://$_" chkdsk}
i've not tried it, , can't right though, might give starting point.
Windows Server > Windows PowerShell
Comments
Post a Comment