@@ -264,18 +264,6 @@ enum ImdsAttestationNodeStatus
264
264
Expired;
265
265
Error;
266
266
}
267
- class AzStackHCIImdsStatus
268
- {
269
- [string ] $ComputerName
270
- [ImdsAttestationNodeStatus ] $Status
271
- [System.Nullable [DateTime ]] $Expiration
272
- AzStackHCIImdsStatus([PSObject ]$other )
273
- {
274
- $this.ComputerName = $other.ComputerName
275
- $this.Status = $other.Status
276
- $this.Expiration = $other.Expiration
277
- }
278
- }
279
267
280
268
$registerArcScript = {
281
269
try
@@ -3819,9 +3807,13 @@ param(
3819
3807
3820
3808
$firewallRule = Invoke-Command @SessionParams - ScriptBlock { param ($ruleName ) Enable-NetFirewallRule - Name $ruleName } - ArgumentList $TemplateHostImdsParams [" NetFirewallRuleName" ]
3821
3809
3822
- $nodeAttestation = [ AzStackHCIImdsStatus ] (Invoke-Command @SessionParams - ScriptBlock { Get-AzureStackHCIAttestation })
3810
+ $nodeAttestation = (Invoke-Command @SessionParams - ScriptBlock { Get-AzureStackHCIAttestation })
3823
3811
3824
- $enableImdsOutputList.Add ($nodeAttestation ) | Out-Null
3812
+ $enableImdsOutput = New-Object - TypeName PSObject
3813
+ $enableImdsOutput | Add-Member - MemberType NoteProperty - Name ComputerName - Value ($nodeAttestation.ComputerName )
3814
+ $enableImdsOutput | Add-Member - MemberType NoteProperty - Name Status - Value ([ImdsAttestationNodeStatus ]($nodeAttestation.Status ))
3815
+ $enableImdsOutput | Add-Member - MemberType NoteProperty - Name Expiration - Value ($nodeAttestation.Expiration )
3816
+ $enableImdsOutputList.Add ($enableImdsOutput ) | Out-Null
3825
3817
}
3826
3818
elseif ($WhatIfPreference.IsPresent )
3827
3819
{
@@ -4051,8 +4043,12 @@ param(
4051
4043
4052
4044
Invoke-Command @SessionParams - ScriptBlock { param ($switchId ); Set-AzureStackHCIAttestation - SwitchId $switchId } - ArgumentList ([Guid ]::Empty) | Out-Null
4053
4045
4054
- $nodeAttestation = [AzStackHCIImdsStatus ] (Invoke-Command @SessionParams - ScriptBlock { Get-AzureStackHCIAttestation })
4055
- $disableImdsOutputList.Add ($nodeAttestation ) | Out-Null
4046
+ $nodeAttestation = (Invoke-Command @SessionParams - ScriptBlock { Get-AzureStackHCIAttestation })
4047
+ $disableImdsOutput = New-Object - TypeName PSObject
4048
+ $disableImdsOutput | Add-Member - MemberType NoteProperty - Name ComputerName - Value ($nodeAttestation.ComputerName )
4049
+ $disableImdsOutput | Add-Member - MemberType NoteProperty - Name Status - Value ([ImdsAttestationNodeStatus ]($nodeAttestation.Status ))
4050
+ $disableImdsOutput | Add-Member - MemberType NoteProperty - Name Expiration - Value ($nodeAttestation.Expiration )
4051
+ $disableImdsOutputList.Add ($disableImdsOutput ) | Out-Null
4056
4052
4057
4053
}
4058
4054
catch
0 commit comments