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.

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.


Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Error: 0x80073701 when trying to add Print Services Role in Windows 2012 Standard

Disconnecting from a Windows Server 2012 R2 file sharing session on a Windows 7,8,10 machine

Event ID 64,77,1008 Certificates Events Windows Server 2008, 2008R2