Thank you for your feedback.
Form temporarily unavailable. Please try again or contact to submit your comments.
  • London
  • Kingston
  • Jakarta
  • Istanbul
  • Helsinki
  • Geneva
  • Store

Scripting requirements for PowerShell

Scripting requirements for PowerShell

Your 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:


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) {
if(test-path env:\SNC_script) {
if(test-path env:\SNC_user) {

This site is scheduled for a small content update on Wednesday, December 12th, between the hours of 4:00pm and 8:00pm Pacific Time (Dec 13 00:00 – Dec 13 4:00 UTC). Access to this site may be slightly delayed during that time.