I am new to poweshell, I have this modified script running file on local PC but cannot use remote call . (Powershell remoting is enabled via GPO )
The script running fine at local host icm -computername PClocal {c:\folder1\test.ps1}
but not working on remote PCs and no error by using the cmdlet below:
icm -computername pc1 -scriptblock {c;\folder1\test.ps1}
__________________________here it is the script_____
$loglocation = "c:\"
# Enable running exe files without a prompt during this script execution
$prog = "setx SEE_MASK_NOZONECHECKS 1 /M"
$arg1 = "SEE_MASK_NOZONECHECKS 1 /M"
# SW installer
start-process -FilePath "c:\folder1\setup\setup.exe" /s
start-process -FilePath "c:\folder1\software9000.exe" -ArgumentList "/qn" -Wait
Start-Process -FilePath "c:\folder\Service.Installer_Win7.msi" -ArgumentList "/qn" -Wait
write-host $file_path