Update-SCSMSubscription
Aggiorna le proprietà delle sottoscrizioni in Service Manager.
Sintassi
Update-SCSMSubscription
[-Subscription] <Subscription[]>
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Descrizione
Il cmdlet Update-SCSMSubscription aggiorna le proprietà della sottoscrizione in Service Manager.
Esempio
Esempio 1: Aggiornare il modello di posta elettronica per una sottoscrizione
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 questo esempio viene aggiornato il modello di posta elettronica usato con la sottoscrizione denominata Subscription01 e viene aggiunto l'amministratore woodgrove all'elenco dei destinatari. Il primo comando visualizza la sottoscrizione che viene aggiornata usando Get-SCSMsubscription.
Parametri
-Confirm
Richiede la conferma dell'utente prima di eseguire il cmdlet.
Type: | System.Management.Automation.SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PassThru
Indica che questo cmdlet restituisce la sottoscrizione che aggiorna. È possibile passare questo oggetto ad altri cmdlet.
Type: | SwitchParameterSystem.Management.Automation.SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Subscription
Specifica la sottoscrizione aggiornata da questo cmdlet. Per ottenere una sottoscrizione, usare il 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
Mostra l'esito in caso di esecuzione del cmdlet. Il cmdlet non viene eseguito.
Type: | System.Management.Automation.SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Input
Microsoft.EnterpriseManagement.ServiceManager.Sdk.Notifications.Subscriptions.Subscription
È possibile inviare tramite pipe una sottoscrizione al parametro Subscription .
Output
None.
Questo cmdlet non genera alcun output.