quarta-feira, 20 de fevereiro de 2019

How to use Powershell script inside SCCM program.

Just use this syntax:

powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -WindowStyle Hidden -File \\local\folder1\folder2\folder3\scripts\Start-PowershellScript.ps1

First create a program with program wizard without this ugly command line, just select script name normally. After the program has been created, in properties panel put the command line.


Nenhum comentário:

Postar um comentário

Decorator Powershell Design Patterns

 Powershell Design Patterns Decorator ```powershell # Classe base 'Beverage' class Beverage {     [string]$description = "Unkno...