@@ -181,25 +181,18 @@ function Set-AzsRegistration{
181181 ' CustomCloud' = ' westcentralus' }[$AzureContext.Environment.Name ],
182182
183183 [Parameter (Mandatory = $false )]
184- [ValidateSet (' Capacity' , ' PayAsYouUse' , ' Development' , ' Custom ' )]
184+ [ValidateSet (' Capacity' , ' PayAsYouUse' , ' Development' )]
185185 [string ] $BillingModel = ' Development' ,
186186
187187 [Parameter (Mandatory = $false )]
188188 [switch ] $MarketplaceSyndicationEnabled = $true ,
189189
190190 [Parameter (Mandatory = $false )]
191- [switch ] $UsageReportingEnabled = @ {' Capacity' = $true ;
192- ' PayAsYouUse' = $true ;
193- ' Development' = $true ;
194- ' Custom' = $false }[$BillingModel ],
191+ [switch ] $UsageReportingEnabled = $true ,
195192
196193 [Parameter (Mandatory = $false )]
197194 [ValidateNotNull ()]
198- [string ] $AgreementNumber ,
199-
200- [Parameter (Mandatory = $false )]
201- [ValidateNotNull ()]
202- [string ] $MsAssetTag
195+ [string ] $AgreementNumber
203196 )
204197 # requires -Version 4.0
205198 # requires -Modules @ {ModuleName = " AzureRM.Profile" ; ModuleVersion = " 1.0.4.4" }
@@ -229,7 +222,6 @@ function Set-AzsRegistration{
229222 MarketplaceSyndicationEnabled = $MarketplaceSyndicationEnabled
230223 UsageReportingEnabled = $UsageReportingEnabled
231224 AgreementNumber = $AgreementNumber
232- MsAssetTag = $MsAssetTag
233225 }
234226 Log- Output " Get-RegistrationToken parameters: $ ( ConvertTo-Json $getTokenParams ) "
235227 if (($BillingModel -eq ' Capacity' ) -and ($UsageReportingEnabled ))
@@ -464,7 +456,7 @@ Function Get-AzsRegistrationToken{
464456 [String ] $PrivilegedEndpoint ,
465457
466458 [Parameter (Mandatory = $true )]
467- [ValidateSet (' Capacity' , ' Development' , ' Custom ' )]
459+ [ValidateSet (' Capacity' , ' Development' )]
468460 [string ] $BillingModel = ' Capacity' ,
469461
470462 [Parameter (Mandatory = $false )]
@@ -479,11 +471,7 @@ Function Get-AzsRegistrationToken{
479471
480472 [Parameter (Mandatory = $false )]
481473 [ValidateNotNull ()]
482- [string ] $AgreementNumber ,
483-
484- [Parameter (Mandatory = $false )]
485- [ValidateNotNull ()]
486- [string ] $MsAssetTag
474+ [string ] $AgreementNumber
487475 )
488476 # requires -Version 4.0
489477 # requires -RunAsAdministrator
@@ -528,7 +516,6 @@ Function Get-AzsRegistrationToken{
528516 UsageReportingEnabled = $UsageReportingEnabled
529517 AgreementNumber = $AgreementNumber
530518 TokenOutputFilePath = $TokenOutputFilePath
531- MsAssetTag = $MsAssetTag
532519 }
533520
534521 Log- Output " Registration action params: $ ( ConvertTo-Json $params ) "
@@ -1059,7 +1046,7 @@ Function Get-RegistrationToken{
10591046 [String ] $PrivilegedEndpoint ,
10601047
10611048 [Parameter (Mandatory = $false )]
1062- [ValidateSet (' Capacity' , ' PayAsYouUse' , ' Development' , ' Custom ' )]
1049+ [ValidateSet (' Capacity' , ' PayAsYouUse' , ' Development' )]
10631050 [string ] $BillingModel = ' Development' ,
10641051
10651052 [Parameter (Mandatory = $false )]
@@ -1079,11 +1066,7 @@ Function Get-RegistrationToken{
10791066 [PSObject ] $StampInfo ,
10801067
10811068 [Parameter (Mandatory = $false )]
1082- [String ] $TokenOutputFilePath ,
1083-
1084- [Parameter (Mandatory = $false )]
1085- [ValidateNotNull ()]
1086- [string ] $MsAssetTag
1069+ [String ] $TokenOutputFilePath
10871070 )
10881071
10891072 if (-not $StampInfo )
@@ -1099,7 +1082,7 @@ Function Get-RegistrationToken{
10991082 try
11001083 {
11011084 Log- Output " Creating registration token. Attempt $currentAttempt of $maxAttempt "
1102- $registrationToken = Invoke-Command - Session $session - ScriptBlock { New-RegistrationToken - BillingModel $using :BillingModel - MarketplaceSyndicationEnabled:$using :MarketplaceSyndicationEnabled - UsageReportingEnabled:$using :UsageReportingEnabled - AgreementNumber $using :AgreementNumber - MsAssetTag $ using :MsAssetTag }
1085+ $registrationToken = Invoke-Command - Session $session - ScriptBlock { New-RegistrationToken - BillingModel $using :BillingModel - MarketplaceSyndicationEnabled:$using :MarketplaceSyndicationEnabled - UsageReportingEnabled:$using :UsageReportingEnabled - AgreementNumber $using :AgreementNumber }
11031086 if ($TokenOutputFilePath )
11041087 {
11051088 Log- Output " Registration token will be written to: $TokenOutputFilePath "
0 commit comments