---
sourceDocument: Brazil IT Operations Management
sourceDocumentLink: https://www.servicenow.com/docs/r/it-operations-management

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil IT Operations Management

ft:clusterId :

    - itom

bundleId :

    - itom

workflow :

    - Technology


---

# PowerShell probe

# PowerShell probe {#ariaid-title1}

Release version: Brazil  
Updated September 10, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of PowerShell probe

The PowerShell probe in ServiceNow allows execution of PowerShell V2 scripts on the MID Server host.
It functions as a Probe type using the PowerShell ECC queue topic.
This enables customers to run custom scripts remotely via the MID Server, facilitating automation and data collection tasks within their environment.
Show full answer Show less  

## Key Features

* **Script Execution:** PowerShell scripts are specified as probe parameters by filename, enabling flexible script management.
* **Parameter Passing:** The probe supports passing script parameters as environment variables with a specific SNC prefix. Parameters can be passed either encrypted or unencrypted, controlled by distinct parameter prefixes (`powershellparam` for unencrypted and `powershell` for encrypted).
* **Debugging Support:** Options like `debug` and `credentialsdebug` enable detailed logging and credential troubleshooting within the ECC queue for easier diagnosis of issues.
* **Scripting Requirements:** Custom scripts must retrieve parameters via environment variables rather than command-line arguments, especially for non-Boolean parameters. This requires adapting the script's parameter declarations to use environment variable lookups with the SNC prefix.

## Practical Application for ServiceNow Customers

ServiceNow customers can create custom PowerShell probes by specifying their scripts and parameters according to required naming conventions. This enables running tailored scripts on MID Servers to collect data, perform automated tasks, or integrate with Windows environments securely.

Understanding the distinction between encrypted and unencrypted parameter prefixes is critical to avoid script execution errors. Additionally, leveraging debug modes helps troubleshoot script and credential issues effectively.

By following the scripting guidelines and parameter conventions, customers can extend ServiceNow's discovery and automation capabilities using PowerShell scripts executed remotely on MID Servers.  
The PowerShell Probe executes PowerShell V2 scripts on the MID Server host.
PowerShell scripts are defined as probe parameters with the filename as the parameter name.
It is available as a Probe probe type by specifying PowerShell as the probe's ECC queue
topic.

## PowerShell probe parameters {#c_PowershellProbe__section_alf_pdg_dcb}

{#c_PowershellProbe__table_thk_ngg_dcb__entry__2}

| Parameter name | Description |
|-|-|
| source | \[Required\] The initial host to connect to. Default: None |
| \<script name\>.ps1 | \[Required\] The filename of the PowerShell script to run. Replace \<script name\> with a valid filename prefix. Default: None |
| powershell_command_parameter_passing | Specifies whether to pass script parameters on the command line. Regardless of this parameter's value, ServiceNow makes all script parameters on the command line automatically available to PowerShell scripts as environment variables. Default: false |
| powershell_param_\<script parameter name\> | Passes additional parameters to the PowerShell script to be executed. Each parameter will appear to the script as an environment variable in the format $env:SNC_\<script parameter name\>. Parameters with this prefix are not considered encrypted and are passed through to the script untouched. Make sure you select the appropriate parameter between powershell_param_\<script parameter name\> and powershell_\<script parameter name\>. Using the wrong prefix results in errors in the PowerShell execution, which is passed back to the instance in the ECC queue input. Default: None |
| powershell_\<script parameter name\> | Passes additional parameters to the PowerShell script to be executed. Each parameter will appear to the script as an environment variable in the format $env:SNC_\<script parameter name\>. The MID Server assumes that any parameter with this prefix is encrypted and attempts to decrypt it. Make sure you select the appropriate parameter between powershell_param_\<script parameter name\> and powershell_\<script parameter name\>. Using the wrong prefix results in errors in the PowerShell execution, which is passed back to the instance in the ECC queue input Default: None |
| debug | Enables debug log output during the probe. Default: false |
| credentials_debug | Displays a \<credentials_debug\> section in the ECC queue, which can help you troubleshoot credentials. If you set this property to true, credential troubleshooting information is output to the ECC queue, even if the credentials succeed. Default: false |
[ ]

{#c_PowershellProbe__table_thk_ngg_dcb}

## Scripting requirements {#c_PowershellProbe__section_ayh_mfg_dcb}

Any custom PowerShell scripts must use environment variables to pass any non-Boolean
command line parameter. Replace non-Boolean parameters in the Param()
portion of the script with script variables of the same name. Define the script variable as
part of the environment with an SNC_ prefix. So a string parameter such as this:  

    Param([string]$paramName)

Becomes a script variable such as the following:  

    if(test-path env:\SNC_paramName) {
        $paramName = $env:SNC_paramName
    }

For example, this parameter definition from the PSScript.ps1 script contains several string
parameters that need to be redefined as script variables:  

    Param([string]$computer, [string]$script, [string]$user, [string]$password, [boolean]$useCred, [boolean]$isDiscovery, [boolean]$debug)

Defining the non-Boolean parameters as script variables would result in this type of
script:  

    Param([boolean]$useCred, [boolean]$isDiscovery, [boolean]$debug)
     
    # Copy the environment variables to the params
    if(test-path env:\SNC_computer) {
      $computer=$env:SNC_computer
    }
     
    if(test-path env:\SNC_script) {
      $script=$env:SNC_script
    }
     
    if(test-path env:\SNC_user) {
      $user=$env:SNC_user
      $password=$env:SNC_password
    }

* **[Create a custom PowerShell probe](https://www.servicenow.com/docs/WQCDw~X1wC140DfjvgrHVQ)**   
  You can create your own PowerShell probe and configure probe parameters.

