@@ -181,7 +181,7 @@ function Set-AzsRegistration{
181181 ' CustomCloud' = ' westcentralus' }[$AzureContext.Environment.Name ],
182182
183183 [Parameter (Mandatory = $false )]
184- [ValidateSet (' Capacity' , ' PayAsYouUse' , ' Development' )]
184+ [ValidateSet (' Capacity' , ' PayAsYouUse' , ' Development' , ' Custom ' )]
185185 [string ] $BillingModel = ' Development' ,
186186
187187 [Parameter (Mandatory = $false )]
@@ -192,7 +192,11 @@ function Set-AzsRegistration{
192192
193193 [Parameter (Mandatory = $false )]
194194 [ValidateNotNull ()]
195- [string ] $AgreementNumber
195+ [string ] $AgreementNumber ,
196+
197+ [Parameter (Mandatory = $false )]
198+ [ValidateNotNull ()]
199+ [string ] $MsAssetTag
196200 )
197201 # requires -Version 4.0
198202 # requires -Modules @ {ModuleName = " AzureRM.Profile" ; ModuleVersion = " 1.0.4.4" }
@@ -222,6 +226,7 @@ function Set-AzsRegistration{
222226 MarketplaceSyndicationEnabled = $MarketplaceSyndicationEnabled
223227 UsageReportingEnabled = $UsageReportingEnabled
224228 AgreementNumber = $AgreementNumber
229+ MsAssetTag = $MsAssetTag
225230 }
226231 Log- Output " Get-RegistrationToken parameters: $ ( ConvertTo-Json $getTokenParams ) "
227232 if (($BillingModel -eq ' Capacity' ) -and ($UsageReportingEnabled ))
@@ -456,7 +461,7 @@ Function Get-AzsRegistrationToken{
456461 [String ] $PrivilegedEndpoint ,
457462
458463 [Parameter (Mandatory = $true )]
459- [ValidateSet (' Capacity' , ' Development' )]
464+ [ValidateSet (' Capacity' , ' Development' , ' Custom ' )]
460465 [string ] $BillingModel = ' Capacity' ,
461466
462467 [Parameter (Mandatory = $false )]
@@ -471,7 +476,11 @@ Function Get-AzsRegistrationToken{
471476
472477 [Parameter (Mandatory = $false )]
473478 [ValidateNotNull ()]
474- [string ] $AgreementNumber
479+ [string ] $AgreementNumber ,
480+
481+ [Parameter (Mandatory = $false )]
482+ [ValidateNotNull ()]
483+ [string ] $MsAssetTag
475484 )
476485 # requires -Version 4.0
477486 # requires -RunAsAdministrator
@@ -516,6 +525,7 @@ Function Get-AzsRegistrationToken{
516525 UsageReportingEnabled = $UsageReportingEnabled
517526 AgreementNumber = $AgreementNumber
518527 TokenOutputFilePath = $TokenOutputFilePath
528+ MsAssetTag = $MsAssetTag
519529 }
520530
521531 Log- Output " Registration action params: $ ( ConvertTo-Json $params ) "
@@ -1046,7 +1056,7 @@ Function Get-RegistrationToken{
10461056 [String ] $PrivilegedEndpoint ,
10471057
10481058 [Parameter (Mandatory = $false )]
1049- [ValidateSet (' Capacity' , ' PayAsYouUse' , ' Development' )]
1059+ [ValidateSet (' Capacity' , ' PayAsYouUse' , ' Development' , ' Custom ' )]
10501060 [string ] $BillingModel = ' Development' ,
10511061
10521062 [Parameter (Mandatory = $false )]
@@ -1066,7 +1076,11 @@ Function Get-RegistrationToken{
10661076 [PSObject ] $StampInfo ,
10671077
10681078 [Parameter (Mandatory = $false )]
1069- [String ] $TokenOutputFilePath
1079+ [String ] $TokenOutputFilePath ,
1080+
1081+ [Parameter (Mandatory = $false )]
1082+ [ValidateNotNull ()]
1083+ [string ] $MsAssetTag
10701084 )
10711085
10721086 if (-not $StampInfo )
@@ -1082,7 +1096,7 @@ Function Get-RegistrationToken{
10821096 try
10831097 {
10841098 Log- Output " Creating registration token. Attempt $currentAttempt of $maxAttempt "
1085- $registrationToken = Invoke-Command - Session $session - ScriptBlock { New-RegistrationToken - BillingModel $using :BillingModel - MarketplaceSyndicationEnabled:$using :MarketplaceSyndicationEnabled - UsageReportingEnabled:$using :UsageReportingEnabled - AgreementNumber $using :AgreementNumber }
1099+ $registrationToken = Invoke-Command - Session $session - ScriptBlock { New-RegistrationToken - BillingModel $using :BillingModel - MarketplaceSyndicationEnabled:$using :MarketplaceSyndicationEnabled - UsageReportingEnabled:$using :UsageReportingEnabled - AgreementNumber $using :AgreementNumber - MsAssetTag $ using :MsAssetTag }
10861100 if ($TokenOutputFilePath )
10871101 {
10881102 Log- Output " Registration token will be written to: $TokenOutputFilePath "
0 commit comments