PSCrestron

Syntax

Close-CrestronPersistentPort -Device <String> -Hostname <String[]> -LANPort 
<Int32[]> -CSPort <Int32[]> [-Protocol <String>] [-Secure] [-Username 
<Object>] [-Password <Object>] [-Port <Int32>] [<CommonParameters>]


Close-CrestronPersistentPort -DeviceMap <PSObject> [-Secure] [-Username 
<Object>] [-Password <Object>] [-Port <Int32>] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device Specifies the IP address or hostname of the LAN facing device. true false
-DeviceMap Specifies a custom object that contains the information required to update devices on both the LAN side and control subnet side of a 3Series controller. true true (ByValue)
-Hostname IPAddress Specifies the IP address or hostname of the control subnet facing device. true true (ByValue)
-LANPort Specifies the LAN side port number to close. An array of ports may be specified. true false
-CSPort Specifies the control subnet port to close. An array of ports may be specified. true false
-Protocol Specifies the protcol to use when opening the port. May be TCP, UDP, or BOTH but defaults to TCP. false false TCP
-Secure If specified a secure connection will be used on the LAN facing device. false false False
-Username The username to use for a secure connection. false false
-Password The password to use for a secure connection. false false
-Port An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. false false 0

Examples

EXAMPLE 1
Close-CrestronPersistentPort -Device 'CP3N-BLDG1' -Hostname 'TSW-750-ROOM1' -LANPort 11234 -CSPort 22 -Protocol TCP

Top of page

Close-CrestronSession Aliases

  • ccs

Syntax

Close-CrestronSession [-Handle] <Guid> [<CommonParameters>]


Close-CrestronSession [-Session] <Object> [<CommonParameters>]


Close-CrestronSession [-All] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Handle Guid Specifies the handle to the previously opened session. true true (ByValue, ByPropertyName)
-Session true false
-All Switch parameter to close all sessions. false false False

Examples

EXAMPLE 1
Close-CrestronSession -Handle $Handle
EXAMPLE 2
Close-CrestronSession -All

Top of page

Syntax

Close-CrestronSubnetPort [-Device] <String> [[-Hostname] <String[]>] [-Secure] 
[[-Username] <Object>] [[-Password] <Object>] [[-Port] <Int32>] 
[<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device Specifies the IP address or hostname of the LAN facing device. true false
-Hostname Specifies the hostname of the control subnet facing device. Note that only a hostname may be specified, IP addresses are not allowed. false true (ByValue)
-Secure If specified a secure connection will be used on the LAN facing device. false false False
-Username The username to use for a secure connection. false false
-Password The password to use for a secure connection. false false
-Port An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. false false 0

Examples

EXAMPLE 1
Close-CrestronSubnetPorts 'PRO3-MyUnit'

Top of page

Close-ToolboxSession Aliases

  • cts

Syntax

Close-ToolboxSession [-Handle] <Guid> [<CommonParameters>]


Close-ToolboxSession [-All] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Handle Guid, TBSession Specifies the handle to the previously opened device. true true (ByValue, ByPropertyName)
-All Switch parameter to close all sessions. false false False

Examples

EXAMPLE 1
Close-ToolboxSession -Handle $Handle
EXAMPLE 2
Close-ToolboxSession -All

Top of page

Close-USBSession Aliases

  • cus

Syntax

Close-USBSession [<CommonParameters>]

Examples

EXAMPLE 1
Close-USBSession

Top of page

Syntax

ConvertFrom-Regex [-InputString] <String> [-Pattern] <String> 
[<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-InputString Specifies the input string to operate on. true false
-Pattern Specifies the regular expression pattern to use to find the matches. The pattern must contain named groups which are used as the property names for the returned collection. true false

Examples

EXAMPLE 1
\w+)\s*(?<Slot>\d+)\s*(?<Version>[\d\.]+)"
$s = "CP3N 12 1.02.003`r`nMC3 4 1.01.123" RegexTo-Object -InputString $s -Pattern $p Running this example will produce the following custom object: Device Slot Version ------ ---- ------- CP3N 12 1.02.003 MC3 4 1.01.123

Top of page

Syntax

Convert-SerialToTsid [-Serial] <String> [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Serial Specifies the Serial obtained from the version response of the device. true false

Examples

EXAMPLE 1
Convert-SerialToTSID -Serial 'L117773239'

Top of page

Syntax

Convert-TsidToSerial [-TSID] <String> [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-TSID Specifies the TSID obtained from the version response of the device. Input the value as eight hex characters without the prefix of '0x'. true false

Examples

EXAMPLE 1
Convert-TsidToSerial -TSID '00BA6971'

Top of page

Syntax

Get-AutoDiscovery [[-Retries] <Int32>] [[-EndPoint] <String>] [-ShowProgress] 
[-SendOnly] [-VariableBroadcast] [[-Pattern] <String>] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Retries Specifies the number of broadcast attempts. The range is 3 to 10 and the default is 6. false false 6
-EndPoint Specifies a directed endpoint. Defaults to a broadcast over the entire network. false false
-ShowProgress An optional switch to display a progress indicator. false false False
-SendOnly Sends the broadcast but does not receive the responses. Usually used for debugging. false false False
-VariableBroadcast variable block size for broadcast false false False
-Pattern Filters the results using the specified regex pattern. false false .*

Examples

EXAMPLE 1
Get-AutoDiscovery -ShowProgress
EXAMPLE 2
Get-AutoDiscovery -Pattern '^(cp3n|dm)'

Top of page

Syntax

Get-CresnetInfo [-Device] <String> [-Secure] [[-Username] <Object>] 
[[-Password] <Object>] [[-Port] <Int32>] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device Specifies the IP address or hostname of the control system. true false
-Secure If specified then the SSH protocol is used. false false False
-Username The username to use for a secure connection. false false
-Password The password to use for a secure connection. false false
-Port An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. false false 0

Examples

EXAMPLE 1
Get-CresnetInfo -Device 'CP3N-Floor1'

Top of page

Syntax

Get-CrestronPersistentPort [-Device] <String> [-All] [-Secure] [[-Username] 
<Object>] [[-Password] <Object>] [[-Port] <Int32>] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device Specifies the IP address or hostname of the LAN facing device. true false
-All An optional swtich that will return all open ports including those opened by the operating system. false false False
-Secure If specified a secure connection will be used on the LAN facing device. false false False
-Username The username to use for a secure connection. false false
-Password The password to use for a secure connection. false false
-Port An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. false false 0

Examples

EXAMPLE 1
Get-CrestronPersistentPort -Device 'CP3N-BLDG1'

Top of page

Syntax

Get-CrestronProgramState [-Device] <String> [-Secure] [-Username <Object>] 
[-Password <Object>] [-Port <Int32>] [<CommonParameters>]


Get-CrestronProgramState [-DeviceMap] <PSObject> [-Secure] [-Username 
<Object>] [-Password <Object>] [-Port <Int32>] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device Specifies a collection of device IP address or hostname. true false
-DeviceMap Specifies a mapping object used for devices on the control subnet. true false
-Secure If specified then the SSH protocol is used. false false False
-Username The username to use for a secure connection. false false
-Password The password to use for a secure connection. false false
-Port An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. false false 0

Examples

EXAMPLE 1
Get-CrestronProgramState -Device 'CP3-MyUnit'

Top of page

Syntax

Get-CrestronSession [[-Device] <String>] [[-Port] <Int32>] [<CommonParameters>]


Get-CrestronSession [[-Handle] <Guid>] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device Specifies the hostname or IP of the device from which to get the info. false true (ByValue)
-Port Specifies the port number of the device. false false 0
-Handle Specifies the handle to the previously open session. false true (ByPropertyName)

Examples

EXAMPLE 1
Get-CrestronSession
This example will return all opened sessions.
EXAMPLE 2
Get-CrestronSession -Device 'CP3-MyUnit' -Port 41795
This example will return only the session opened to the specified device on the specified port.
EXAMPLE 3
Get-CrestronSession -Device 'CP3-MyUnit'
This example will return all open session to the specified device, regardless of port number.
EXAMPLE 4
$session = Open-CrestronSession 'CP3-MyUnit'
$session | Get-CrestronSession This example pipes a previously opened session handle to the cmdlet.

Top of page

Syntax

Get-FTPDirectory [-Device] <String> [[-RemoteDirectory] <String>] 
[-LocalDirectory] <String> [[-Include] <String>] [[-Exclude] <String>] 
[-CreateLocalDirectory] [-Recurse] [-Secure] [[-Username] <Object>] 
[[-Password] <Object>] [[-Port] <Int32>] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device Specifies the IP address or hostname of the device. true false
-RemoteDirectory Specifies the remote folder to copy from. Defaults to the root. false false
-LocalDirectory Specifies the local folder to copy to. true false
-Include Specifies a regular expressions for files which if matched are copied. Defaults to copy all files. false false .*
-Exclude Specifies a regular expressions for files which if matched are not copied. Defaults to copy all files. false false \0
-CreateLocalDirectory If specified and the local directory does not exist, the local directory will be created. false false False
-Recurse If specified subdirectories will also be copied. false false False
-Secure If specified then the SFTP protocol will be used. Defaults to FTP. false false False
-Username The username to use for a secure connection. false false
-Password The password to use for a secure connection. false false
-Port An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. false false 0

Examples

EXAMPLE 1
Get-FTPDirectory -Device 'CP3-MyUnit' -RemoteDirectory 'Program01' -LocalDirectory 'C:\copy'

Top of page

Get-FTPDirectoryList Aliases

  • Get-DirectoryList

Syntax

Get-FTPDirectoryList [-Device] <String> [[-RemoteDirectory] <String>] [-Full] 
[-Secure] [[-Username] <Object>] [[-Password] <Object>] [[-Port] <Int32>] 
[<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device Specifies the IP address or hostname of the device. true false
-RemoteDirectory Directory, Path Specifies the remote folder from which to get the list. Defaults to the root. false false
-Full Details If specified file details will be returned false false False
-Secure If specified then the SFTP protocol will be used. Defaults to FTP. false false False
-Username The username to use for a secure connection. false false
-Password The password to use for a secure connection. false false
-Port An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. false false 0

Examples

EXAMPLE 1
Get-FTPDirectoryList -Device 'CP3-MyUnit' -RemoteDirectory 'Program01'

Top of page

Get-FTPFile Aliases

  • Receive-FTPFile

Syntax

Get-FTPFile [-Device] <String> [-RemoteFile] <String> [-LocalPath] <String> 
[-Secure] [[-Username] <Object>] [[-Password] <Object>] [[-Port] <Int32>] 
[<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device Specifies the IP address or hostname of the device. true false
-RemoteFile Specifies the full path to the remote source file. true false
-LocalPath Specifies the path to the local destination file. If a path is specified then the local filename will be the same as the remote file. If a full path and filename are specified then the file will be renamed. true false
-Secure If specified then the SFTP protocol will be used. Defaults to FTP. false false False
-Username The username to use for a secure connection. false false
-Password The password to use for a secure connection. false false
-Port An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. false false 0

Examples

EXAMPLE 1
Get-FTPFile -Device 'CP3-MyUnit' -RemoteFile '\firmware\anyfile.txt' -LocalPath 'C:\Info' -Secure
This example uses the remote filename as the destination filename, essentially a copy.
EXAMPLE 2
Get-FTPFile -Device 'CP3-MyUnit' -RemoteFile '\firmware\old.txt' -LocalPath 'C:\Info\new.txt' -Secure
This example uses the specified destination filename, essentially a copy and rename.

Top of page

Syntax

Get-IPTable [-Device] <String> [-Secure] [[-Username] <Object>] [[-Password] 
<Object>] [[-Port] <Int32>] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device true false
-Secure false false False
-Username false false
-Password false false
-Port false false 0

Examples

EXAMPLE 1
Get-IPTable -Device 'PRO3-BLDG1' -Secure

Top of page

Syntax

Get-NicAdapter [<CommonParameters>]

Examples

EXAMPLE 1
Get-NicAdapter

Top of page

Get-ToolboxAttribute Aliases

  • gta

Syntax

Get-ToolboxAttribute [-TBSession] <Guid> [-Object] <String> 
[<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-TBSession Specifies the Toolbox session GUID obtained from the Open-ToolboxSession cmdlet. true false
-Object Specifies the base object to use to get the attributes. true false

Examples

EXAMPLE 1
Get-ToolboxObject MyTBSession "Loopback"

Top of page

Syntax

Get-ToolboxAutoDiscovery [-Device] <String> [[-Protocol] <String>] 
[[-QueryPeriod] <Int32>] [[-QueryCount] <Int32>] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device Specifies the IP address or hostname of the device to use. true false
-Protocol Specifies whether to use TCP, SSH, or AUTO. Defaults to TCP. AUTO is only available with Toolbox version 2.41.xxx or higher. false false TCP
-QueryPeriod Specifies the period in milliseconds between queries. Defaults to 1000 milliseconds. false false 1000
-QueryCount Specifies the number of queries. Defaults to 5. false false 5

Examples

EXAMPLE 1
Run-ToolboxAutoDiscovery 'mc3-myunit'
EXAMPLE 2
Run-ToolboxAutoDiscovery 'mc3-myunit' 'ssh' 800 4

Top of page

Get-ToolboxObject Aliases

  • gto

Syntax

Get-ToolboxObject [-TBSession] <Guid> [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-TBSession Specifies the Toolbox session GUID obtained from the Open-ToolboxSession cmdlet. true false

Examples

EXAMPLE 1
Get-ToolboxObject MyTBSession

Top of page

Syntax

Get-ToolboxSession [-TBAddress] <String> [<CommonParameters>]


Get-ToolboxSession [-Handle] <Guid> [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-TBAddress the computer hostname or ip address true true (ByValue)
-Handle Guid, TBSession Specifies the handle to the previously open session. true true (ByPropertyName)

Examples

EXAMPLE 1
Get-ToolboxSession $mysession

Top of page

Get-ToolboxValue Aliases

  • gtv

Syntax

Get-ToolboxValue [-TBSession] <Guid> [-Object] <String> [-Attribute] <String> 
[<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-TBSession Specifies the Toolbox session GUID obtained from the Open-ToolboxSession cmdlet. true false
-Object Specifies the base object to use. true false
-Attribute Specifies the attribute from which to get the value. true false

Examples

EXAMPLE 1
Get-ToolboxObject MyTBSession "Source" "Vertical Resolution"

Top of page

Syntax

Get-UserAccess [[-Port] <Int32>] [[-Username] <String>] [[-Password] <String>] 
[-Secure] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Port Specifies the port to use. In secure mode the user can change both the CTP and SFTP ports using the SSHPort console command. In non-secure mode the user can only modify the CTP port, while the FTP port remains at 21. false false 0
-Username Specifies the username to use otherwise the default is selected depending on the security mode. false false
-Password Specifies the password to use otherwise the default is selected depending on the security mode. false false
-Secure If specified then SSH will be used. false false False

Examples

EXAMPLE 1
Get-UserAccess -Secure

Top of page

Syntax

Get-VersionInfo [-Device] <String[]> [-Secure] [-Username <String>] [-Password 
<String>] [-Port <Int32>] [-ThrottleLimit <Int32>] [-ShowProgress] 
[<CommonParameters>]


Get-VersionInfo [-DeviceMap] <PSObject[]> [-Secure] [-Username <String>] 
[-Password <String>] [-Port <Int32>] [-ThrottleLimit <Int32>] [-ShowProgress] 
[<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device Specifies the IP address or hostname of the device or devices. A list of devices can be input from the pipeline. true true (ByValue)
-DeviceMap Specifies a map of devices on the control subnet of the processor. The map can be created using the New-CrestronSubnetMap cmdlet. true true (ByValue)
-Secure If specified then the SSH protocol is used. false false False
-Username The username to use for a secure connection. false false
-Password The password to use for a secure connection. false false
-Port An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. false false 0
-ThrottleLimit Specifies the number of parallel updates to run simultaneously. Valid values are 1 to 100
Defaults to 20.
false false 20
-ShowProgress An optional switch to display a progress indicator. false false False

Examples

EXAMPLE 1
Get-VersionInfo -Device 'CP3N-BLDG1'
This example will get the version info from the specified device.
EXAMPLE 2
$MyDeviceList | Get-VersionInfo -Secure -Username 'admin' -Password 'Pa$$w0rd'
This example pipes in an array of devices and returns an object collection of version information. All the devices require the same username and password.
EXAMPLE 3
Read-AutoDiscovery 'CP3N-BLDG1' |
Where-Object Interface -eq CS | Where-Object Hostname -Match 'TSW' | Select-Object -ExpandProperty Hostname | %{New-CrestronSubnetMap -Device 'CP3N-BLDG1' -Hostname $_} | Get-VersionInfo Close-CrestronSubnetPort 'CP3N-BLDG1' This example creates a port map to all the TSW panels on the control subnet of the CP3N and pipes that to the cmdlet to get the version information. Note that the ports must be closed when they are no longer required.

Top of page

Syntax

Import-Excel [-Workbook] <String> [[-Worksheet] <String>] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Workbook Specifies the full path to the workbook to import. If the worksheet is not specified then the cmdlet returns a list of worksheets. true false
-Worksheet Specifies the name of the worksheet to import. The cmdlet returns a custom object where the properties are the column names and the rows as an array of values. false false

Examples

EXAMPLE 1
Import-Excel -Workbook 'Devices.xlxs'
This example will return a list of the worksheets in the workbook.
EXAMPLE 2
Import-Excel -Workbook 'Devices.xlxs' -Worksheet 'Bldg1'
This example returns the data found in the specified worksheet as a custom object using the column names as properties.

Top of page

Invoke-CrestronCommand Aliases

  • icc

Syntax

Invoke-CrestronCommand [-Device] <String> [[-Command] <String[]>] [[-Timeout] 
<Int32>] [[-Prompt] <String>] [[-Encoding] <String>] [-NoBufferFlush] 
[-Secure] [[-Username] <Object>] [[-Password] <Object>] [[-Port] <Int32>] 
[<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device Specifies the IP address or hostname of the device. true false
-Command Specifies the command or commands to send to the device. An array of commands may be passed via the pipeline. Defaults to VER which all devices support. false true (ByValue) VER
-Timeout Specifies the timeout in seconds to wait for a response. The default is 5 seconds. false false 5
-Prompt Specifies the prompt to wait for in the response. This may be a character or a string but must be entered using a regular expression. Defaults to the right angle bracket '>'. false false >
-Encoding An optional parameter that defines the encoding method to use on the socket
The parameter is a string and defaults to 'UTF-8'. To specify Western European use 'ISO-8859-1'. A list of endcodings can be obtained from the following link: https://msdn.microsoft.com/en-us/library/system.text.encoding.getencodings(v =vs.110).aspx
false false UTF-8
-NoBufferFlush An optional switch which bypasses flushing the input buffer of extraneous data on opening a socket and also bypasses sending the ECHO OFF command. false false False
-Secure Use SSH to connect to the device. Defaults to off. If specified then the device must support SSH. If a username and password are not specified, then default credentials are used. false false False
-Username The username to use for a secure connection. false false
-Password The password to use for a secure connection. false false
-Port Specifies the port of the device. Defaults to the predefined CTP port for the protocol selected. false false 0

Examples

EXAMPLE 1
Invoke-CrestronCommand 'CP3-MyUnit' 'VER -ALL' 30
This example send the command with a timeout of 30 seconds.
EXAMPLE 2
$r = 'VER','INFO','IPCONFIG' | Invoke-CrestronCommand 'CP3-MyUnit'
This example send and array of commands via the pipeline. In this case an array of three responses is returned in the same order as the commands.

Top of page

Invoke-CrestronSession Aliases

  • ics

Syntax

Invoke-CrestronSession [-Handle] <Guid> [[-Command] <String[]>] [[-Prompt] 
<String>] [[-Timeout] <Int32>] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Handle Guid Specifies the handle to the previously opened session. true false
-Command Specifies the command or commands to send to the device. An array of commands may be passed via the pipeline. Defaults to VER which all devices support. false true (ByValue) VER
-Prompt Specifies the prompt to wait for in the response. This may be a character or a string but must be entered using a regular expression. Defaults to the right angle bracket '>'. false false >
-Timeout Specifies the timeout in seconds to wait for a response. The default is 5 seconds. false false 5

Examples

EXAMPLE 1
$session = Open-CrestronSession 'CP3-MyUnit'
Invoke-CrestronSession $session 'VER -V'
EXAMPLE 2
$session = Open-CrestronSession 'CP3-MyUnit'
Invoke-CrestronSession $session 'VER -V' -Prompt '\?'

Top of page

Syntax

Invoke-RunspaceJob [-InputObject] <PSObject[]> [-ScriptBlock] <ScriptBlock> 
[[-ThrottleLimit] <Int32>] [[-Timeout] <Int32>] [[-SharedVariables] 
<String[]>] [[-ShowProgress]] [[-Functions] <String[]>] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-InputObject Specifies the input objects. Invoke-RunspaceJob runs the script block or operation statement on each input object. Enter a variable that contains the objects, or type a command or expression that gets the objects. true true (ByValue)
-ScriptBlock Specifies the operation that is performed on each input object. Enter a script block that describes the operation. true false
-ThrottleLimit Specifies the maximum number of concurrent runspaces that can be run by this command. If you omit this parameter, the default value 32 is used. false false 32
-Timeout Determines the maximum wait time for each background runspace job, in minutes. The timing starts when scriptblock execution begins. false false 0
-SharedVariables Specifies the host variables by their names, that will be avaliable in background runspaces. If a variable is Synchronized like [HashTable]::Synchronized(@{}) all changes will be synchronized between all runspaces. false false
-ShowProgress Shows progress bar. false false False
-Functions Specifies the functions that are to be passed to the runspaces. false false

Examples

EXAMPLE 1
'comp1', 'comp2', 'comp3' | Invoke-RunspaceJob {Start-LongScript -Identity $_}
Description ----------- Run instance of Start-LongScript for every object in array.
EXAMPLE 2
'comp1', 'comp2', 'comp3' | Invoke-RunspaceJob {Start-LongScript -Identity $_} -ThrottleLimit 50 -Timeout 2
Description ----------- Run instance of Start-LongScript for every object in array, with maximum 50 concurent thread and timeout 2 min for each scriptblock.
EXAMPLE 3
Invoke-RunspaceJob {Start-LongScript -Identity $_ -Credential $Cred} -SharedVariables Cred -ShowProgress -InputObject ('comp1', 'comp2', 'comp3')
Description ----------- Run instance of Start-LongScript for every object in array. Share host variable $Cred with all runspace instances and show progress bar.

Top of page

Invoke-ToolboxCommand Aliases

  • itc

Syntax

Invoke-ToolboxCommand [-Handle] <Guid> [-Command] <String> [[-Timeout] 
<Int32>] [[-Prompt] <String>] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Handle Guid, TBSession true false
-Command Specifies the console command to send. Defaults to 'VER' which all devices support. true false VER
-Timeout Specifies an optional timeout in seconds. Defaults to 30 seconds. false false 30
-Prompt Specifies the prompt to wait for in the response. This may be a character or a string but must be entered using a regular expression. Defaults to the right angle bracket '>'. false false >

Examples

EXAMPLE 1
Invoke-ToolboxCommand -TBSession $s -Command 'IPCONFIG'

Top of page

Invoke-ToolboxSession Aliases

  • Invoke-ToolboxAbility
  • ita
  • its

Syntax

Invoke-ToolboxSession [-Handle] <Guid> [[-TBAbility] <String>] 
[[-ArgumentList] <Object[]>] [[-Timeout] <Double>] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Handle Guid, TBSession Specifies the handle to the previously open session. true true (ByValue, ByPropertyName)
-TBAbility Specifies the command to send. Defaults to ProductRefreshInfo which all devices support. false false ProductRefreshInfo
-ArgumentList Specifies an optional list of arguments to use with the command. Booleans, integers, and strings are allowed and, if necessary converted to the format required by Toolbox. false false
-Timeout Specifies an optional timeout in seconds. Defaults to 30 seconds. false false 30

Examples

EXAMPLE 1
Invoke-ToolboxSession -Handle $s -TBAbility 'FileSysDirList'
EXAMPLE 2
Invoke-ToolboxSession -Handle $s -TBAbility 'SysClockSetTimeDate 10,11,12,2,28,2016'
EXAMPLE 3
Invoke-ToolboxSession -Handle $s -TBAbility 'SysClockSetTimeDate' -ArgumentList 10,11,12,2,28,2016

Top of page

Invoke-USBSession Aliases

  • ius

Syntax

Invoke-USBSession [[-Command] <String>] [[-Prompt] <String>] 
[<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Command Specifies the command to send to the device. false false
-Prompt Specifies the prompt to wait for in the response. This may be a character or a string but must be entered using a regular expression. Defaults to the right angle bracket '>'. false false >

Examples

EXAMPLE 1
Invoke-USBSession "VER -V"

Top of page

Syntax

New-CrestronSubnetMap [-Device] <String> [-Hostname] <String[]> 
[-OpenSecurePorts] [-Secure] [[-Username] <Object>] [[-Password] <Object>] 
[[-Port] <Int32>] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device Specifies the IP address or hostname of the LAN facing device. true false
-Hostname Specifies the hostname of the control subnet facing device. Note that only a hostname may be specified, IP addresses are not allowed. true true (ByValue)
-OpenSecurePorts An optional switch to open secure ports to the control subnet device. Defaults to opening non-secure ports. false false False
-Secure If specified a secure connection will be used on the LAN facing device. false false False
-Username The username to use for a secure connection. false false
-Password The password to use for a secure connection. false false
-Port An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. false false 0

Examples

EXAMPLE 1
New-CrestronSubnetPorts 'PRO3-MyUnit' 'TSW-552-MyPanel' -OpenSecurePorts

Top of page

Syntax

Open-CrestronPersistentPort [-Device] <String> [-Hostname] <String[]> 
[-LANPort] <Int32[]> [-CSPort] <Int32[]> [[-Protocol] <String>] [-Secure] 
[[-Username] <Object>] [[-Password] <Object>] [[-Port] <Int32>] 
[<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device Specifies the IP address or hostname of the LAN facing device. true false
-Hostname IPAddress Specifies the IP address or hostname of the control subnet facing device. true true (ByValue)
-LANPort Specifies the LAN side port number to close. An array of ports may be specified. true false
-CSPort Specifies the control subnet port to close. An array of ports may be specified. true false
-Protocol Specifies the protcol to use when opening the port. May be TCP, UDP, or BOTH but defaults to TCP. false false TCP
-Secure If specified a secure connection will be used on the LAN facing device. false false False
-Username The username to use for a secure connection. false false
-Password The password to use for a secure connection. false false
-Port An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. false false 0

Examples

EXAMPLE 1
Open-CrestronPersistentPort -Device 'CP3N-BLDG1' -Hostname 'TSW-750-ROOM1' -LANPort 11234 -CSPort 22 -Protocol TCP

Top of page

Open-CrestronSession Aliases

  • ocs

Syntax

Open-CrestronSession [-Device] <String> [-Secure] [[-Username] <Object>] 
[[-Password] <Object>] [[-Port] <Int32>] [-NoBufferFlush] [[-Encoding] 
<String>] [-ForceNewSession] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device Specifies the IP address or hostname of the device. true true (ByValue)
-Secure Use SSH to connect to the device. Defaults to off. If specified then the device must support SSH. If a username and password are not specified, then default credentials are used. false false False
-Username The username to use for a secure connection. false false
-Password The password to use for a secure connection. false false
-Port Specifies the port of the device. Defaults to the predefined CTP port for the protocol selected. false false 0
-NoBufferFlush An optional switch which bypasses flushing the input buffer of extraneous data on opening a socket and also bypasses sending the ECHO OFF command. false false False
-Encoding An optional parameter that defines the encoding method to use on the socket
The parameter is a string and defaults to 'UTF-8'. To specify Western European use 'ISO-8859-1'. A list of endcodings can be obtained from the following link: https://msdn.microsoft.com/en-us/library/system.text.encoding.getencodings(v =vs.110).aspx
false false UTF-8
-ForceNewSession An optional switch that forces a new session to be opened. The default is to reuse the current session if the address and port are the same. false false False

Examples

EXAMPLE 1
Open-CrestronSession -Device 'CP3-MyUnit'
This example uses a standard TCP connection.
EXAMPLE 2
Open-CrestronSession -Device 'CP3-MyUnit' -Secure -Username 'myuser' -Password 'mypass'
This example uses an SSH connection.

Top of page

Syntax

Open-CrestronSubnetPort [-Device] <String> [-Hostname] <String[]> [-CSPort] 
<Int32[]> [[-Protocol] <String>] [-Secure] [[-Username] <Object>] [[-Password] 
<Object>] [[-Port] <Int32>] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device Specifies the IP address or hostname of the device. true false
-Hostname Specifies the hostname of the control subnet facing device. Note that only a hostname may be specified, IP addresses are not allowed. Also an array of hostnames may be specified and input via the pipeline. true true (ByValue)
-CSPort Specifies the port number to open on the control subnet. An array of ports may be specified. true false
-Protocol Specifies the protcol to use when opening the port. May be TCP or UDP but defaults to TCP. false false TCP
-Secure If specified a secure connection will be used on the LAN facing device. false false False
-Username The username to use for a secure connection. false false
-Password The password to use for a secure connection. false false
-Port An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. false false 0

Examples

EXAMPLE 1
Open-CrestronSubnetPort -Device 'CP3N-MyUnit' -Hostname 'TSW-1052-MyUnit' -CSPort 23,80,443 -Secure -Username 'admin' -Password 'Pa$$w0rd'

Top of page

Open-ToolboxSession Aliases

  • ots

Syntax

Open-ToolboxSession [[-TBAddress] <String>] [[-ConsoleLog] <String>] [-Secure] 
[-Username <Object>] [-Password <Object>] [-Port <Int32>] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-TBAddress Specifies the Toolbox address of the device. The string must be a valid Toolbox address containing either usb, ctp, tcp, or ssh. See the examples for further info. false true (ByValue) usb
-ConsoleLog An optional parameter that specifies the filename used to save a running console log of all transactions during a session including a date/time stamp. Note that the file is created if it does not exist or appended to if it does. false false
-Secure If specified then the SFTP protocol will be used. Defaults to FTP. false false False
-Username The username to use for a secure connection. false false
-Password The password to use for a secure connection. false false
-Port Specifies the port of the device. Defaults to the predefined CTP port for the protocol selected. false false 0

Examples

EXAMPLE 1
Open-ToolboxSession -TBAddress 'ctp CP3-MyUnit'
EXAMPLE 2
Open-ToolboxSession -TBAddress 'ssh CP3-MyUnit' -ConsoleLog 'C:\Logs\MyLog.txt'

Top of page

Open-USBSession Aliases

  • ous

Syntax

Open-USBSession [<CommonParameters>]

Examples

EXAMPLE 1
Open-USBSession

Top of page

Syntax

Read-AutoDiscovery [-Device] <String> [-QueryPeriod <Int32>] [-QueryCount 
<Int32>] [-Secure] [-Username <Object>] [-Password <Object>] [-Port <Int32>] 
[<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device Specifies the Crestron device to use. true true (ByValue)
-QueryPeriod Specifies the period in milliseconds between queries. Defaults to 1000 milliseconds. false false 1000
-QueryCount Specifies the number of queries. Defaults to 5. false false 5
-Secure If specified then the SSH protocol is used. false false False
-Username The username to use for a secure connection. false false
-Password The password to use for a secure connection. false false
-Port An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. false false 0

Examples

EXAMPLE 1
Read-Discovery 'MC3-MyUnit'
EXAMPLE 2
'MC3-MyUnit','CP3N-MyUnit' | Read-Discovery

Top of page

Syntax

Remove-FTPDirectory [-Device] <String> [-RemoteDirectory] <String> 
[-ContentsOnly] [-Secure] [[-Username] <Object>] [[-Password] <Object>] 
[[-Port] <Int32>] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device Specifies the IP address or hostname of the device. true false
-RemoteDirectory Specifies the full path of the folder to be deleted. true false
-ContentsOnly If specified only the contents of the folder including all files and subfolders will be deleted leaving the specified folder empty. false false False
-Secure If specified then the SFTP protocol will be used. Defaults to FTP. false false False
-Username The username to use for a secure connection. false false
-Password The password to use for a secure connection. false false
-Port An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. false false 0

Examples

EXAMPLE 1
Remove-FTPDirectory -Device 'CP3-Bldg1' -RemoteDirectory '/firmware/mylogs'

Top of page

Syntax

Remove-FTPFile [-Device] <String> [-RemoteFile] <String> [-Secure] 
[[-Username] <Object>] [[-Password] <Object>] [[-Port] <Int32>] 
[<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device Specifies the IP address or hostname of the device. true false
-RemoteFile Specifies the full path and filename of the file to be deleted. true false
-Secure If specified then the SFTP protocol will be used. Defaults to FTP. false false False
-Username The username to use for a secure connection. false false
-Password The password to use for a secure connection. false false
-Port An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. false false 0

Examples

EXAMPLE 1
Remove-FTPFile -Device 'CP3-MyUnit' -RemoteFile 'Program01/file.txt'

Top of page

Reset-CrestronDevice Aliases

  • Reboot-CrestronDevice

Syntax

Reset-CrestronDevice [-Device] <String> [[-Timeout] <Int32>] [[-OfflineDelay] 
<Int32>] [-WaitOnly] [-NoWait] [[-Username] <Object>] [[-Password] <Object>] 
[-Secure] [[-Port] <Int32>] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device Specifies the IP address or hostname of the device. true true (ByValue)
-Timeout Specifies the timeout in seconds. Defaults to 600 seconds. false false 600
-OfflineDelay Specifies the time to wait for the device to go offline after the reboot is issued. Some devices take time to prepare for a reboot before going offline. Defaults to 180 seconds. false false 180
-WaitOnly Skip the reboot, and simply wait for the device to recover. false false False
-NoWait Reboot the device and return immediately. false false False
-Username The username to use for a secure connection. false false
-Password The password to use for a secure connection. false false
-Secure Use SSH to connect to the device. Defaults to off. If specified then the device must support SSH. If a username and password are not specified, then default credentials are used. false false False
-Port Specifies the port of the device. Defaults to the predefined CTP port for the protocol selected. false false 0

Examples

EXAMPLE 1
Reboot-CrestronDevice -Device 'CP3-MyUnit'

Top of page

Syntax

Send-CrestronFirmware [-Device] <String> [-LocalFile] <String> [-ImageUpdate] 
[[-Timeout] <Int32>] [-Secure] [[-Username] <Object>] [[-Password] <Object>] 
[[-Port] <Int32>] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device Specifies the IP address or hostname of the device. true false
-LocalFile Specifies the full path and filename of the source file which may be on the local PC or a network drive. true false
-ImageUpdate An optional switch that sends the IMGUPD command after the firmware is uploaded. false false False
-Timeout Specifies the timeout in seconds and is only applicable when invoking the ImageUpdate option. Defaults to 900 seconds, i.e. 15 minutes. false false 900
-Secure If specified then the SFTP protocol will be used. Defaults to FTP. false false False
-Username The username to use for a secure connection. false false
-Password The password to use for a secure connection. false false
-Port An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. false false 0

Examples

EXAMPLE 1
Send-CrestronFirmware -Device 'CP3-MyUnit' -LocalFile 'C:\cp3firmware.cos' -Secure
This example simply sends the file to the firmware folder on the device.
EXAMPLE 2
Send-CrestronFirmware -Device 'CP3-MyUnit' -LocalFile 'C:\cp3firmware.cos' -ImageUpdate -Secure
This example sends the file and forces an upgrade.

Top of page

Syntax

Send-CrestronProgram [-Device] <String[]> [-LocalFile] <String> 
[[-ProgramSlot] <Int32>] [-DoNotStart] [-DoNotUpdateIPTable] [-SendSIGFile] 
[-ExternalMemory] [-Timeout <Int32>] [-Secure] [-Username <Object>] [-Password 
<Object>] [-Port <Int32>] [-ThrottleLimit <Int32>] [-ShowProgress] 
[<CommonParameters>]


Send-CrestronProgram [-DeviceMap] <PSObject> [-LocalFile] <String> 
[[-ProgramSlot] <Int32>] [-DoNotStart] [-DoNotUpdateIPTable] [-SendSIGFile] 
[-ExternalMemory] [-Timeout <Int32>] [-Secure] [-Username <Object>] [-Password 
<Object>] [-Port <Int32>] [-ThrottleLimit <Int32>] [-ShowProgress] 
[<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device Specifies a collection of device IP addresses or hostnames. true false
-DeviceMap Specifies a mapping object used for devices on the control subnet. true false
-LocalFile Specifies the full path and filename of the source file on the local PC. true false
-ProgramSlot Specifies the slot in which to load the program. Defaults to slot 1. false false 1
-DoNotStart If specified the program will be loaded but not started. Defaults to start the program. false false False
-DoNotUpdateIPTable If specified the IP table will not be updated. Defaults to updating the IP table. false false False
-SendSIGFile If specified the SIG file will be sent to the device. Defaults to not sending the SIG file. false false False
-ExternalMemory CompactFlash If specified the program will load to external memory. Defaults to the internal flash. false false False
-Timeout Specifies the timeout in seconds to wait for the program to fully start. Defaults to 60 seconds. false false 60
-Secure If specified then the SSH protocol is used. false false False
-Username The username to use for a secure connection. false false
-Password The password to use for a secure connection. false false
-Port An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. false false 0
-ThrottleLimit Specifies the number of parallel updates to run simultaneously. Defaults to 20. false false 20
-ShowProgress An optional switch to display a progress indicator. false false False

Examples

EXAMPLE 1
Send-CrestronProgram -Device 'CP3-MyUnit' -LocalFile 'c:\test.lpz' -ProgramSlot 4 -Secure

Top of page

Syntax

Send-CrestronProgramHelper [-Device] <String> [-LocalFile] <String> 
[[-ProgramSlot] <Int32>] [-DoNotStart] [-DoNotUpdateIPTable] [-SendSIGFile] 
[-ExternalMemory] [-Timeout <Int32>] [-Secure] [-Username <Object>] [-Password 
<Object>] [-Port <Int32>] [<CommonParameters>]


Send-CrestronProgramHelper [-DeviceMap] <PSObject> [-LocalFile] <String> 
[[-ProgramSlot] <Int32>] [-DoNotStart] [-DoNotUpdateIPTable] [-SendSIGFile] 
[-ExternalMemory] [-Timeout <Int32>] [-Secure] [-Username <Object>] [-Password 
<Object>] [-Port <Int32>] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device true false
-DeviceMap true false
-LocalFile true false
-ProgramSlot false false 1
-DoNotStart false false False
-DoNotUpdateIPTable false false False
-SendSIGFile false false False
-ExternalMemory CompactFlash false false False
-Timeout false false 60
-Secure false false False
-Username false false
-Password false false
-Port false false 0

Syntax

Send-CrestronProject [-Device] <String[]> [-LocalFile] <String> [-Secure] 
[-Username <Object>] [-Password <Object>] [-Port <Int32>] [-ThrottleLimit 
<Int32>] [-ShowProgress] [<CommonParameters>]


Send-CrestronProject [-DeviceMap] <PSObject> [-LocalFile] <String> [-Secure] 
[-Username <Object>] [-Password <Object>] [-Port <Int32>] [-ThrottleLimit 
<Int32>] [-ShowProgress] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device Specifies a collection of device IP addresses or hostnames. true false
-DeviceMap Specifies a mapping object used for devices on the control subnet. true false
-LocalFile Specifies the full path and filename of the source file on the local PC. true false
-Secure If specified then the SSH protocol is used. false false False
-Username The username to use for a secure connection. false false
-Password The password to use for a secure connection. false false
-Port An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. false false 0
-ThrottleLimit Specifies the number of parallel updates to run simultaneously. Defaults to 20. false false 20
-ShowProgress An optional switch to display a progress indicator. false false False

Examples

EXAMPLE 1
Send-CrestronProject -Device 'CP3-MyUnit' -LocalFile 'c:\test.vtz'

Top of page

Syntax

Send-CrestronProjectHelper [-Device] <String> [-LocalFile] <String> [-Secure] 
[-Username <Object>] [-Password <Object>] [-Port <Int32>] [<CommonParameters>]


Send-CrestronProjectHelper [-DeviceMap] <PSObject> [-LocalFile] <String> 
[-Secure] [-Username <Object>] [-Password <Object>] [-Port <Int32>] 
[<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device true false
-DeviceMap true false
-LocalFile true false
-Secure false false False
-Username false false
-Password false false
-Port false false 0

Syntax

Send-FTPFile [-Device] <String> [-LocalFile] <String> [-RemoteFile] <String> 
[-Secure] [[-Username] <Object>] [[-Password] <Object>] [[-Port] <Int32>] 
[<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device Server Specifies the IP address or hostname of the device. true false
-LocalFile Specifies the full path to the source local file. true false
-RemoteFile Specifies the full path to the destination remote file. true false
-Secure If specified then the SFTP protocol will be used. Defaults to FTP. false false False
-Username The username to use for a secure connection. false false
-Password The password to use for a secure connection. false false
-Port An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. false false 0

Examples

EXAMPLE 1
Send-FTPFile -Device 'CP3-MyUnit' -LocalFile 'C:\Info\myfile.txt' -RemoteFile '\firmware\anyfile.txt'
This example uses FTP to send a file to the device.
EXAMPLE 2
Send-FTPFile -Device 'CP3-MyUnit' -LocalFile 'C:\Info\myfile.txt' -RemoteFile '\firmware\anyfile.txt' -Secure
This example uses SSH to send a file to the device using the default username and password.
EXAMPLE 3
Send-FTPFile 'CP3-MyUnit' 'C:\Info\myfile.txt' '\firmware\anyfile.txt' -Secure -Username 'myuser' -Passowrd 'mypass'
This example uses SSH to send a file to a device that is in authentication mode and therefore requires the sames username and password as the SSL connection.

Top of page

Syntax

Set-CrestronProgramState [-Device] <String> [[-ProgramSlot] <Int32[]>] 
[[-Stop]] [[-Restart]] [[-Register]] [[-Unregister]] [[-Remove]] [-Secure] 
[-Username <Object>] [-Password <Object>] [-Port <Int32>] [<CommonParameters>]


Set-CrestronProgramState [-DeviceMap] <PSObject> [-ProgramMap] <PSObject> 
[[-Stop]] [[-Restart]] [[-Register]] [[-Unregister]] [[-Remove]] [-Secure] 
[-Username <Object>] [-Password <Object>] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device Specifies the device IP address or hostname. true false
-ProgramSlot Specifies the program slot or and array of slots. false false 1
-DeviceMap Specifies a mapping object used for devices on the control subnet. true false
-ProgramMap true false
-Stop A switch parameter used to stop the specified program. false false False
-Restart A switch parameter used to restart the specified program. false false False
-Register A switch parameter used to register the specified program. false false False
-Unregister A switch parameter used to unregister the specified program. false false False
-Remove Delete A switch parameter used to remove the specified program from the control system. Delete is an alias for this parameter. false false False
-Secure If specified then the SSH protocol is used. false false False
-Username The username to use for a secure connection. false false
-Password The password to use for a secure connection. false false
-Port An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. false false 0

Examples

EXAMPLE 1
Set-CrestronProgramState -Device 'CP3-MyUnit' -Stop -Unregister

Top of page

Set-ToolboxValue Aliases

  • stv

Syntax

Set-ToolboxValue [-TBSession] <Guid> [-Object] <String> [-Attribute] <String> 
[-Value] <Object> [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-TBSession Specifies the Toolbox session GUID obtained from the Open-ToolboxSession cmdlet. true false
-Object Specifies the base object to use. true false
-Attribute Specifies the attribute from which to get the value. true false
-Value Specifies the value to set the attribute. The value may be a string, integer, decimal, or boolean. Boolean is represented by the Powershell types $true and $false. true false

Examples

EXAMPLE 1
Set-ToolboxObject MyTBSession "Source" "Free Run Index" 32

Top of page

Test-CrestronPort Aliases

  • tcp
  • Test-Port
  • Test-TCPPort

Syntax

Test-CrestronPort [-Device] <String> [-Port] <Int32[]> [-ShowProgress] 
[-Quiet] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device Specifies the IP address or hostname of the device. true false
-Port Specifies the port number to use. A list of ports can be input from the pipeline. true true (ByValue)
-ShowProgress An optional switch that enables the progress indicator. Defaults to not showing progress. false false False
-Quiet An optional switch that returns a boolean of true if all the tested ports are open or false otherwise. false false False

Examples

EXAMPLE 1
Test-CrestronPort -Device 'CP3N-MyUnit' -Port 21,23,41795

Top of page

Syntax

Test-FileAccess [-Path] <String> [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Path Specifies the full path to the file to test for access. true false

Examples

EXAMPLE 1
Test-FileAccess -Path 'C:\Devices.xlxs'

Top of page

Syntax

Test-FTPPath [-Device] <String> [-RemotePath] <String> [-Secure] [[-Username] 
<Object>] [[-Password] <Object>] [[-Port] <Int32>] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device Specifies the IP address or hostname of the device. true false
-RemotePath Specifies the remote path to check. true false
-Secure If specified then the SFTP protocol will be used. Defaults to FTP. false false False
-Username The username to use for a secure connection. false false
-Password The password to use for a secure connection. false false
-Port An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. false false 0

Examples

EXAMPLE 1
Test-FTPPath -Device 'CP3-MyUnit' -RemotePath 'Program01'

Top of page

Test-USBSession Aliases

  • tus

Syntax

Test-USBSession [<CommonParameters>]

Examples

EXAMPLE 1
Test-USBSession

Top of page

Syntax

Update-PUF [-Device] <String[]> [-Path] <String> [[-Secure]] [[-Username] 
<String>] [[-Password] <String>] [[-Port] <Int32>] [[-ForceOS]] [[-ForceAll]] 
[[-Timeout] <Int32>] [[-OfflineDelay] <Int32>] [[-ThrottleLimit] <Int32>] 
[[-NoWait]] [[-ShowProgress]] [<CommonParameters>]


Update-PUF [-DeviceMap] <PSObject[]> [-Path] <String> [[-Secure]] [[-Username] 
<String>] [[-Password] <String>] [[-Port] <Int32>] [[-ForceOS]] [[-ForceAll]] 
[[-Timeout] <Int32>] [[-OfflineDelay] <Int32>] [[-ThrottleLimit] <Int32>] 
[[-NoWait]] [[-ShowProgress]] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
-Device Specifies the device or devices by hostname or IP address that are to be updated. true true (ByValue)
-DeviceMap Specifies a custom object that contains the information required to update devices on both the LAN side and control subnet side of a 3Series controller. true true (ByValue)
-Path Specifies the path to the PUF file or files. May also indicate the specific PUF to use in which case all the devices in the list should support this PUF. true false
-Secure If specified the PUF will be sent using the SFTP protocol rather than FTP. false false False
-Username The username to use for a secure connection. false false
-Password The password to use for a secure connection. false false
-Port If specified this port will be used to communicate with the device. Defaults to the standard port for the protocol based on the setting of the secure parameter. false false 0
-ForceOS A switch that forces the OS to update even if it is not required. false false False
-ForceAll A switch that forces all components to be updated even if they are not required. false false False
-Timeout An optional parameter to specify the timeout within the range of 60 to 3600 seconds
Defaults to 1200 seconds or 20 minutes.
false false 1200
-OfflineDelay An optional parameter to specify the delay before starting to check if the device has gone offline. Some devices require time to extract and move files before the actual upgrade begins. The allowed range of 60 to 1800 seconds and the defaults is set to 60 seconds. false false 60
-ThrottleLimit Specifies the number of parallel updates to run simultaneously. Defaults to 8. false false 5
-NoWait An optional switch to bypass the wait for the device to recover from the PUF command. In this case the returned object should be ignored since it will indicate the update failed. false false False
-ShowProgress An optional switch to display a progress indicator. false false False

Examples

EXAMPLE 1
Updating a single device.
Update-PUF "CP3-MyUnit" "C:\Windows\Temp\PUF"
EXAMPLE 2
Updating a single device from a specific PUF
Update-PUF "CP3-MyUnit" "C:\Windows\Temp\PUF\test.puf"
EXAMPLE 3
Updating a list of devices.
Update-PUF "CP3-MyUnit","MC3-MyUnit","172.30.123.123" "C:\Windows\Temp\PUF"
EXAMPLE 4
Updating a list of devices defined in a text file, one line per device using SFTP.
Update-PUF (Get-Content "C:\MyList.txt") "C:\Windows\Temp\PUF" -Secure
EXAMPLE 5
Displaying the results in a grid view.
Update-PUF (Get-Content "C:\MyList.txt") "C:\Windows\Temp\PUF" | Out-GridView

Top of page