Packages run as the SYSTEM account (i.e. "admin mode") unless otherwise specified.
The Execution Policy can be set in the Client Agent Settings policy or on the command line like "PowerShell.exe -ExecutionPolicy Bypass -File .\MyPowerShellScript.ps1" Without being rude. this forum is great in that it has many very experienced people willing to share their knowledge freely (that's "the community" Rod and others built). However, in every case it is wise to do due diligence and look for solutions already provided before asking people for their time. You will learn much more that way. Let me Bing that for you. https://www.bing.com/search?q=sccm+configmgr+package+powershell+script The 2nd result explains it perfectly: https://www.linkedin.com/pulse/20140529153708-21899939-using-powershell-in-s ccm-packages Chad Simmons | Microsoft System Center Configuration Manager Consultant | linkedin.com/in/chadsimmons From: [email protected] [mailto:[email protected]] On Behalf Of Aday, Karalene B (RCIS) Sent: Thursday, March 3, 2016 3:45 PM To: [email protected] Subject: [mssms] Powershell help This is our first powershell script we are deploying. We use in Task sequence but have never deployed in a package. The script works like intended but it need to run in admin mode. Can some tell me the command I use to do the following: 1. set-executionpolicy bypass 2. Start powershell in admin mode 3. Run script Thank you!!!!
