Get-MgmtSvcAdminUser

Get-MgmtSvcAdminUser

Gets an administrative principal from the database.

Syntax

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

Parameter Set: ConnectionString
Get-MgmtSvcAdminUser [[-Principal] <String[]> ] [-ConnectionString <String> ] [-EncryptionAlgorithm <String> ] [-EncryptionKey <String> ] [ <CommonParameters>]


 

Detailed Description

The Get-MgmtSvcAdminUser cmdlet gets an administrative user from the database.

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

You must use the Server, UserName, Password, and Database parameters, or a SQL connection string. If you specify a connection string by using the ConnectionString parameter, that value takes precedence over the Server, UserName, Password, and Database parameters.

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 name.

 

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?

false

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

true

 

-Server<String>

Specifies the name of the computer on which the SQL database resides.

 

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

 

-UserName<String>

Specifies the name of a user account.

 

Aliases

none

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

1: Get a principal by using a conection string

This command gets the principal named Patti Fuller by using a connection string to connect to the database.

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

 

Related topics

Add-MgmtSvcAdminUser

Remove-MgmtSvcAdminUser