Update-SCSMSubscription
Aktualisierungen Abonnementeigenschaften in Service Manager.
Syntax
Update-SCSMSubscription
[-Subscription] <Subscription[]>
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Beschreibung
Das Cmdlet Update-SCSMSubscription aktualisiert abonnementeigenschaften in Service Manager.
Beispiele
Beispiel 1: Aktualisieren der E-Mail-Vorlage für ein Abonnement
PS C:\>Get-SCSMsubscription -DisplayName "Subscription01"
displayname description ManagementPack Enabled TimeAdded LastModified
----------- ----------- -------------- ------- --------- ------------
Subscription01 Just a description for a subscription subscriptionMP true 7/21/2010 9:10:29 PM 7/21/2010 9:10:29 PM
The second command gets the subscription that has the specified display name, and then stores it in the $Subscription variable. The third command gets the user class by using the Get-SCSMClass cmdlet, and then stores it in the $Class variable. The forth command gets an instance of the class in $Class by using the Get-SCSMClassInstance cmdlet. The command stores the instance in the $User variable. The fifth command adds a value to the **RecipientUsers** property of $Subscription. The final command updates the subscription to match the current value of $Subscription.
PS C:\>$Subscription = Get-SCSMsubscription -DisplayName "Subscription01"
PS C:\> $Subscription.Template = Get-SCSMEmailTemplate "Template2"
PS C:\> $Class = Get-SCCMClass -Name "System.Domain.User"
PS C:\> $User = Get-SCClassInstance -Class $Class -Filter "UserName -eq user"
PS C:\> $Subscription.RecipientUsers += $User.EnterpriseManagementObject
PS C:\> Update-SCSMSubscription -Subscription $Subscription
In diesem Beispiel wird die E-Mail-Vorlage aktualisiert, die mit dem Abonnement namens "Subscription01" verwendet wird, und fügt der Empfängerliste den Woodgrove-Administrator hinzu. Der erste Befehl zeigt das Abonnement an, das mithilfe von Get-SCSMsubscription aktualisiert wird.
Parameter
-Confirm
Hiermit werden Sie vor der Ausführung des Cmdlets zur Bestätigung aufgefordert.
Type: | System.Management.Automation.SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PassThru
Gibt an, dass dieses Cmdlet das Abonnement zurückgibt, das aktualisiert wird. Sie können dieses Objekt an andere Cmdlets übergeben.
Type: | SwitchParameterSystem.Management.Automation.SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Subscription
Gibt das Abonnement an, das dieses Cmdlet aktualisiert. Verwenden Sie zum Abrufen eines Abonnements das Cmdlet Get-SCSMSubscription.
Type: | Microsoft.EnterpriseManagement.ServiceManager.Sdk.Notifications.Subscriptions.Subscription[] |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
Zeigt, was geschieht, wenn das Cmdlet ausgeführt wird. Das Cmdlet wird nicht ausgeführt.
Type: | System.Management.Automation.SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Eingaben
Microsoft.EnterpriseManagement.ServiceManager.Sdk.Notifications.Subscriptions.Subscription
Sie können ein Abonnement an den Abonnementparameter übergeben.
Ausgaben
None.
Dieses Cmdlet generiert keine Ausgabe.