Update-SCSMSubscription
Service Manager에서 구독 속성을 업데이트합니다.
Syntax
Update-SCSMSubscription
[-Subscription] <Subscription[]>
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Update-SCSMSubscription cmdlet은 Service Manager 구독 속성을 업데이트합니다.
예제
예제 1: 구독에 대한 전자 메일 템플릿 업데이트
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
다음은 Subscription01이라는 구독에 사용되는 전자 메일 템플릿을 업데이트하고 woodgrove 관리자를 받는 사람 목록에 추가하는 예제입니다. 첫 번째 명령은 Get-SCSMsubscription을 사용하여 업데이트되는 구독을 표시합니다.
매개 변수
-Confirm
cmdlet을 실행하기 전에 확인을 요청합니다.
Type: | System.Management.Automation.SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PassThru
이 cmdlet이 업데이트하는 구독을 반환한다는 것을 나타냅니다. 이 개체를 다른 cmdlet에 전달할 수 있습니다.
Type: | SwitchParameterSystem.Management.Automation.SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Subscription
이 cmdlet이 업데이트하는 구독을 지정합니다. 구독을 가져오려면 Get-SCSMSubscription cmdlet을 사용합니다.
Type: | Microsoft.EnterpriseManagement.ServiceManager.Sdk.Notifications.Subscriptions.Subscription[] |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
cmdlet을 실행할 경우 발생하는 일을 표시합니다. cmdlet은 실행되지 않습니다.
Type: | System.Management.Automation.SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
입력
Microsoft.EnterpriseManagement.ServiceManager.Sdk.Notifications.Subscriptions.Subscription
구독 매개 변수에 구독을 파이프할 수 있습니다.
출력
None.
이 cmdlet은 어떠한 출력도 생성하지 않습니다.