< Back
New-JCCommand
Post
NAME New-JCCommand
SYNOPSIS
Creates a new JumpCloud Mac, Linux, or Windows command
SYNTAX
New-JCCommand [-name] <System.String> [-commandType] {windows | mac | linux} [-command] <System.String>
[[-launchType] {trigger | manual}] [[-timeout] <System.String>] [-shell {powershell | cmd}] -trigger
<System.String> [-user <System.String>] [<CommonParameters>]
DESCRIPTION
Creates a new JumpCloud Mac, Linux, or Windows command
PARAMETERS
-command <System.String>
The script or command to run using the command.
Required? true
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-commandType <System.String>
The type of JumpCloud command. Options are windows, mac, or linux.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-launchType <System.String>
The launch type for the new command. The default is manual.
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? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-shell <System.String>
Enter shell type
Required? false
Position? named
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. The default is 120 seconds.
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
-user <System.String>
Only needed for Mac and Linux commands. If not entered Mac and Linux commands will default to the root users.
If entering a user a UserID must be entered.
Required? false
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 --------------------------
PS C:\\> New-JCCommand -commandType windows -name 'PowerShell version' -command '$PSVersionTable'
Creates a JumpCloud windows command named 'PowerShell version' which will return the PowerShell version installed
on Windows endpoints when run.
RELATED LINKS
Online Version: https://github.com/TheJumpCloud/support ... -JCCommand
SYNOPSIS
Creates a new JumpCloud Mac, Linux, or Windows command
SYNTAX
New-JCCommand [-name] <System.String> [-commandType] {windows | mac | linux} [-command] <System.String>
[[-launchType] {trigger | manual}] [[-timeout] <System.String>] [-shell {powershell | cmd}] -trigger
<System.String> [-user <System.String>] [<CommonParameters>]
DESCRIPTION
Creates a new JumpCloud Mac, Linux, or Windows command
PARAMETERS
-command <System.String>
The script or command to run using the command.
Required? true
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-commandType <System.String>
The type of JumpCloud command. Options are windows, mac, or linux.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-launchType <System.String>
The launch type for the new command. The default is manual.
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? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-shell <System.String>
Enter shell type
Required? false
Position? named
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. The default is 120 seconds.
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
-user <System.String>
Only needed for Mac and Linux commands. If not entered Mac and Linux commands will default to the root users.
If entering a user a UserID must be entered.
Required? false
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 --------------------------
PS C:\\> New-JCCommand -commandType windows -name 'PowerShell version' -command '$PSVersionTable'
Creates a JumpCloud windows command named 'PowerShell version' which will return the PowerShell version installed
on Windows endpoints when run.
RELATED LINKS
Online Version: https://github.com/TheJumpCloud/support ... -JCCommand