< Back

Remove-JCSystemGroupMember

Thu Jan 16, 2020 9:13 am

NAME Remove-JCSystemGroupMember



SYNOPSIS

Removes a JumpCloud System from a JumpCloud System Group





SYNTAX

Remove-JCSystemGroupMember [[-GroupName] <System.String>] [-ByID] [-GroupID <System.String>] -SystemID

<System.String> [<CommonParameters>]



Remove-JCSystemGroupMember [-GroupName] <System.String> -SystemID <System.String> [<CommonParameters>]





DESCRIPTION

The Remove-JCSystemGroupMember function is used to remove a JumpCloud System from a JumpCloud System Group. The

System Group member must be removed using the SystemID parameter.





PARAMETERS

-ByID <System.Management.Automation.SwitchParameter>

Use the -ByID parameter when the SystemID is passed over the pipeline to the Remove-JCSystemGroupMember

function. The -ByID SwitchParameter will set the ParameterSet to 'ByID' which will increase the function speed

and performance.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-GroupID <System.String>

The GroupID is used in the ParameterSet 'ByID'. The GroupID for a System Group can be found by running the

command: PS C:\\> Get-JCGroup -type 'System'



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-GroupName <System.String>

The name of the JumpCloud System Group that you want to remove the System from.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-SystemID <System.String>

The _id of the System which you want to remove from the System Group. To find a JumpCloud SystemID run the

command: PS C:\\> Get-JCSystem | Select hostname, _id



The SystemID will be the 24 character string populated for the _id field. SystemID has an Alias of _id. This

means you can leverage the PowerShell pipeline to populate this field automatically using the Get-JCSystem

function before calling Remove-JCSystemGroupMember. This is shown in EXAMPLES 2 and 3.



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 --------------------------



PS C:\\> Remove-JCSystemGroupMember -GroupName 'Windows Systems' -SystemID '59dad305383roc7k369sf7s2'



Removes a System with SystemID '59dad305383roc7k369sf7s2' from the System Group 'Windows Systems'

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



PS C:\\> Get-JCSystem | Where-Object os -Like *Windows* | Remove-JCSystemGroupMember -GroupName 'Mac Systems'



Removes all Systems with an operating system like 'Windows' from the System Group 'Mac Systems'

-------------------------- Example 3 --------------------------



Get-JCSystem | Where-Object active -EQ $false | Remove-JCSystemGroupMember -GroupName 'Active Systems'



Removes all inactive systems from the System Group 'Active Systems'



RELATED LINKS

Online Version: https://github.com/TheJumpCloud/support ... roupMember