Get-MgmtSvcAdminUser
Gets an administrative principal from the database.
Syntax
Get-MgmtSvcAdminUser
[[-Principal] <String[]>]
[-EncryptionKey <String>]
[-EncryptionAlgorithm <String>]
[-Database <String>]
[-Server <String>]
[-UserName <String>]
[-Password <String>]
[<CommonParameters>]
Get-MgmtSvcAdminUser
[[-Principal] <String[]>]
[-EncryptionKey <String>]
[-EncryptionAlgorithm <String>]
[-ConnectionString <String>]
[<CommonParameters>]
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.
Examples
Example 1: Get a principal by using a connection string
PS C:\> Get-MgmtSvcAdminUser -Principal "PattiFuller@Contoso.com" -ConnectionString 'Server=.\sqlexpress;Initial Catalog=Contoso.MgmtSvc.Store;User Id=sa;Password=PassWord;'
This command gets the principal named Patti Fuller by using a connection string to connect to the database.
Parameters
-ConnectionString
Specifies an SQL connection string.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Database
Specifies a database name.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EncryptionAlgorithm
Specifies an encryption algorithm.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EncryptionKey
Specifies an encryption key, as a hexadecimal string.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Password
Specifies a password.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Principal
Specifies an administrative user or group.
Type: | String[] |
Position: | 0 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Server
Specifies the name of the computer on which the SQL database resides.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-UserName
Specifies the name of a user account.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |