Executing Powershell Script Through SCCM

Steps:-
Created a PowerShell script just to create a folder with machine date.(Steps shown in below mentioned screenshots).
1. created a .cmd file and wrote the PowerShell script in the .cmd file so that the script can directly be executed in the command prompt.
2. Created a package containing the .cmd file and in the program part of the package gave the file name just to execute the file directly in the command prompt.
3. Deployed a new machine through SCCM added the package in the Task Sequence.
4. OS was deployed and the PowerShell script was executed.






No comments:

Post a Comment