Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade
Microsoft System Center Configuration Manager (SCCM) is a powerful tool for managing large groups of computers running various operating systems, including Windows. One of the key features of SCCM is the ability to create and manage software deployment programs. In this article, we will explore how to create and manage programs in SCCM using the New-CMProgram
cmdlet in PowerShell.
The New-CMProgram
cmdlet is used to create a new program in SCCM. A program in SCCM is essentially a set of instructions that tell the client machines how to install or execute a specific piece of software. This cmdlet is part of the ConfigurationManager module, which provides a set of cmdlets for managing SCCM.
Before you can use the New-CMProgram
cmdlet, you need to have the following:
First, you need to import the ConfigurationManager module. This module is usually located in the SCCM installation directory. Here is how you can import it:
Import-Module "$($ENV:SMS_ADMIN_UI_PATH)\..\ConfigurationManager.psd1"
Before running any SCCM cmdlets, you need to connect to your SCCM site. Use the Set-Location
cmdlet to connect:
Set-Location -Path "SCCM:"
Now, let's create a new program using the New-CMProgram
cmdlet. Below is an example of how to create a program that installs a simple application:
New-CMProgram -PackageId "XYZ00001" -StandardProgramName "Install Notepad++" -CommandLine "notepadplusplus_installer.exe /S" -ProgramCanRun "OnlyWhenUserIsLoggedOn" -RunMode "RunWithAdministrativeRights" -AllowUserInteraction $true -EstimatedDiskSpaceRequired 50 -EstimatedRunTimeMinutes 5 -MaximumAllowedRunTimeMinutes 10
To verify that the program was created successfully, you can use the Get-CMProgram
cmdlet:
Get-CMProgram -PackageId "XYZ00001"
This cmdlet will display the details of the program you just created.
Using the New-CMProgram
cmdlet in PowerShell, you can easily create and manage programs in SCCM. This allows for automated and efficient software deployment across your managed devices. By understanding the parameters and how to use them, you can tailor the deployment to meet your specific needs.