Create SCCM Package for a powershell command

Boopathi S 3,806 Reputation points
2023-07-11T16:25:01.8266667+00:00

Hello,

I need create SCCM package for the below command.

ADD-ADGroupMember -identity "SingaporeDevices" -members $env:computername$

Paste above command in a notepad and save the file as AddComputers.ps1

What is the command should I use to deploy AddComputers.ps1 in Windows 10 computers.

Windows for business Windows Server User experience PowerShell
Microsoft Security Intune Configuration Manager Other
{count} votes

Accepted answer
  1. AllenLiu-MSFT 49,311 Reputation points Microsoft External Staff
    2023-07-12T01:57:53.0433333+00:00

    Hi, @Boopathi S

    Thank you for posting in Microsoft Q&A forum.

    For a “Package” “Program” , just place this into the CMD line.

    "%Windir%\sysnative\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy Bypass -Command .*AddComputers.ps1*

    For your reference:

    https://www.sccmog.com/deploy-powershell-script


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Add comment".

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.