@@ -29,7 +29,7 @@ Get-AzMixedRealityRemoteRenderingAccount -ResourceGroupName azps_test_group -Nam
29
29
. Inputs
30
30
Microsoft.Azure.PowerShell.Cmdlets.MixedReality.Models.IMixedRealityIdentity
31
31
. Outputs
32
- Microsoft.Azure.PowerShell.Cmdlets.MixedReality.Models.Api20210301Preview. IRemoteRenderingAccount
32
+ Microsoft.Azure.PowerShell.Cmdlets.MixedReality.Models.IRemoteRenderingAccount
33
33
. Notes
34
34
COMPLEX PARAMETER PROPERTIES
35
35
@@ -45,7 +45,7 @@ INPUTOBJECT <IMixedRealityIdentity>: Identity Parameter
45
45
https://learn.microsoft.com/powershell/module/az.mixedreality/get-azmixedrealityremoterenderingaccount
46
46
#>
47
47
function Get-AzMixedRealityRemoteRenderingAccount {
48
- [OutputType ([Microsoft.Azure.PowerShell.Cmdlets.MixedReality.Models.Api20210301Preview. IRemoteRenderingAccount ])]
48
+ [OutputType ([Microsoft.Azure.PowerShell.Cmdlets.MixedReality.Models.IRemoteRenderingAccount ])]
49
49
[CmdletBinding (DefaultParameterSetName = ' List' , PositionalBinding = $false )]
50
50
param (
51
51
[Parameter (ParameterSetName = ' Get' , Mandatory )]
76
76
[Microsoft.Azure.PowerShell.Cmdlets.MixedReality.Category (' Path' )]
77
77
[Microsoft.Azure.PowerShell.Cmdlets.MixedReality.Models.IMixedRealityIdentity ]
78
78
# Identity Parameter
79
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
80
79
${InputObject} ,
81
80
82
81
[Parameter ()]
@@ -135,6 +134,15 @@ begin {
135
134
$PSBoundParameters [' OutBuffer' ] = 1
136
135
}
137
136
$parameterSet = $PSCmdlet.ParameterSetName
137
+
138
+ $testPlayback = $false
139
+ $PSBoundParameters [' HttpPipelinePrepend' ] | Foreach-Object { if ($_ ) { $testPlayback = $testPlayback -or (' Microsoft.Azure.PowerShell.Cmdlets.MixedReality.Runtime.PipelineMock' -eq $_.Target.GetType ().FullName -and ' Playback' -eq $_.Target.Mode ) } }
140
+
141
+ $context = Get-AzContext
142
+ if (-not $context -and -not $testPlayback ) {
143
+ Write-Error " No Azure login detected. Please run 'Connect-AzAccount' to log in."
144
+ exit
145
+ }
138
146
139
147
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet ]::PowerShellVersion) {
140
148
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet ]::PowerShellVersion = $PSVersionTable.PSVersion.ToString ()
@@ -159,9 +167,7 @@ begin {
159
167
List = ' Az.MixedReality.private\Get-AzMixedRealityRemoteRenderingAccount_List' ;
160
168
List1 = ' Az.MixedReality.private\Get-AzMixedRealityRemoteRenderingAccount_List1' ;
161
169
}
162
- if ((' Get' , ' List' , ' List1' ) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey (' SubscriptionId' )) {
163
- $testPlayback = $false
164
- $PSBoundParameters [' HttpPipelinePrepend' ] | Foreach-Object { if ($_ ) { $testPlayback = $testPlayback -or (' Microsoft.Azure.PowerShell.Cmdlets.MixedReality.Runtime.PipelineMock' -eq $_.Target.GetType ().FullName -and ' Playback' -eq $_.Target.Mode ) } }
170
+ if ((' Get' , ' List' , ' List1' ) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey (' SubscriptionId' ) ) {
165
171
if ($testPlayback ) {
166
172
$PSBoundParameters [' SubscriptionId' ] = . (Join-Path $PSScriptRoot ' ..' ' utils' ' Get-SubscriptionIdTestSafe.ps1' )
167
173
} else {
@@ -175,6 +181,9 @@ begin {
175
181
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet ]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name )
176
182
}
177
183
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand (($mapping [$parameterSet ]), [System.Management.Automation.CommandTypes ]::Cmdlet)
184
+ if ($wrappedCmd -eq $null ) {
185
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand (($mapping [$parameterSet ]), [System.Management.Automation.CommandTypes ]::Function)
186
+ }
178
187
$scriptCmd = {& $wrappedCmd @PSBoundParameters }
179
188
$steppablePipeline = $scriptCmd.GetSteppablePipeline ($MyInvocation.CommandOrigin )
180
189
$steppablePipeline.Begin ($PSCmdlet )
0 commit comments