Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

need some help from powershell newbie

$
0
0

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


Viewing all articles
Browse latest Browse all 6937

Trending Articles