Set-MgmtSvcDatabaseUser

Set-MgmtSvcDatabaseUser

Modifies a principal user in the database.

Syntax

Parameter Set: Default
Set-MgmtSvcDatabaseUser -Schema <String> -User <String> -UserPassword <String> [-ConnectionString <String> ] [-Database <String> ] [-Password <String> ] [-Server <String> ] [-UserName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]


 

Detailed Description

The Set-MgmtSvcDatabaseUser cmdlet modifies a principal account in a schema in the database. You can use this cmdlet to reset the password for the user. The Initialize-MgmtSvcFeature cmdlet sets all of the required users for Windows Azure Pack for Windows Server. Therefore you only need to use this cmdlet to set additional users.

You can run this cmdlet from any computer in the deployment. However, this cmdlet assumes that the database is on the local computer. If the database is on another computer, 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

 

-Password<String>

Specifies a password.

 

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

 

-Schema<String>

Specifies a schema.

 

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

 

-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

 

-User<String>

Specifies the user name of a principal. The cmdlet modifies this account in the database for the specified schema.

 

Aliases

none

Required?

true

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

 

-UserPassword<String>

Specifies a password for the principal account specified by the User parameter. The cmdlet modifies this account in the database for the specified schema.

 

Aliases

none

Required?

true

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: Change password for a user

This command changes the password for a user named MgmtSvc-UsageCollector in the Usage schema.

PS C:\> Set-MgmtSvcDatabaseUser -Schema "Usage" -User "MgmtSvc-UsageCollector" -UserPassword "PassWord!" -ConnectionString 'Data Source=mysqlserver;Initial Catalog=Microsoft.MgmtSvc.Usage;User ID=SysAdmin;Password=Book67%&'

 

Related topics

Add-MgmtSvcDatabaseUser

Remove-MgmtSvcDatabaseUser