< Back

Grant-UserRight

Wed Jan 15, 2020 2:31 am

NAME Grant-UserRight



SYNOPSIS

Grant rights to an account.





SYNTAX

Grant-UserRight [-Name] <String[]> [-AccountName] <Object[]> [-WhatIf] [-Confirm] [<CommonParameters>]





DESCRIPTION

Grants one or more rights to the specified accounts.





PARAMETERS

-Name <String[]>

The user right, or rights, to query.



Required? true

Position? 2

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-AccountName <Object[]>

Grant rights to the specified accounts. Each account may be a string, an NTAccount object, or a

SecurityIdentifier object.



Required? true

Position? 3

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

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



OUTPUTS



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



PS C:\\>Grant-UserRight -Name 'Allow logon locally' -AccountName 'Administrators'



Grants the allow logon locally right to the Administrators group.











RELATED LINKS