< Back

Set-JCCommand

Thu Jan 16, 2020 9:17 am

NAME Set-JCCommand



SYNOPSIS

Updates an existing JumpCloud command





SYNTAX

Set-JCCommand [-CommandID] <System.String> [[-name] <System.String>] [[-command] <System.String>] [[-launchType]

{trigger | manual}] [[-timeout] <System.String>] -trigger <System.String> [<CommonParameters>]





DESCRIPTION

Updates an existing JumpCloud command using the CommandID





PARAMETERS

-CommandID <System.String>

The _id of the JumpCloud command you wish to update.



To find a JumpCloud CommandID run the command:



PS C:\\> Get-JCCommand | Select name, _id



The CommandID will be the 24 character string populated for the _id field.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-command <System.String>

The actual script or command.



Required? false

Position? 2

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-launchType <System.String>

The launch type of the command options are: trigger, manual, repeated, one-time.



Required? false

Position? 3

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-name <System.String>

The name of the new JumpCloud command.



Required? false

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-timeout <System.String>

The time the command will run before it times out.



Required? false

Position? 4

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-trigger <System.String>

Enter a trigger name. Triggers must be unique



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

System.String







OUTPUTS

System.Object







NOTES









-------------------------- Example 1 --------------------------



Set-JCCommand -CommandID 5g6o3lf95r1485193o8cks6 -launchType trigger -trigger getWinLog



Updates the 'launchType' of command with CommandID '5g6o3lf95r1485193o8cks6' to trigger and sets the 'trigger' to

getWinLog.

-------------------------- Example 2 --------------------------



Set-JCCommand -CommandID 5g6o3lf95r1485193o8cks6 -name "Windows - Get Windows Event Log"



Updates the 'name' of command with CommandID '5g6o3lf95r1485193o8cks6' to "Windows - Get Windows Event Log".



RELATED LINKS

Online Version: https://github.com/TheJumpCloud/support ... -JCCommand