Add-MgmtSvcResourceProviderConfiguration
Adds a resource provider to Windows Azure Pack.
Syntax
Add-MgmtSvcResourceProviderConfiguration
[-ResourceProvider] <ResourceProvider>
[-ConnectionString <String>]
[-EncryptionKey <String>]
[-EncryptionAlgorithm <String>]
[-Force]
[-As <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Add-MgmtSvcResourceProviderConfiguration cmdlet adds a resource provider to Windows Azure Pack for Windows Server. You can run this cmdlet from any computer in the deployment. If you run this cmdlet on the computer on which the Admin API service is installed and the Web.config file contains values for ConnectionString, EncryptionKey, and EncryptionAlgorithm, then those values are used.
Examples
Example 1: Add a resource provider
PS C:\> $ConnectionString = ""
PS C:\> $EncryptionKey = "D576FCB3740049D44183C8BD6AB7979FB68DF253A1AFAB1BEDD987907358397D"
PS C:\> $EncryptionAlgorithm = "AES"
PS C:\> $UserName = "PattiFuller"
PS C:\> $Password = "passw0rd"
PS C:\> $RP = New-MgmtSvcResourceProviderConfiguration -Name 'RP01' `
-DisplayName 'Resource Provider 01' `
-AdminForwardingAddress "https://$Env:ComputerName`:30010/" `
-AdminAuthenticationMode 'Basic' `
-AdminAuthenticationUserName $UserName `
-AdminAuthenticationPassword $Password `
-TenantForwardingAddress "https://$Env:ComputerName`:30010/subscriptions" `
-TenantAuthenticationMode 'Basic' `
-TenantAuthenticationUserName $UserName `
-TenantAuthenticationPassword $Password `
-TenantSourceUriTemplate '{subid}/services/sqlservers/{*path}' `
-TenantTargetUriTemplate '{subid}/{*path}' `
-UsageForwardingAddress "https://$Env:ComputerName`:30010/" `
-UsageAuthenticationMode 'Basic' `
-UsageAuthenticationUserName $UserName `
-UsageAuthenticationPassword $Password `
-NotificationForwardingAddress "https://$Env:ComputerName`:30010/" `
-NotificationAuthenticationMode 'Basic' `
-NotificationAuthenticationUserName $UserName `
-NotificationAuthenticationPassword $Password
PS C:\> Add-MgmtSvcResourceProviderConfiguration -ResourceProvider $RP
The first five commands set variables to use when creating a new resource provider.
The sixth command creates a resource provider and stores the resulting resource provider object in the $RP variable. For information about creating a resource provider, see the New-MgmtSvcResourceProviderConfiguration cmdlet.
The last command adds the resource provider stored in $RP.
Parameters
-As
Specifies an output format.
Type: | String |
Accepted values: | Xml, XDocument, XmlString |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ConnectionString
Specifies an SQL connection string.
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 |
-Force
Updates an existing resource provider when one is found with the same name and instance ID of the one provided with this cmdlet. If there is no existing resource provider with the provided name and instance ID, then the resource provider is added, and this parameter is ignored.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceProvider
Specifies a resource provider.
Type: | ResourceProvider |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |