Skip to content

Set HPOVLdapGroupRole

Chris Lynch edited this page Dec 10, 2020 · 39 revisions

HPE OneView 4.10 Library

Set-HPOVLdapGroupRole

Assign or change roles for LDAP Groups.

SYNTAX

Set-HPOVLdapGroupRole [-InputObject] <Object> [-Roles] <Array> [-UserName] <String> [-Password] <SecureString>[ [-Credential] <PSCredential>] [-ApplianceConnection] <Object> [<CommonParameters>]
Set-HPOVLdapGroupRole [-InputObject] <Object> [-Roles] <Array>[ [-ScopePermissions] <Array>] [-UserName] <String> [-Password] <SecureString>[ [-Credential] <PSCredential>] [-ApplianceConnection] <Object> [<CommonParameters>]
Set-HPOVLdapGroupRole [-InputObject] <Object>[ [-ScopePermissions] <Array>] [-UserName] <String> [-Password] <SecureString>[ [-Credential] <PSCredential>] [-ApplianceConnection] <Object> [<CommonParameters>]

Detailed Description

Changes current roles of an LDAP Group with a given set of roles. You must provide the list of all roles the LDAP Group should be set to, and not a subset of roles.

Parameters

-ApplianceConnection <Object>

Aliases [-Appliance]

Specify one or more HPOneView.Appliance.Connection object(s) or Name property value(s).

Default Value: ${Global:ConnectedSessions} | ? Default

Aliases Appliance
Required? true
Position? named
Default value (${Global:ConnectedSessions} | ? Default)
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters?    False

-Credential <PSCredential>

Use this parameter if you want to provide a PSCredential object instead.

Aliases None
Required? False
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters?    False

-InputObject <Object>

Aliases [-g, -GroupName, -Group]

Directroy Group to add.

Aliases g, name, GroupName, Group
Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters?    False

-Password <SecureString>

Aliases [-p]

Directory User account password

Aliases p
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters?    False

-Roles <Array>

Aliases [-r, -role] The role(s) to assign to the Directroy Group, in System.Collections.ArrayList format. Accepted values are noted within the ApplianceRoles property of the HPOneView.Appliance.Connection object stored in the $Global:ConnectedSessions variable.

Example: $roles = "Server administrator","Network administrator"

Aliases r, role
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters?    False

-ScopePermissions <Array>

Array collection of Hashtable<Role; Scope>. Will overwrite existing scope to role mappings. To indiate all resouroures, use 'All' as the value.

Example: -ScopePermissions @{Role = "Network administrator"; Scope = (Get-HPOVScope -Name CorpNetAdmins -ErrorAction Stop) }

Aliases None
Required? False
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters?    False

-UserName <String>

Aliases [-u]

Directory Username to authenticate with

Aliases u
Required? true
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 (http://go.microsoft.com/fwlink/?LinkID=113216)

Input Types

System.SecureString

Directory User Account password

Return Values

System.Management.Automation.PSCustomObject

Updated LDAP Group object with new role assignment(s)

Examples

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

Set-HPOVLdapGroupRole -d Domain1 -GroupName "MY Directory Group1" -roles "Server administrator" -u "Sarah Peterson"

Add "MY Directory Group1" from Domain1 with Server Administrator role and prompt for password for group validation.

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

$roles = "Server administrator","Backup administrator" $password = convertto-SecureString -asplaintext "password123890" -force Set-HPOVLdapGroupRole -d Domain1 -GroupName "MY Directory Group1" -roles $roles -u "Sarah Peterson" -p $password

Set "MY Directory Group1" from Domain1 with Server and Backup administrator roles, and specify password for group validation.

 -------------------------- EXAMPLE 3 --------------------------

$LdapDirectoryName = "CorpDomain" $MyAdCreds = Get-Credential Get-HPOVLdapGroup -Group $CorpNetworkAdmins -ErrorAction Stop | ? loginDomain -eq $LdapDirectoryName | Set-HPOVLdapGroupRole -ScopePermissions @{Role = "Network administrator"; Scope = $NewSBACScope } -Credential $MyAdCreds

Change the Scope permissions for the specified authentication directory group.

 -------------------------- EXAMPLE 4 --------------------------

$scope = Get-HPOVScope -Name $scopename $ScopePermissions = @{ Role = "Server administrator"; Scope = $scope } Get-HPOVLdapGroup -Name $scopename | Set-HPOVLdapGroupRole -ScopePermissions $ScopePermissions -Roles "Software administrator" -Credential $MyAdCreds

Change the Scope permissions for the specified authentication directory group by using both ScopePermissions and Roles parameters.

Related Links


HPE OneView 4.00 Library

Set-HPOVLdapGroupRole

Assign or change roles for LDAP Groups.

SYNTAX

Set-HPOVLdapGroupRole [-InputObject] <Object> [-Roles] <Array> [-UserName] <String> [-Password] <SecureString>[ [-Credential] <PSCredential>] [-ApplianceConnection] <Object> [<CommonParameters>]
Set-HPOVLdapGroupRole [-InputObject] <Object> [-Roles] <Array>[ [-ScopePermissions] <Array>] [-UserName] <String> [-Password] <SecureString>[ [-Credential] <PSCredential>] [-ApplianceConnection] <Object> [<CommonParameters>]
Set-HPOVLdapGroupRole [-InputObject] <Object>[ [-ScopePermissions] <Array>] [-UserName] <String> [-Password] <SecureString>[ [-Credential] <PSCredential>] [-ApplianceConnection] <Object> [<CommonParameters>]

Detailed Description

Changes current roles of an LDAP Group with a given set of roles. You must provide the list of all roles the LDAP Group should be set to, and not a subset of roles.

Parameters

-ApplianceConnection <Object>

Aliases [-Appliance]

Specify one or more HPOneView.Appliance.Connection object(s) or Name property value(s).

Default Value: ${Global:ConnectedSessions} | ? Default

Aliases Appliance
Required? true
Position? named
Default value (${Global:ConnectedSessions} | ? Default)
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters?    False

-Credential <PSCredential>

Use this parameter if you want to provide a PSCredential object instead.

Aliases None
Required? False
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters?    False

-InputObject <Object>

Aliases [-g, -GroupName, -Group]

Directroy Group to add.

Aliases g, name, GroupName, Group
Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters?    False

-Password <SecureString>

Aliases [-p]

Directory User account password

Aliases p
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters?    False

-Roles <Array>

Aliases [-r, -role] The role(s) to assign to the Directroy Group, in System.Collections.ArrayList format. Accepted values are noted within the ApplianceRoles property of the HPOneView.Appliance.Connection object stored in the $Global:ConnectedSessions variable.

Example: $roles = "Server administrator","Network administrator"

Aliases r, role
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters?    False

-ScopePermissions <Array>

Array collection of Hashtable<Role; Scope>. Will overwrite existing scope to role mappings.

Example: -ScopePermissions @{Role = 'Network administrator'; Scope = (Get-HPOVScope -Name CorpNetAdmins -ErrorAction Stop) }

Aliases None
Required? False
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters?    False

-UserName <String>

Aliases [-u]

Directory Username to authenticate with

Aliases u
Required? true
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 (http://go.microsoft.com/fwlink/?LinkID=113216)

Input Types

System.SecureString

Directory User Account password

Return Values

System.Management.Automation.PSCustomObject

Updated LDAP Group object with new role assignment(s)

Examples

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

Set-HPOVLdapGroupRole -d Domain1 -GroupName "MY Directory Group1" -roles "Server administrator" -u 'Sarah Peterson'

Add "MY Directory Group1" from Domain1 with Server Administrator role and prompt for password for group validation.

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

$roles = "Server administrator","Backup administrator" $password = convertto-SecureString -asplaintext "password123890" -force Set-HPOVLdapGroupRole -d Domain1 -GroupName "MY Directory Group1" -roles $roles -u 'Sarah Peterson' -p $password

Set "MY Directory Group1" from Domain1 with Server and Backup administrator roles, and specify password for group validation.

 -------------------------- EXAMPLE 3 --------------------------

$LdapDirectoryName = 'CorpDomain' $MyAdCreds = Get-Credential Get-HPOVLdapGroup -Group $CorpNetworkAdmins -ErrorAction Stop | ? loginDomain -eq $LdapDirectoryName | Set-HPOVLdapGroupRole -ScopePermissions @{Role = 'Network administrator'; Scope = $NewSBACScope } -Credential $MyAdCreds

Change the Scope permissions for the specified authentication directory group.

Related Links


Wiki Table of Contents

Clone this wiki locally