| external help file | ConnectWiseControlAPI-help.xml |
|---|---|
| Module Name | ConnectWiseControlAPI |
| online version | |
| schema | 2.0.0 |
Will issue a command against a given machine and return the results.
Invoke-CWCCommand [-GUID] <Guid> [[-Command] <String>] [[-TimeOut] <Int32>] [-MaxLength <Int32>] [-PowerShell]
[[-Group] <String>] [-NoWait] [<CommonParameters>]
Will issue a command against a given machine and return the results.
Invoke-CWCCommand -GUID $GUID -Command 'hostname'Will return the hostname of the machine.
Invoke-CWCCommand -GUID $GUID -TimeOut 120000 -Command 'iwr -UseBasicParsing "https://bit.ly/ltposh" | iex; Restart-LTService' -PowerShellWill restart the Automate agent on the target machine.
The GUID identifier for the machine you wish to connect to. You can retrieve session info with the 'Get-CWCSessions' cmdlets
Type: Guid
Parameter Sets: (All)
Aliases:
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe command you wish to issue to the machine.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe amount of time in milliseconds that a command can execute. The default is 10000 milliseconds.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: 10000
Accept pipeline input: False
Accept wildcard characters: FalseIssues the command in a powershell session.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseName of session group to use.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: All Machines
Accept pipeline input: False
Accept wildcard characters: FalseWill not wait for the output of the command.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False{{ Fill MaxLength Description }}
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Version: 1.0
Author: Chris Taylor
Creation Date: 1/20/2016
Purpose/Change: Initial script development