Add-MgmtSvcAdminUser

Add-MgmtSvcAdminUser

Adds an administrative principal to the database.

Syntax

Parameter Set: ConnectionParameters
Add-MgmtSvcAdminUser [-Principal] <String> [-Database <String> ] [-EncryptionAlgorithm <String> ] [-EncryptionKey <String> ] [-Password <String> ] [-Server <String> ] [-UserName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: ConnectionString
Add-MgmtSvcAdminUser [-Principal] <String> [-ConnectionString <String> ] [-EncryptionAlgorithm <String> ] [-EncryptionKey <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]


 

Detailed Description

The Add-MgmtSvcAdminUser cmdlet adds an administrative user or group to the database. The cmdlet grants the principal permissions to access the management portal for administrators and Windows Azure Pack administrator API.

If this cmdlet is run on the computer on which the Admin API service is installed and the Web.config file contains values for EncrptionKey and EncryptionAlgorithm, then those values are used.

Parameters

-ConnectionString<String>

Specifies an SQL connection string.

 

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

 

-Database<String>

Specifies a database. If a value is not provided for this parameter, the cmdlet uses the management database (Microsoft.MgmtSvc.Store).

 

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

 

-EncryptionAlgorithm<String>

Specifies an encryption algorithm.

 

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

 

-EncryptionKey<String>

Specifies an encryption key, as a hexadecimal string.

 

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

 

-Password<String>

Specifies a password.

 

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

 

-Principal<String>

Specifies an administrative user or group.

 

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

 

-Server<String>

Specifies a server. If a value is not provided for this parameter, the cmdlet uses localhost (or '.').

 

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

 

-UserName<String>

Specifies a user name. If a value is not provided for this parameter, the cmdlet uses integrated security.

 

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

 

-Confirm

Prompts you for confirmation before executing the command.

 

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

 

-WhatIf

Describes what would happen if you executed the command without actually executing the command.

 

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

 

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Examples

Example 1: Add a principal by using a connection string

This command adds the specified user as an administrative principal to the database. The command uses the specified connection string to connect to the database.

PS C:\> Add-MgmtSvcAdminUser -Principal "PattiFuller@Contoso.com" -ConnectionString 'Server=.\sqlexpress;Initial Catalog=Microsoft.MgmtSvc.Store;User Id=sa;Password=PassWord;'

 

Related topics

Get-MgmtSvcAdminUser

Remove-MgmtSvcAdminUser