Skip to main content

Run SCCM Command

Executes a SCCM command in PowerShell on a remote machine using the WinRM protocol.

Basic Parameters

ParameterDescription
Site CodeThe Configuration Manager site code.
CommandThe command to run.

Advanced Parameters

ParameterDescription
HostWhich host to connect to if one is not specified in the connection.
Can be an IP or a fully qualified domain name.

When using an HTTPS endpoint (encrypted communications),
make sure to use the specified format: https://<your-ip-or-domain>:<port-number>/wsman .
For example: https://windows-host:5986/wsman .

If the provided connection has a host specified, using this parameter results in a error.
Configuration Manager Module PathThe path to the Configuration Manager module.

By default, the module is at the following path:
C:\Program Files (x86)\Microsoft Endpoint Manager\AdminConsole\bin\ConfigurationManager.psd1.

Required in versions lower than 2111.
For more information, view the Microsoft Documentation.