Quantcast
Channel: Configuration Manager 2012 - Application Management forum
Viewing all articles
Browse latest Browse all 4762

Unable to Deploy PS Script through SCCM Commandline

$
0
0

Hi All,

Been racking my brain trying to understand why i  am unable run a PS Script through SCCM as a package.

Trying to Deploy PS ApplDeploy Toolkit to remove Office All 2010 products/install Office 2013.

I have tested the script on a client machine using the command:

psexec -s -i "Powershell.exe" -ExecutionPolicy Bypass -File <location in ccmcache>\Deploy-Application.ps1

The above command works fine and runs the script as planned. (i normally use the '<location in ccmcache>'  as it doesnt support "%~dpo" or ".\".

When running it from the Command in SCCM i use the command:

"Powershell.exe" -ExecutionPolicy Bypass -File .\Deploy-Application.ps1

this fails! the only difference is the location of the PS file (".\")...I have tried without the ".\", also with teh ps1 file in "", and it also fails.

below is a  shot of the error

Any ideas?






Viewing all articles
Browse latest Browse all 4762

Trending Articles