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

Windows 2016 RDS event 1306 Connection Broker Client failed to redirect the user... Error: NULL

Como saber quien entro a mi PC por la Red