Adds or updates a notification subscriber.
Syntax
Parameter Set: ByProperties
Set-MgmtSvcNotificationSubscriber -Endpoint <Uri> -Name
<String> [-AuthenticationMode {None | Basic} ]
[-AuthenticationPassword <String> ] [-AuthenticationUsername
<String> ] [-Enabled <Boolean> ] [-EncryptionAlgorithm
<String> ] [-EncryptionKey <String> ] [-Force]
[-SubscriberType {BillingService | MandatoryService |
OptionalService} ] [-Confirm] [-WhatIf] [
<CommonParameters>]
Parameter Set: ByObject
Set-MgmtSvcNotificationSubscriber [[-NotificationSubscriber]
<NotificationSubscriber> ] [-EncryptionAlgorithm
<String> ] [-EncryptionKey <String> ] [-Force]
[-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: ConnectionParameters
Set-MgmtSvcNotificationSubscriber -Endpoint <Uri> -Name
<String> [-AuthenticationMode {None | Basic} ]
[-AuthenticationPassword <String> ] [-AuthenticationUsername
<String> ] [-Database <String> ] [-Enabled
<Boolean> ] [-EncryptionAlgorithm <String> ]
[-EncryptionKey <String> ] [-Force] [-NotificationSubscriber
<NotificationSubscriber> ] [-Password <String> ]
[-Server <String> ] [-SubscriberType {BillingService |
MandatoryService | OptionalService} ] [-UserName <String> ]
[-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: ConnectionString
Set-MgmtSvcNotificationSubscriber -Endpoint <Uri> -Name
<String> [-AuthenticationMode {None | Basic} ]
[-AuthenticationPassword <String> ] [-AuthenticationUsername
<String> ] [-ConnectionString <String> ] [-Enabled
<Boolean> ] [-EncryptionAlgorithm <String> ]
[-EncryptionKey <String> ] [-Force] [-NotificationSubscriber
<NotificationSubscriber> ] [-SubscriberType {BillingService |
MandatoryService | OptionalService} ] [-Confirm] [-WhatIf] [
<CommonParameters>]
The Set-MgmtSvcNotificationSubscriber cmdlet adds or updates a notification subscriber. If the subscriber does not exist, the cmdlet adds a subscriber. To update an existing notification subscriber, use the Force parameter.
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.
This cmdlet also assumes that the usage service is installed on the local computer. If the usage service is installed on another computer, you must use the EncryptionKey and EncryptionAlgorithm parameters.
Specifies the authentication mode. Valid values for this parameter are:
-- None
-- Basic
-- Windows
The acceptable values for this parameter are:
None |
|
Basic |
|
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 a user name.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
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 |
Indicates whether the notification subscriber is enabled.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies an encryption algorithm.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies an encryption key, as a hexadecimal string.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies a URI for the notification subscriber.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Indicates that the cmdlet updates an existing subscriber.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the name of a notification subscriber.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies a notification subscriber object. To obtain a notification subscriber object, use the Get-MgmtSvcNotificationSubscriber cmdlet. If you specify a notification subscriber object, the cmdlet changes that object, regardless of the Name parameter.
Aliases |
none |
Required? |
false |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
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 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 a notification subscriber type. Valid values for this parameter are:
-- BillingService
-- MandatoryService
-- OptionalService
The acceptable values for this parameter are:
BillingService |
|
MandatoryService |
|
OptionalService |
|
Aliases |
none |
Required? |
false |
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 |
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 a notification subscriber to the database. The command specifies a name and subscriber type for the notification subscriber.
PS C:\> Set-MgmtSvcNotificationSubscriber -AuthenticationMode None -Enabled $False -Endpoint https://localhost/ -Name "Billing" -SubscriberType BillingService
The first command gets the notification subscriber named Billing and stores the object in the $Subscriber variable.
The second, third, and fourth commands make changes to the object stored in the $Subscriber variable.
The last command saves the modified notification subscriber object. Using the Force parameter indicates that the existing subscriber is updated.
PS C:\> $Subscriber = Get-MgmtSvcNotificationSubscriber -Name "Billing"PS C:\> $Subscriber.AuthenticationMode = 'Basic'PS C:\> $Subscriber.AuthenticationUsername = 'MyUser'PS C:\> $Subscriber.AuthenticationPassword = 'PassWord'PS C:\> Set-MgmtSvcNotificationSubscriber -NotificationSubscriber $Subscriber -Force
Get-MgmtSvcNotificationSubscriber
Remove-MgmtSvcNotificationSubscriber