@@ -25,13 +25,13 @@ Get-AzSubscriptionAcceptOwnershipStatus -SubscriptionId XXXXXXXX-XXXX-XXXX-XXXX-
25
25
. Inputs
26
26
Microsoft.Azure.PowerShell.Cmdlets.Subscription.Models.ISubscriptionIdentity
27
27
. Outputs
28
- Microsoft.Azure.PowerShell.Cmdlets.Subscription.Models.Api20211001. IAcceptOwnershipStatusResponse
28
+ Microsoft.Azure.PowerShell.Cmdlets.Subscription.Models.IAcceptOwnershipStatusResponse
29
29
. Notes
30
30
COMPLEX PARAMETER PROPERTIES
31
31
32
32
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
33
33
34
- INPUTOBJECT <ISubscriptionIdentity>: Identity Parameter
34
+ INPUTOBJECT <ISubscriptionIdentity>: Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
35
35
[AliasName <String>]: AliasName is the name for the subscription creation request. Note that this is not the same as subscription name and this doesn’t have any other lifecycle need beyond the request for subscription creation.
36
36
[BillingAccountId <String>]: Billing Account Id.
37
37
[Id <String>]: Resource identity path
@@ -41,7 +41,7 @@ INPUTOBJECT <ISubscriptionIdentity>: Identity Parameter
41
41
https://learn.microsoft.com/powershell/module/az.subscription/get-azsubscriptionacceptownershipstatus
42
42
#>
43
43
function Get-AzSubscriptionAcceptOwnershipStatus {
44
- [OutputType ([Microsoft.Azure.PowerShell.Cmdlets.Subscription.Models.Api20211001. IAcceptOwnershipStatusResponse ])]
44
+ [OutputType ([Microsoft.Azure.PowerShell.Cmdlets.Subscription.Models.IAcceptOwnershipStatusResponse ])]
45
45
[CmdletBinding (DefaultParameterSetName = ' AcceptExpanded' , PositionalBinding = $false )]
46
46
param (
47
47
[Parameter (ParameterSetName = ' AcceptExpanded' , Mandatory )]
@@ -113,6 +113,15 @@ begin {
113
113
$PSBoundParameters [' OutBuffer' ] = 1
114
114
}
115
115
$parameterSet = $PSCmdlet.ParameterSetName
116
+
117
+ $testPlayback = $false
118
+ $PSBoundParameters [' HttpPipelinePrepend' ] | Foreach-Object { if ($_ ) { $testPlayback = $testPlayback -or (' Microsoft.Azure.PowerShell.Cmdlets.Subscription.Runtime.PipelineMock' -eq $_.Target.GetType ().FullName -and ' Playback' -eq $_.Target.Mode ) } }
119
+
120
+ $context = Get-AzContext
121
+ if (-not $context -and -not $testPlayback ) {
122
+ Write-Error " No Azure login detected. Please run 'Connect-AzAccount' to log in."
123
+ exit
124
+ }
116
125
117
126
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet ]::PowerShellVersion) {
118
127
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet ]::PowerShellVersion = $PSVersionTable.PSVersion.ToString ()
@@ -142,6 +151,9 @@ begin {
142
151
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet ]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name )
143
152
}
144
153
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand (($mapping [$parameterSet ]), [System.Management.Automation.CommandTypes ]::Cmdlet)
154
+ if ($wrappedCmd -eq $null ) {
155
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand (($mapping [$parameterSet ]), [System.Management.Automation.CommandTypes ]::Function)
156
+ }
145
157
$scriptCmd = {& $wrappedCmd @PSBoundParameters }
146
158
$steppablePipeline = $scriptCmd.GetSteppablePipeline ($MyInvocation.CommandOrigin )
147
159
$steppablePipeline.Begin ($PSCmdlet )
0 commit comments