New-VBREntraIDUserCredentials
Short Description
Defines an object that matches a Microsoft Entra ID user and a password.
Applies to
Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License
Syntax
New-VBREntraIDUserCredentials -UserId <String> -Password <SecureString> [<CommonParameters>] |
Detailed Description
This cmdlet defines an object that matches an Entra ID user and a password. This object is used for the user restore using the Restore-VBREntraIDTenantItem cmdlet.
Parameters
Parameter | Description | Type | Required | Position | Accept |
---|---|---|---|---|---|
UserId | Specifies the ID of a user to whom you want to assign the password during further restore. | String | True | Named | False |
Password | Specifies a password. | SecureString | True | Named | False |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see Microsoft Docs.
Output Object
The cmdlet returns the VBREntraIDUserCredentials object that matches an Entra ID user and a password.
Examples
This example shows how to match a user with a password.
$session = Get-VBREntraIDTenantRestoreSession -Id "901e32ac-4c9e-4f7a-9b36-a4fd0f7248fe" $user = Get-VBREntraIDTenantItem -Backup $backup -Type User -Name "admin" $passwords = (Generate-VBREntraIDTenantUserPassword -Session $session -PasswordCount 3) | ConvertTo-SecureString -AsPlainText -Force $userPassword = New-VBREntraIDUserCredentials -UserId $user.Id -Password $passwords[0] |
Perform the following steps:
- Run the Get-VBREntraIDTenantRestoreSession cmdlet. Specify the Id parameter value. Save the result to the $session variable.
- Run the Get-VBREntraIDTenantItem cmdlet. Specify the following settings:
- Set the $backup variable as the Backup parameter value.
- Specify the Type and Name parameter values.
- Save the result to the $session variable.
- Run the Generate-VBREntraIDTenantUserPassword cmdlet. Specify the following settings:
- Set the $session variable as the Session parameter value.
- Specify the PasswordCount parameter value.
- Convert the result to the secure strings.
- Save the result to the $passwords variable.
- Run the New-VBREntraIDUserCredentials cmdlet. Specify the following settings:
- Set the $user.Id variable as the UserId parameter value.
- Set the $passwords[0] variable as the Password parameter value.
- Save the result to the $userPassword variable.
Related Commands