Run cmd from a remote desktop


i trying execute  a cmd on 20 servers passing kozos argument. works fine locally remotely fails

the code using :-

$servers = "localhost", "kozos"  foreach ($server in $servers)  {      invoke-command -computername $server -scriptblock {       cd "\\kozos\scriptdb\cmdscripts"      & ./settings.cmd kozos     }  }    

though ps remoting enabled, invoke command fails.



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

2008 Windows Deployment Server Properties Error

Can no longer user MS Update - Files required to use Microsoft Update are no longer registered

How do a find data in one file, search for it in another file and if not found, write a custom message to another file