NAME
Add-DcsUserOwnership
SYNOPSIS
Assigns ownership of a virtual disk to a user.
SYNTAX
Add-DcsUserOwnership -User <Object> -Object <Object> [ -Connection <String> ] [ -PipelineVariable <String> ]
DESCRIPTION
Assigns ownership of a virtual disk to a user. Ownership of a virtual disk grants the user authorization to perform operations on the virtual disk.
PARAMETERS
- -User<Object>
- UserData object or ID that identifies the user. The object and ID can be obtained from Get-DcsUser.
-
- Required: true
- Position: 1
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -Object<Object>
- The VirtualDiskData object or ID the identifies the virtual disk in the configuration. The object or ID can be obtained from the cmdlet Get-DcsVirtualDisk.
-
- Required: true
- Position: 2
- Default value:
- Accept pipeline input: true (ByValue)
- Accept wildcard characters: false
-
- -Connection<String>
- Alias of the connection to the server group. If not specified, the default connection is used.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -PipelineVariable<String>
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
INPUTS
VirtualDiskData : Object that identifies and describes a virtual disk.
OUTPUTS
OwnershipData : Object that identifies and describes an ownership relationship between a user and a virtual disk.
NOTES
Also see Get-DcsUserOwnership, Remove-DcsUserOwnership, Get-DcsVirtualDisk, Get-DcsUser.
EXAMPLES
Get-DcsVirtualDisk -VirtualDisk "Virtual disk 1" | Add-DcsUserOwnership -User (Get-DcsUser -User "JSchmoe")
This example assigns ownership of "Virtual disk 1" to the user named "JSchmoe". The value for the parameter Object is obtained from the Get-DcsVirtualDisk cmdlet with the name of the virtual disk. The VirtualDiskData object is piped to the Add-DcsUserOwnership cmdlet. The value for the parameter User is obtained from the cmdlet Get-DcsUser to get the UserData object for the user named "Schmoe" The OwnershipData object is returned.
UserId | : | 39cb3daf-5d18-42ba-a3a9-13e5c3782c8a |
IdentifiableId | : | a354eee825cb408a9a4858323d301ae3 |
Sequencenumber | : | 4102 |
Id | : | 9f9332a1-675c-4786-b570-f953bd45dbe9 |
Caption | : | |
ExtendedCaption | : | |
Internal | : | False |
Add-DcsUserOwnership -User (Get-DcsUser -User "JSchmoe").Id -Object (Get-DcsVirtualDisk -VirtualDisk "Virtual disk 2").Id
This example assigns ownership of "Virtual disk 2" to the user named "JSchmoe".
The ID value for the parameter User is obtained from the UserData object returned from the cmdlet Get-DcsUser for the user named "Schmoe" The ID value for the parameter Object is obtained from the VirtualDiskData object returned from the Get-DcsVirtualDisk cmdlet for "Virtual disk 2". The OwnershipData object is returned.
UserId | : | 39cb3daf-5d18-42ba-a3a9-13e5c3782c8a |
IdentifiableId | : | 704da63e20ad4eaaa9e4701bb7bc5fbc |
Sequencenumber | : | 4104 |
Id | : | 97404981-9e0d-48bd-8ed8-5994f753125e |
Caption | : | |
ExtendedCaption | : | |
Internal | : | False |