Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/HewlettPackard/POSH-HPEOneView/llms.txt

Use this file to discover all available pages before exploring further.

Synopsis

Returns one or more scope objects from an HPE OneView appliance.

Syntax

Get-OVScope
    [-Name <String>]
    [-ApplianceConnection <Object>]
    [<CommonParameters>]

Description

Get-OVScope retrieves scope definitions from the appliance. Scopes are named collections of resources used to implement role-based access control at a granular level. By assigning a user a role within a specific scope, you restrict that role’s permissions to only the resources belonging to that scope. Scope objects returned by this cmdlet can be passed to New-OVUser or Set-OVUser via the -ScopePermissions parameter, and to Add-OVResourceToScope to manage scope membership. Wildcard characters (*) are supported in the Name parameter.

Parameters

Name
string
The name of the scope to retrieve. Supports wildcard characters (*). When omitted, all scopes are returned.
ApplianceConnection
Object
default:"Default connected session"
The appliance connection object or name. Defaults to the default connected session in $ConnectedSessions. Accepts an array of connections to query multiple appliances. Aliased as Appliance.

Examples

List all scopes

Get-OVScope
Returns every scope defined on the default connected appliance.

Get a specific scope by name

Get-OVScope -Name 'Production'
Returns the scope named Production.

Use a wildcard to find scopes by pattern

Get-OVScope -Name 'Prod*'
Returns all scopes whose names begin with Prod.

Get a scope to use in a permission assignment

$scope = Get-OVScope -Name 'Production'

$permissions = @(
    @{ Role = 'Server administrator'; Scope = $scope }
)

Set-OVUser -UserName 'jsmith' -ScopePermissions $permissions
Retrieves the Production scope and restricts jsmith’s Server administrator role to that scope.

Output

HPEOneView.Appliance.ScopeCollection Each returned object includes the following key properties:
PropertyTypeDescription
NameStringThe scope name.
DescriptionStringAn optional description.
MembersCollectionThe resources currently assigned to this scope.
UriStringThe REST URI for this scope resource.

Build docs developers (and LLMs) love