Closes persistent ports on the control subnet.
The Close-CrestronPersistentPort cmdlet closes the persistent ports specified. A number of parameters must be specified since there may be multiple ports open to the same device which may also be using the same or different protocols.
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>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the IP address or hostname of the LAN facing device. | true | false | |||
| 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) | |||
| IPAddress | Specifies the IP address or hostname of the control subnet facing device. | true | true (ByValue) | ||
| Specifies the LAN side port number to close. An array of ports may be specified. | true | false | |||
| Specifies the control subnet port to close. An array of ports may be specified. | true | false | |||
| Specifies the protcol to use when opening the port. May be TCP, UDP, or BOTH but defaults to TCP. | false | false | TCP | ||
| If specified a secure connection will be used on the LAN facing device. | false | false | False | ||
| The username to use for a secure connection. | false | false | |||
| The password to use for a secure connection. | false | false | |||
| An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. | false | false | 0 |
Close-CrestronPersistentPort -Device 'CP3N-BLDG1' -Hostname 'TSW-750-ROOM1' -LANPort 11234 -CSPort 22 -Protocol TCP
Closes a session to a Crestron device.
The Close-CrestronSession closes the TCP connecton to the specified device.
Close-CrestronSession [-Handle] <Guid> [<CommonParameters>] Close-CrestronSession [-Session] <Object> [<CommonParameters>] Close-CrestronSession [-All] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Guid | Specifies the handle to the previously opened session. | true | true (ByValue, ByPropertyName) | ||
| true | false | ||||
| Switch parameter to close all sessions. | false | false | False |
Close-CrestronSession -Handle $HandleEXAMPLE 2
Close-CrestronSession -All
Closes all open ports on the control subnet.
The Close-CrestronSubnetPort cmdlet closes all the open ports found in the user pat list, even ports opened by other cmdlets.
Close-CrestronSubnetPort [-Device] <String> [[-Hostname] <String[]>] [-Secure] [[-Username] <Object>] [[-Password] <Object>] [[-Port] <Int32>] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the IP address or hostname of the LAN facing device. | true | false | |||
| 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) | |||
| If specified a secure connection will be used on the LAN facing device. | false | false | False | ||
| The username to use for a secure connection. | false | false | |||
| The password to use for a secure connection. | false | false | |||
| An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. | false | false | 0 |
Close-CrestronSubnetPorts 'PRO3-MyUnit'
Closes a session to a Crestron device.
The Close-ToolboxSession closes the ComServer connecton to the specified device.
Close-ToolboxSession [-Handle] <Guid> [<CommonParameters>] Close-ToolboxSession [-All] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Guid, TBSession | Specifies the handle to the previously opened device. | true | true (ByValue, ByPropertyName) | ||
| Switch parameter to close all sessions. | false | false | False |
Close-ToolboxSession -Handle $HandleEXAMPLE 2
Close-ToolboxSession -All
Closes a USB connection to the device.
The Close-USBSession cmdlet closes a previously opened USB connection to the Crestron device.
Close-USBSession [<CommonParameters>]
Close-USBSession
Converts a regular expression match collection to an object collection.
The ConvertFrom-Regex cmdlet takes an input string and applies the specified regular expression pattern to generate a match collection. The match collection is then converted to a custom object where the pattern names are the properties and the match values are the value collection.
ConvertFrom-Regex [-InputString] <String> [-Pattern] <String> [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the input string to operate on. | true | false | |||
| 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 |
\w+)\s*(?<Slot>\d+)\s*(?<Version>[\d\.]+)"
Converts a device production serial number to a TSID.
The Convert-SerialToTSID cmdlet converts a production serial number to a TSID.
Convert-SerialToTsid [-Serial] <String> [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the Serial obtained from the version response of the device. | true | false |
Convert-SerialToTSID -Serial 'L117773239'
Converts a device TSID into a production serial number.
The Convert-TsidToSerial cmdlet converts a TSID into a production serial number.
Convert-TsidToSerial [-TSID] <String> [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| 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 |
Convert-TsidToSerial -TSID '00BA6971'
Searches for Crestron devices in the subnet.
The Get-AutoDiscovery cmdlet searches for Crestron devices by sending a broadcast message and accumulating the device responses. The cmdlet will use both the wired and wireless NIC adapters, but responses are limited to the subnets of the adapters.
Get-AutoDiscovery [[-Retries] <Int32>] [[-EndPoint] <String>] [-ShowProgress] [-SendOnly] [-VariableBroadcast] [[-Pattern] <String>] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the number of broadcast attempts. The range is 3 to 10 and the default is 6. | false | false | 6 | ||
| Specifies a directed endpoint. Defaults to a broadcast over the entire network. | false | false | |||
| An optional switch to display a progress indicator. | false | false | False | ||
| Sends the broadcast but does not receive the responses. Usually used for debugging. | false | false | False | ||
| variable block size for broadcast | false | false | False | ||
| Filters the results using the specified regex pattern. | false | false | .* |
Get-AutoDiscovery -ShowProgressEXAMPLE 2
Get-AutoDiscovery -Pattern '^(cp3n|dm)'
Gets the device information of attached Cresnet devices.
The Get-CresnetInfo cmdlet obtains the information of the Cresnet devices attached to the specified control system.
Get-CresnetInfo [-Device] <String> [-Secure] [[-Username] <Object>] [[-Password] <Object>] [[-Port] <Int32>] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the IP address or hostname of the control system. | true | false | |||
| If specified then the SSH protocol is used. | false | false | False | ||
| The username to use for a secure connection. | false | false | |||
| The password to use for a secure connection. | false | false | |||
| An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. | false | false | 0 |
Get-CresnetInfo -Device 'CP3N-Floor1'
Gets the current persistent port mapping on the device.
The Close-CrestronPersistentPort cmdlet gets the current mapping of the LAN ports to the control subnet ports.
Get-CrestronPersistentPort [-Device] <String> [-All] [-Secure] [[-Username] <Object>] [[-Password] <Object>] [[-Port] <Int32>] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the IP address or hostname of the LAN facing device. | true | false | |||
| An optional swtich that will return all open ports including those opened by the operating system. | false | false | False | ||
| If specified a secure connection will be used on the LAN facing device. | false | false | False | ||
| The username to use for a secure connection. | false | false | |||
| The password to use for a secure connection. | false | false | |||
| An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. | false | false | 0 |
Get-CrestronPersistentPort -Device 'CP3N-BLDG1'
Get the state of the currently loaded programs in the device.
The Get-CrestronProgramState cmdlet gets the status of the currently loaded programs in the specified Crestron device. A collection of objects is returned that includes the program name, program slot, and whether it is registered and/or running.
Get-CrestronProgramState [-Device] <String> [-Secure] [-Username <Object>] [-Password <Object>] [-Port <Int32>] [<CommonParameters>] Get-CrestronProgramState [-DeviceMap] <PSObject> [-Secure] [-Username <Object>] [-Password <Object>] [-Port <Int32>] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies a collection of device IP address or hostname. | true | false | |||
| Specifies a mapping object used for devices on the control subnet. | true | false | |||
| If specified then the SSH protocol is used. | false | false | False | ||
| The username to use for a secure connection. | false | false | |||
| The password to use for a secure connection. | false | false | |||
| An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. | false | false | 0 |
Get-CrestronProgramState -Device 'CP3-MyUnit'
Returns open session information.
The Get-CrestronSession returns filtered or unfiltered open session information. The user may specify a previously opened handle or the device IP address or hostname. If a port is specified then only that session is returned else all sessions to that device are returned. If no parameters are specified then all open sessions are returned.
Get-CrestronSession [[-Device] <String>] [[-Port] <Int32>] [<CommonParameters>] Get-CrestronSession [[-Handle] <Guid>] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the hostname or IP of the device from which to get the info. | false | true (ByValue) | |||
| Specifies the port number of the device. | false | false | 0 | ||
| Specifies the handle to the previously open session. | false | true (ByPropertyName) |
Get-CrestronSession
Get-CrestronSession -Device 'CP3-MyUnit' -Port 41795
Get-CrestronSession -Device 'CP3-MyUnit'
$session = Open-CrestronSession 'CP3-MyUnit'
Gets a directory from the device using FTP.
The Get-FTPDirectory cmdlet receives the specified directory from the device
using FTP
If a username and password are provided then the cmdlet used an SSL
connection.
Get-FTPDirectory [-Device] <String> [[-RemoteDirectory] <String>] [-LocalDirectory] <String> [[-Include] <String>] [[-Exclude] <String>] [-CreateLocalDirectory] [-Recurse] [-Secure] [[-Username] <Object>] [[-Password] <Object>] [[-Port] <Int32>] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the IP address or hostname of the device. | true | false | |||
| Specifies the remote folder to copy from. Defaults to the root. | false | false | |||
| Specifies the local folder to copy to. | true | false | |||
| Specifies a regular expressions for files which if matched are copied. Defaults to copy all files. | false | false | .* | ||
| Specifies a regular expressions for files which if matched are not copied. Defaults to copy all files. | false | false | \0 | ||
| If specified and the local directory does not exist, the local directory will be created. | false | false | False | ||
| If specified subdirectories will also be copied. | false | false | False | ||
| If specified then the SFTP protocol will be used. Defaults to FTP. | false | false | False | ||
| The username to use for a secure connection. | false | false | |||
| The password to use for a secure connection. | false | false | |||
| An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. | false | false | 0 |
Get-FTPDirectory -Device 'CP3-MyUnit' -RemoteDirectory 'Program01' -LocalDirectory 'C:\copy'
Gets a directory listing from a Crestron device.
The Get-FTPDirectoryList cmdlet gets a directory list from the specifed device and folder.
Get-FTPDirectoryList [-Device] <String> [[-RemoteDirectory] <String>] [-Full] [-Secure] [[-Username] <Object>] [[-Password] <Object>] [[-Port] <Int32>] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the IP address or hostname of the device. | true | false | |||
| Directory, Path | Specifies the remote folder from which to get the list. Defaults to the root. | false | false | ||
| Details | If specified file details will be returned | false | false | False | |
| If specified then the SFTP protocol will be used. Defaults to FTP. | false | false | False | ||
| The username to use for a secure connection. | false | false | |||
| The password to use for a secure connection. | false | false | |||
| An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. | false | false | 0 |
Get-FTPDirectoryList -Device 'CP3-MyUnit' -RemoteDirectory 'Program01'
Gets a file from the device using FTP.
The Get-FTPFile cmdlet receives the specified file from the device using FTP
If a username and password are provided then the cmdlet used an SSL connection.
Get-FTPFile [-Device] <String> [-RemoteFile] <String> [-LocalPath] <String> [-Secure] [[-Username] <Object>] [[-Password] <Object>] [[-Port] <Int32>] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the IP address or hostname of the device. | true | false | |||
| Specifies the full path to the remote source file. | true | false | |||
| 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 | |||
| If specified then the SFTP protocol will be used. Defaults to FTP. | false | false | False | ||
| The username to use for a secure connection. | false | false | |||
| The password to use for a secure connection. | false | false | |||
| An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. | false | false | 0 |
Get-FTPFile -Device 'CP3-MyUnit' -RemoteFile '\firmware\anyfile.txt' -LocalPath 'C:\Info' -Secure
Get-FTPFile -Device 'CP3-MyUnit' -RemoteFile '\firmware\old.txt' -LocalPath 'C:\Info\new.txt' -Secure
Gets the IPTable response from the specified device.
The Get-IPTable cmdlet gets the IPTable response of a Crestron device and returns a collection of objects.
Get-IPTable [-Device] <String> [-Secure] [[-Username] <Object>] [[-Password] <Object>] [[-Port] <Int32>] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| true | false | ||||
| false | false | False | |||
| false | false | ||||
| false | false | ||||
| false | false | 0 |
Get-IPTable -Device 'PRO3-BLDG1' -Secure
Gets information on the wired NIC adapters installed in the PC or laptop.
The Get-NicAdapter cmdlet attempts to find the wired NIC adapters and return their IPv4 address, mask, and broadcast address.
Get-NicAdapter [<CommonParameters>]
Get-NicAdapter
Gets a list of attributes for the specified object.
The Get-ToolboxAttribute cmdlet gets a list of the attributes support under the specified object. See the Get-ToolboxObject help for more information.
Get-ToolboxAttribute [-TBSession] <Guid> [-Object] <String> [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the Toolbox session GUID obtained from the Open-ToolboxSession cmdlet. | true | false | |||
| Specifies the base object to use to get the attributes. | true | false |
Get-ToolboxObject MyTBSession "Loopback"
Uses Toolbox to do an auto-discovery on the network.
The Run-ToolboxAutoDiscovery cmdlet uses the Toolbox network device discovery tool in order to find all the Crestron devices on the PC subnet. It is important to note that the discovery is run on the subnet of the PC and not that of the specified device.
Get-ToolboxAutoDiscovery [-Device] <String> [[-Protocol] <String>] [[-QueryPeriod] <Int32>] [[-QueryCount] <Int32>] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the IP address or hostname of the device to use. | true | false | |||
| 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 | ||
| Specifies the period in milliseconds between queries. Defaults to 1000 milliseconds. | false | false | 1000 | ||
| Specifies the number of queries. Defaults to 5. | false | false | 5 |
Run-ToolboxAutoDiscovery 'mc3-myunit'EXAMPLE 2
Run-ToolboxAutoDiscovery 'mc3-myunit' 'ssh' 800 4
Gets a list of objects from the device.
The Get-ToolboxObject cmdlet gets a list of objects from the specified device. The objects represent the top level Toolbox Object/Attribute hierarchy for the device. The Toolbox address must be the exact path to the stream as shown below. Note that this paradigm is not supported on all devices, though it is on most DigitalMedia devices.
Get-ToolboxObject [-TBSession] <Guid> [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the Toolbox session GUID obtained from the Open-ToolboxSession cmdlet. | true | false |
Get-ToolboxObject MyTBSession
Sends the specified command and returns the response.
Sends a command to the specified session and returns the response.
Get-ToolboxSession [-TBAddress] <String> [<CommonParameters>] Get-ToolboxSession [-Handle] <Guid> [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| the computer hostname or ip address | true | true (ByValue) | |||
| Guid, TBSession | Specifies the handle to the previously open session. | true | true (ByPropertyName) |
Get-ToolboxSession $mysession
Gets the value of the specified attribute.
The Get-ToolboxValue cmdlet gets the value of the specified attribute. Note that not all attributes can be read in which case a zero or empty string may be returned. See the Get-ToolboxObject help for more information.
Get-ToolboxValue [-TBSession] <Guid> [-Object] <String> [-Attribute] <String> [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the Toolbox session GUID obtained from the Open-ToolboxSession cmdlet. | true | false | |||
| Specifies the base object to use. | true | false | |||
| Specifies the attribute from which to get the value. | true | false |
Get-ToolboxObject MyTBSession "Source" "Vertical Resolution"
Gets user access parameters depending on the secure mode.
The Get-UserAccess cmdlet is a generic helper function that returns information about the username, password, CTP and FTP ports. These parameters depend on the whether or not secure mode is selected. All the input parameters are optional.
Get-UserAccess [[-Port] <Int32>] [[-Username] <String>] [[-Password] <String>] [-Secure] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| 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 | ||
| Specifies the username to use otherwise the default is selected depending on the security mode. | false | false | |||
| Specifies the password to use otherwise the default is selected depending on the security mode. | false | false | |||
| If specified then SSH will be used. | false | false | False |
Get-UserAccess -Secure
Gets all the version info from a device.
The Get-VersionInfo cmdlet obtains the version information from the specified device and returns a custom object.
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>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the IP address or hostname of the device or devices. A list of devices can be input from the pipeline. | true | true (ByValue) | |||
| 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) | |||
| If specified then the SSH protocol is used. | false | false | False | ||
| The username to use for a secure connection. | false | false | |||
| The password to use for a secure connection. | false | false | |||
| An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. | false | false | 0 | ||
| Specifies the number of parallel updates to run simultaneously. Valid values
are 1 to 100 Defaults to 20. |
false | false | 20 | ||
| An optional switch to display a progress indicator. | false | false | False |
Get-VersionInfo -Device 'CP3N-BLDG1'
$MyDeviceList | Get-VersionInfo -Secure -Username 'admin' -Password 'Pa$$w0rd'
Read-AutoDiscovery 'CP3N-BLDG1' |
Imports a worksheet into a Powershell object.
The Import-Excel cmdlet can import a list of worksheets or import a specific worksheet as a custom object.
Import-Excel [-Workbook] <String> [[-Worksheet] <String>] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| 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 | |||
| 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 |
Import-Excel -Workbook 'Devices.xlxs'
Import-Excel -Workbook 'Devices.xlxs' -Worksheet 'Bldg1'
Opens a session to a Crestron device, sends the command, and closes the session.
The Invoke-CrestronCommand cmdlet creates a temporary session to a
Crestron device, sends the command, then closes the session. This avoids
the user having to create and pass a variable to store the session handle
Additionally an array of commands may be input via the pipeline. In this
case
a corresponding array of responses is returned in the same order as the
commands.
Invoke-CrestronCommand [-Device] <String> [[-Command] <String[]>] [[-Timeout] <Int32>] [[-Prompt] <String>] [[-Encoding] <String>] [-NoBufferFlush] [-Secure] [[-Username] <Object>] [[-Password] <Object>] [[-Port] <Int32>] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the IP address or hostname of the device. | true | false | |||
| 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 | ||
| Specifies the timeout in seconds to wait for a response. The default is 5 seconds. | false | false | 5 | ||
| 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 | > | ||
| 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 | ||
| 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 | ||
| 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 | ||
| The username to use for a secure connection. | false | false | |||
| The password to use for a secure connection. | false | false | |||
| Specifies the port of the device. Defaults to the predefined CTP port for the protocol selected. | false | false | 0 |
Invoke-CrestronCommand 'CP3-MyUnit' 'VER -ALL' 30
$r = 'VER','INFO','IPCONFIG' | Invoke-CrestronCommand 'CP3-MyUnit'
Sends the specified command and returns the response.
Sends a command to the specified session and returns the response including
the prompt
Additionally an array of commands may be input via the pipeline. In this
case
a corresponding array of responses is returned in the same order as the
commands.
Invoke-CrestronSession [-Handle] <Guid> [[-Command] <String[]>] [[-Prompt] <String>] [[-Timeout] <Int32>] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Guid | Specifies the handle to the previously opened session. | true | false | ||
| 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 | ||
| 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 | > | ||
| Specifies the timeout in seconds to wait for a response. The default is 5 seconds. | false | false | 5 |
$session = Open-CrestronSession 'CP3-MyUnit'
$session = Open-CrestronSession 'CP3-MyUnit'
Asynchronously performs an operation for each item in a collection of input objects.
Asynchronously performs an operation for each item in a collection of input
objects,
creating powershell runspaces to perform operations
Each runspace execution can be limited by timeout in minutes (shared for all
runspace)
Host runspace variables can be shared with child runspaces by specifieng their
names.
Invoke-RunspaceJob [-InputObject] <PSObject[]> [-ScriptBlock] <ScriptBlock> [[-ThrottleLimit] <Int32>] [[-Timeout] <Int32>] [[-SharedVariables] <String[]>] [[-ShowProgress]] [[-Functions] <String[]>] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| 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) | |||
| Specifies the operation that is performed on each input object. Enter a script block that describes the operation. | true | false | |||
| 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 | ||
| Determines the maximum wait time for each background runspace job, in minutes. The timing starts when scriptblock execution begins. | false | false | 0 | ||
| 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 | |||
| Shows progress bar. | false | false | False | ||
| Specifies the functions that are to be passed to the runspaces. | false | false |
'comp1', 'comp2', 'comp3' | Invoke-RunspaceJob {Start-LongScript -Identity $_}
'comp1', 'comp2', 'comp3' | Invoke-RunspaceJob {Start-LongScript -Identity $_} -ThrottleLimit 50 -Timeout 2
Invoke-RunspaceJob {Start-LongScript -Identity $_ -Credential $Cred} -SharedVariables Cred -ShowProgress -InputObject ('comp1', 'comp2', 'comp3')
Sends the specified console command and returns the response.
Sends a console command to the specified session and returns the response. This is equivalent to using a Toolbox console.
Invoke-ToolboxCommand [-Handle] <Guid> [-Command] <String> [[-Timeout] <Int32>] [[-Prompt] <String>] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Guid, TBSession | true | false | |||
| Specifies the console command to send. Defaults to 'VER' which all devices support. | true | false | VER | ||
| Specifies an optional timeout in seconds. Defaults to 30 seconds. | false | false | 30 | ||
| 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 | > |
Invoke-ToolboxCommand -TBSession $s -Command 'IPCONFIG'
Sends the specified ability command and returns the response.
Sends a command to the specified session and returns the response. The user may embed arguments as part of the command or use the optional ArgumentList parameter.
Invoke-ToolboxSession [-Handle] <Guid> [[-TBAbility] <String>] [[-ArgumentList] <Object[]>] [[-Timeout] <Double>] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Guid, TBSession | Specifies the handle to the previously open session. | true | true (ByValue, ByPropertyName) | ||
| Specifies the command to send. Defaults to ProductRefreshInfo which all devices support. | false | false | ProductRefreshInfo | ||
| 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 | |||
| Specifies an optional timeout in seconds. Defaults to 30 seconds. | false | false | 30 |
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
Sends the specified command and waits for a response terminated by a prompt (">").
The Invoke-USBSession cmdlet sends the specified command via the previously opened USB connection and waits for the response.
Invoke-USBSession [[-Command] <String>] [[-Prompt] <String>] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the command to send to the device. | false | false | |||
| 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 | > |
Invoke-USBSession "VER -V"
Opens CTP and FTP ports from the LAN facing device to devices on the control subnet.
The New-CrestronSubnetMap cmdlet opens a CTP and FTP port on the LAN facing device specifed by the Hostname on the control subnet. A collection is returned with the LAN to CS mappings. The ports are identified as; CTP used to send and receive commands, and FTP used to transfer files.
New-CrestronSubnetMap [-Device] <String> [-Hostname] <String[]> [-OpenSecurePorts] [-Secure] [[-Username] <Object>] [[-Password] <Object>] [[-Port] <Int32>] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the IP address or hostname of the LAN facing device. | true | false | |||
| 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) | |||
| An optional switch to open secure ports to the control subnet device. Defaults to opening non-secure ports. | false | false | False | ||
| If specified a secure connection will be used on the LAN facing device. | false | false | False | ||
| The username to use for a secure connection. | false | false | |||
| The password to use for a secure connection. | false | false | |||
| An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. | false | false | 0 |
New-CrestronSubnetPorts 'PRO3-MyUnit' 'TSW-552-MyPanel' -OpenSecurePorts
Opens persistent ports on the control subnet.
The Close-CrestronPersistentPort cmdlet opens persistent ports on the specified device. A number of parameters must be specified since there may be multiple ports open to the same device which may also be using the same or different protocols.
Open-CrestronPersistentPort [-Device] <String> [-Hostname] <String[]> [-LANPort] <Int32[]> [-CSPort] <Int32[]> [[-Protocol] <String>] [-Secure] [[-Username] <Object>] [[-Password] <Object>] [[-Port] <Int32>] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the IP address or hostname of the LAN facing device. | true | false | |||
| IPAddress | Specifies the IP address or hostname of the control subnet facing device. | true | true (ByValue) | ||
| Specifies the LAN side port number to close. An array of ports may be specified. | true | false | |||
| Specifies the control subnet port to close. An array of ports may be specified. | true | false | |||
| Specifies the protcol to use when opening the port. May be TCP, UDP, or BOTH but defaults to TCP. | false | false | TCP | ||
| If specified a secure connection will be used on the LAN facing device. | false | false | False | ||
| The username to use for a secure connection. | false | false | |||
| The password to use for a secure connection. | false | false | |||
| An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. | false | false | 0 |
Open-CrestronPersistentPort -Device 'CP3N-BLDG1' -Hostname 'TSW-750-ROOM1' -LANPort 11234 -CSPort 22 -Protocol TCP
Opens a console session to a Crestron device.
The Open-CrestronSession cmdlet creates a console session to a Crestron device. The device may be specified using a hostname or an IP address and may or may not be secure.
Open-CrestronSession [-Device] <String> [-Secure] [[-Username] <Object>] [[-Password] <Object>] [[-Port] <Int32>] [-NoBufferFlush] [[-Encoding] <String>] [-ForceNewSession] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the IP address or hostname of the device. | true | true (ByValue) | |||
| 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 | ||
| The username to use for a secure connection. | false | false | |||
| The password to use for a secure connection. | false | false | |||
| Specifies the port of the device. Defaults to the predefined CTP port for the protocol selected. | false | false | 0 | ||
| 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 | ||
| 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 | ||
| 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 |
Open-CrestronSession -Device 'CP3-MyUnit'
Open-CrestronSession -Device 'CP3-MyUnit' -Secure -Username 'myuser' -Password 'mypass'
Opens port from the LAN facing device to devices on the control subnet.
The Open-CrestronSubnetPort cmdlet opens ports on the LAN facing device sepecifed by the Hostname on the control subnet. A collection is returned with the LAN to CS mappings.
Open-CrestronSubnetPort [-Device] <String> [-Hostname] <String[]> [-CSPort] <Int32[]> [[-Protocol] <String>] [-Secure] [[-Username] <Object>] [[-Password] <Object>] [[-Port] <Int32>] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the IP address or hostname of the device. | true | false | |||
| 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) | |||
| Specifies the port number to open on the control subnet. An array of ports may be specified. | true | false | |||
| Specifies the protcol to use when opening the port. May be TCP or UDP but defaults to TCP. | false | false | TCP | ||
| If specified a secure connection will be used on the LAN facing device. | false | false | False | ||
| The username to use for a secure connection. | false | false | |||
| The password to use for a secure connection. | false | false | |||
| An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. | false | false | 0 |
Open-CrestronSubnetPort -Device 'CP3N-MyUnit' -Hostname 'TSW-1052-MyUnit' -CSPort 23,80,443 -Secure -Username 'admin' -Password 'Pa$$w0rd'
Opens a session to a Crestron device.
The Open-ToolboxSession cmdlet creates a ComServer connecton to a Crestron device.
Open-ToolboxSession [[-TBAddress] <String>] [[-ConsoleLog] <String>] [-Secure] [-Username <Object>] [-Password <Object>] [-Port <Int32>] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| 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 | ||
| 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 | |||
| If specified then the SFTP protocol will be used. Defaults to FTP. | false | false | False | ||
| The username to use for a secure connection. | false | false | |||
| The password to use for a secure connection. | false | false | |||
| Specifies the port of the device. Defaults to the predefined CTP port for the protocol selected. | false | false | 0 |
Open-ToolboxSession -TBAddress 'ctp CP3-MyUnit'EXAMPLE 2
Open-ToolboxSession -TBAddress 'ssh CP3-MyUnit' -ConsoleLog 'C:\Logs\MyLog.txt'
Opens a USB connection to the device.
The Open-USBSession cmdlet opens a USB connection to a single Crestron device. Only a single device may be connected. USB via host names is not currently supported.
Open-USBSession [<CommonParameters>]
Open-USBSession
Uses the specified device to do an AutoDiscovery.
The Read-AutoDiscovery uses AutoDiscovery feature of the specified Crestron devices to return devices on their subnets. The results are parsed, gathered, and returned as a custom object.
Read-AutoDiscovery [-Device] <String> [-QueryPeriod <Int32>] [-QueryCount <Int32>] [-Secure] [-Username <Object>] [-Password <Object>] [-Port <Int32>] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the Crestron device to use. | true | true (ByValue) | |||
| Specifies the period in milliseconds between queries. Defaults to 1000 milliseconds. | false | false | 1000 | ||
| Specifies the number of queries. Defaults to 5. | false | false | 5 | ||
| If specified then the SSH protocol is used. | false | false | False | ||
| The username to use for a secure connection. | false | false | |||
| The password to use for a secure connection. | false | false | |||
| An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. | false | false | 0 |
Read-Discovery 'MC3-MyUnit'EXAMPLE 2
'MC3-MyUnit','CP3N-MyUnit' | Read-Discovery
Deletes the specified folder from the Crestron device.
The Remove-FTPDirectory cmdlet recursively deletes the specified folder from the Crestron device. Note that the delete is recursive so all the files and subfolders in the specified folder will also be deleted. Also the specified folder must be visible via an FTP client, i.e. deleting arbitrary folders on the device is not supported.
Remove-FTPDirectory [-Device] <String> [-RemoteDirectory] <String> [-ContentsOnly] [-Secure] [[-Username] <Object>] [[-Password] <Object>] [[-Port] <Int32>] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the IP address or hostname of the device. | true | false | |||
| Specifies the full path of the folder to be deleted. | true | false | |||
| If specified only the contents of the folder including all files and subfolders will be deleted leaving the specified folder empty. | false | false | False | ||
| If specified then the SFTP protocol will be used. Defaults to FTP. | false | false | False | ||
| The username to use for a secure connection. | false | false | |||
| The password to use for a secure connection. | false | false | |||
| An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. | false | false | 0 |
Remove-FTPDirectory -Device 'CP3-Bldg1' -RemoteDirectory '/firmware/mylogs'
Deletes the specified file from the Crestron device.
The Remove-FTPFile cmdlet deletes the specified file from the Crestron device. The full path and filename must be specified. If the file is not found an exeception is thrown.
Remove-FTPFile [-Device] <String> [-RemoteFile] <String> [-Secure] [[-Username] <Object>] [[-Password] <Object>] [[-Port] <Int32>] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the IP address or hostname of the device. | true | false | |||
| Specifies the full path and filename of the file to be deleted. | true | false | |||
| If specified then the SFTP protocol will be used. Defaults to FTP. | false | false | False | ||
| The username to use for a secure connection. | false | false | |||
| The password to use for a secure connection. | false | false | |||
| An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. | false | false | 0 |
Remove-FTPFile -Device 'CP3-MyUnit' -RemoteFile 'Program01/file.txt'
Reboots a Crestron device.
The Reboot-CrestronDevice cmdlet reboots a Crestron device and waits for it to be fully functional.
Reset-CrestronDevice [-Device] <String> [[-Timeout] <Int32>] [[-OfflineDelay] <Int32>] [-WaitOnly] [-NoWait] [[-Username] <Object>] [[-Password] <Object>] [-Secure] [[-Port] <Int32>] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the IP address or hostname of the device. | true | true (ByValue) | |||
| Specifies the timeout in seconds. Defaults to 600 seconds. | false | false | 600 | ||
| 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 | ||
| Skip the reboot, and simply wait for the device to recover. | false | false | False | ||
| Reboot the device and return immediately. | false | false | False | ||
| The username to use for a secure connection. | false | false | |||
| The password to use for a secure connection. | false | false | |||
| 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 | ||
| Specifies the port of the device. Defaults to the predefined CTP port for the protocol selected. | false | false | 0 |
Reboot-CrestronDevice -Device 'CP3-MyUnit'
Sends firmware to a Crestron device.
The Send-CrestronFirmware cmdlet sends firmware to a Crestron device but does not by default execute the upgrade command which may vary by device or firmware types. There is an optional switch to force the upgrade.
Send-CrestronFirmware [-Device] <String> [-LocalFile] <String> [-ImageUpdate] [[-Timeout] <Int32>] [-Secure] [[-Username] <Object>] [[-Password] <Object>] [[-Port] <Int32>] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the IP address or hostname of the device. | true | false | |||
| Specifies the full path and filename of the source file which may be on the local PC or a network drive. | true | false | |||
| An optional switch that sends the IMGUPD command after the firmware is uploaded. | false | false | False | ||
| 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 | ||
| If specified then the SFTP protocol will be used. Defaults to FTP. | false | false | False | ||
| The username to use for a secure connection. | false | false | |||
| The password to use for a secure connection. | false | false | |||
| An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. | false | false | 0 |
Send-CrestronFirmware -Device 'CP3-MyUnit' -LocalFile 'C:\cp3firmware.cos' -Secure
Send-CrestronFirmware -Device 'CP3-MyUnit' -LocalFile 'C:\cp3firmware.cos' -ImageUpdate -Secure
Sends a user program to a Crestron device.
The Send-CrestronProgram cmdlet sends a user program to a Crestron device.
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>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies a collection of device IP addresses or hostnames. | true | false | |||
| Specifies a mapping object used for devices on the control subnet. | true | false | |||
| Specifies the full path and filename of the source file on the local PC. | true | false | |||
| Specifies the slot in which to load the program. Defaults to slot 1. | false | false | 1 | ||
| If specified the program will be loaded but not started. Defaults to start the program. | false | false | False | ||
| If specified the IP table will not be updated. Defaults to updating the IP table. | false | false | False | ||
| If specified the SIG file will be sent to the device. Defaults to not sending the SIG file. | false | false | False | ||
| CompactFlash | If specified the program will load to external memory. Defaults to the internal flash. | false | false | False | |
| Specifies the timeout in seconds to wait for the program to fully start. Defaults to 60 seconds. | false | false | 60 | ||
| If specified then the SSH protocol is used. | false | false | False | ||
| The username to use for a secure connection. | false | false | |||
| The password to use for a secure connection. | false | false | |||
| An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. | false | false | 0 | ||
| Specifies the number of parallel updates to run simultaneously. Defaults to 20. | false | false | 20 | ||
| An optional switch to display a progress indicator. | false | false | False |
Send-CrestronProgram -Device 'CP3-MyUnit' -LocalFile 'c:\test.lpz' -ProgramSlot 4 -Secure
Sends an application program to a Crestron device.
The Send-CrestronProgramHelper cmdlet is a support function and should not be called directly. See help on Send-CrestronProgram for more details.
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>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| true | false | ||||
| true | false | ||||
| true | false | ||||
| false | false | 1 | |||
| false | false | False | |||
| false | false | False | |||
| false | false | False | |||
| CompactFlash | false | false | False | ||
| false | false | 60 | |||
| false | false | False | |||
| false | false | ||||
| false | false | ||||
| false | false | 0 |
Sends a display project to a Crestron device.
The Send-CrestronProject cmdlet sends a display project to a Crestron device.
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>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies a collection of device IP addresses or hostnames. | true | false | |||
| Specifies a mapping object used for devices on the control subnet. | true | false | |||
| Specifies the full path and filename of the source file on the local PC. | true | false | |||
| If specified then the SSH protocol is used. | false | false | False | ||
| The username to use for a secure connection. | false | false | |||
| The password to use for a secure connection. | false | false | |||
| An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. | false | false | 0 | ||
| Specifies the number of parallel updates to run simultaneously. Defaults to 20. | false | false | 20 | ||
| An optional switch to display a progress indicator. | false | false | False |
Send-CrestronProject -Device 'CP3-MyUnit' -LocalFile 'c:\test.vtz'
Sends a display project to a Crestron device.
The Send-CrestronProjectHelper cmdlet is a support function and should not be called directly. See help on Send-CrestronProject for more details.
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>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| true | false | ||||
| true | false | ||||
| true | false | ||||
| false | false | False | |||
| false | false | ||||
| false | false | ||||
| false | false | 0 |
Sends a file to the device using FTP.
The Send-SFTPFile cmdlet sends the specified file to the device using FTP
If a username and password are provided then the cmdlet used an SSL connection.
Send-FTPFile [-Device] <String> [-LocalFile] <String> [-RemoteFile] <String> [-Secure] [[-Username] <Object>] [[-Password] <Object>] [[-Port] <Int32>] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Server | Specifies the IP address or hostname of the device. | true | false | ||
| Specifies the full path to the source local file. | true | false | |||
| Specifies the full path to the destination remote file. | true | false | |||
| If specified then the SFTP protocol will be used. Defaults to FTP. | false | false | False | ||
| The username to use for a secure connection. | false | false | |||
| The password to use for a secure connection. | false | false | |||
| An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. | false | false | 0 |
Send-FTPFile -Device 'CP3-MyUnit' -LocalFile 'C:\Info\myfile.txt' -RemoteFile '\firmware\anyfile.txt'
Send-FTPFile -Device 'CP3-MyUnit' -LocalFile 'C:\Info\myfile.txt' -RemoteFile '\firmware\anyfile.txt' -Secure
Send-FTPFile 'CP3-MyUnit' 'C:\Info\myfile.txt' '\firmware\anyfile.txt' -Secure -Username 'myuser' -Passowrd 'mypass'
Modifies the state of a program loaded into a Crestron device.
The Set-CrestronProgramState cmdlet can perform a number of functions on the specified programs in the specified Crestron device. Currently the cmdlet supports stopping, restarting, registering, and/or unregistering a program. Although any combination can be specified, some combinations may be mutually exclusive and should be avoided.
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>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the device IP address or hostname. | true | false | |||
| Specifies the program slot or and array of slots. | false | false | 1 | ||
| Specifies a mapping object used for devices on the control subnet. | true | false | |||
| true | false | ||||
| A switch parameter used to stop the specified program. | false | false | False | ||
| A switch parameter used to restart the specified program. | false | false | False | ||
| A switch parameter used to register the specified program. | false | false | False | ||
| A switch parameter used to unregister the specified program. | false | false | False | ||
| Delete | A switch parameter used to remove the specified program from the control system. Delete is an alias for this parameter. | false | false | False | |
| If specified then the SSH protocol is used. | false | false | False | ||
| The username to use for a secure connection. | false | false | |||
| The password to use for a secure connection. | false | false | |||
| An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. | false | false | 0 |
Set-CrestronProgramState -Device 'CP3-MyUnit' -Stop -Unregister
Sets the value of the specified attribute.
The Set-ToolboxValue cmdlet sets the value of the specified attribute. The value may be a string, integer, decimal, or boolean. Note that not all attributes can be written and if a value does not match the type expected a zero or empty string may be sent causing unexpected behavior and no error is returned. See the Get-ToolboxObject help for more information.
Set-ToolboxValue [-TBSession] <Guid> [-Object] <String> [-Attribute] <String> [-Value] <Object> [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the Toolbox session GUID obtained from the Open-ToolboxSession cmdlet. | true | false | |||
| Specifies the base object to use. | true | false | |||
| Specifies the attribute from which to get the value. | true | false | |||
| 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 |
Set-ToolboxObject MyTBSession "Source" "Free Run Index" 32
Tests the TCP socket on the specified device and port.
The Test-CrestronPort cmdlet attempts to open a TCP socket on the specified device and port. This is a substitue for a ping which is not allowed in some environments. The returned object has a CanConnect property.
Test-CrestronPort [-Device] <String> [-Port] <Int32[]> [-ShowProgress] [-Quiet] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the IP address or hostname of the device. | true | false | |||
| Specifies the port number to use. A list of ports can be input from the pipeline. | true | true (ByValue) | |||
| An optional switch that enables the progress indicator. Defaults to not showing progress. | false | false | False | ||
| An optional switch that returns a boolean of true if all the tested ports are open or false otherwise. | false | false | False |
Test-CrestronPort -Device 'CP3N-MyUnit' -Port 21,23,41795
Verifies that the specified file can be accessed.
The Test-FileAccess cmdlet verfies that the specified file can be opened with read/write access. Particularly helpful when checking for Excel files that may be open and therefore locked in Excel. The return is a boolean.
Test-FileAccess [-Path] <String> [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the full path to the file to test for access. | true | false |
Test-FileAccess -Path 'C:\Devices.xlxs'
Checks if a file or directory is present on a device using FTP.
The Test-FTPPath cmdlet checks if a file or directory is present on a device
using FTP
If a username and password are provided then the cmdlet used an SSL
connection.
Test-FTPPath [-Device] <String> [-RemotePath] <String> [-Secure] [[-Username] <Object>] [[-Password] <Object>] [[-Port] <Int32>] [<CommonParameters>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the IP address or hostname of the device. | true | false | |||
| Specifies the remote path to check. | true | false | |||
| If specified then the SFTP protocol will be used. Defaults to FTP. | false | false | False | ||
| The username to use for a secure connection. | false | false | |||
| The password to use for a secure connection. | false | false | |||
| An optional parameter that specifies the port to use. Defaults to the standard port for the protocol. | false | false | 0 |
Test-FTPPath -Device 'CP3-MyUnit' -RemotePath 'Program01'
Verifies that a USB session is open.
The Test-USBSession cmdlet verifies that there is an open USB session and returns true if successful.
Test-USBSession [<CommonParameters>]
Test-USBSession
Updates a Crestron device using a PUF file.
The Update-PUF cmdlet updates one or more devices from the PUFs in the
specified path
The path may contain more than one PUF and the cmdlet will automatically
determine which
PUF is required for each device.
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>]
| Name | Alias | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| Specifies the device or devices by hostname or IP address that are to be updated. | true | true (ByValue) | |||
| 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) | |||
| 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 | |||
| If specified the PUF will be sent using the SFTP protocol rather than FTP. | false | false | False | ||
| The username to use for a secure connection. | false | false | |||
| The password to use for a secure connection. | false | false | |||
| 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 | ||
| A switch that forces the OS to update even if it is not required. | false | false | False | ||
| A switch that forces all components to be updated even if they are not required. | false | false | False | ||
| 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 | ||
| 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 | ||
| Specifies the number of parallel updates to run simultaneously. Defaults to 8. | false | false | 5 | ||
| 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 | ||
| An optional switch to display a progress indicator. | false | false | False |
Updating a single device.
Updating a single device from a specific PUF
Updating a list of devices.
Updating a list of devices defined in a text file, one line per device using SFTP.
Displaying the results in a grid view.