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.
this happening because of double hop issues.
http://blogs.msdn.com/b/clustering/archive/2009/06/25/9803001.aspx?redirected=true
http://tfl09.blogspot.com/2013/02/powershell-remoting-double-hop-problem.html
don't retire technet! - (don't give yet - 12,830+ strong , growing)
Windows Server > Windows PowerShell
Comments
Post a Comment