Remove-MgmtSvcAdminUser

Removes an administrative principal from the database.

Syntax

Remove-MgmtSvcAdminUser [-Principal] <String> [-Confirm] [-ConnectionString <String>]
 [-EncryptionAlgorithm <String>] [-EncryptionKey <String>] [-WhatIf] [<CommonParameters>]
Remove-MgmtSvcAdminUser [-Principal] <String> [-Confirm] [-Database <String>] [-EncryptionAlgorithm <String>]
 [-EncryptionKey <String>] [-Password <String>] [-Server <String>] [-UserName <String>] [-WhatIf]
 [<CommonParameters>]

Description

The Remove-MgmgSvcAdminUser cmdlet removes 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 EncrptionKey and EncryptionAlgorithm, then those values are used.

Examples

Example 1: Remove a principal by using a connection string

PS C:\> Remove-MgmtSvcAdminUser -Principal "PattiFuller@Contoso.com" -ConnectionString 'Server=.\sqlexpress;Initial Catalog=Contoso.MgmtSvc.Store;User Id=sa;Password=PassWord;'
This command removes the principal named Patti Fuller by using a connection string to connect to the database.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

-ConnectionString

Specifies an SQL connection string.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Database

Specifies a database name.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-EncryptionAlgorithm

Specifies an encryption algorithm.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-EncryptionKey

Specifies an encryption key, as a hexadecimal string.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Password

Specifies a password.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Principal

Specifies an administrative user or group.

Type:String
Required:True
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

-Server

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

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-UserName

Specifies the name of a user account.

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs.
The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False