< Back

Remove-AMUserGroupMember

Sat Jan 11, 2020 3:15 am

NAME Remove-AMUserGroupMember



SYNOPSIS

Removes users from an AutoMate Enterprise user group.





SYNTAX

Remove-AMUserGroupMember -InputObject <Object> [-User] <Object> [-WhatIf] [-Confirm] [<CommonParameters>]





DESCRIPTION

Remove-AMUserGroupMember can remove users from a user group.





PARAMETERS

-InputObject <Object>

The user group to modify.



Required? true

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-User <Object>

The users(s) to remove from the user group.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

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

The following AutoMate object types can be modified by this function:

UserGroup





OUTPUTS

None





-------------------------- EXAMPLE 1 --------------------------



PS C:\\># Remove all users from a user group



Get-AMUserGroup "All Users" | Remove-AMUserGroupMember -User *









-------------------------- EXAMPLE 2 --------------------------



PS C:\\># Remove a user from a user group (using user object)



Get-AMUserGroup | Remove-AMUserGroupMember -User (Get-AMUser "John")











RELATED LINKS

https://github.com/AutomatePS/AutomatePS