Adds SQL authentication credentials for a user to the database.
Syntax
Parameter Set: Default
Add-MgmtSvcDatabaseUser -Schema <String> -User <String>
-UserPassword <String> [-ConnectionString <String> ]
[-Database <String> ] [-Password <String> ] [-RoleName
<String> ] [-Server <String> ] [-UserName
<String> ] [-Confirm] [-WhatIf] [
<CommonParameters>]
The Add-MgmtSvcDatabaseUser cmdlet adds SQL authentication credentials for a specified user in the database. Specify the user name and password. You can also specify a user role for the account. Note that the Initialize-MgmtSvcFeature cmdlet adds the necessary users to Windows Azure Pack for Windows Server. You only need to use Add-MgmtSvcDatabaseUser to add 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.
Specifies an SQL connection string.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies a database name.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies a password.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the name of a role for the added account. Roles are used to grant or deny user access to datase objects. Roles and database access are specific to a schema.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies a schema.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
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 |
Specifies the user name of the principal. The cmdlet adds this account to the database for the specified schema.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the name of a user account.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies a password for the principal account specified by the User parameter. The cmdlet adds this account to the database for the specified schema.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Prompts you for confirmation before executing the command.
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
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 |
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
This command adds the user named user to the database named Contoso.MgmtSvc.Store for the schema SqlServer. The command specifies the computer that runs SQL Server. The command also specifies a password and the role DBO for the new user.
PS C:\> Add-MgmtSvcDatabaseUser -Schema "SqlServer" -User "user" -UserPassword "Sand3289" -RoleName "DBO" -Database "Contoso.MgmtSvc.Store" -Server "ContosoSQLServer"