Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/StackHCI/StackHCI.Autorest/build-module.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
# is regenerated.
# ----------------------------------------------------------------------------------
param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs)
param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [Switch]$DisableAfterBuildTasks)
$ErrorActionPreference = 'Stop'

if($PSEdition -ne 'Core') {
Expand Down Expand Up @@ -169,4 +169,14 @@ if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1'))
. (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
}

if (-not $DisableAfterBuildTasks){
$afterBuildTasksPath = Join-Path $PSScriptRoot ''
$afterBuildTasksArgs = ConvertFrom-Json 'true' -AsHashtable
if(Test-Path -Path $afterBuildTasksPath -PathType leaf){
Write-Host -ForegroundColor Green 'Running after build tasks...'
. $afterBuildTasksPath @afterBuildTasksArgs
}
}


Write-Host -ForegroundColor Green '-------------Done-------------'
27 changes: 0 additions & 27 deletions src/StackHCI/StackHCI.Autorest/custom/stackhci.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ $StartingArcAgentMessage = "Enabling Azure Arc integration on every clustered no
$VerifyingArcMessage = "Verifying Azure Arc for Servers registration"
$WaitingUnregisterMessage = "Disabling Azure Arc integration on every clustered node"
$CleanArcMessage = "Cleaning up Azure Arc integration"
$NonCloudDeploymentFor23H2DevicesErrorMessage = "Azure stack HCI version 23H2 and higher cannot be registered using this method. See details: https://learn.microsoft.com/en-us/azure-stack/hci/deploy/deploy-via-portal"

$MissingDependentModulesError = "Can't find PowerShell module(s): {0}. Please install the missing module(s) using 'Install-Module -Name <Module_Name>' and try again."
$ArcAlreadyEnabledInADifferentResourceError = "Below mentioned cluster node(s) are already Arc enabled with a different ARM Resource Id:`n{0}`nDisconnect Arc agent on these nodes and run Register-AzStackHCI again."
Expand Down Expand Up @@ -2895,21 +2894,6 @@ param(
Write-VerboseLog ("Cloud Management supported: {0}" -f $isCloudManagementSupported)
Write-VerboseLog ("Cloud Management Infra supported: {0}" -f $isCloudManagementInfraSupported)
Write-VerboseLog ("Installing Mandatory extensions supported: {0}" -f $isDefaultExtensionSupported)

$allowFor23H2Devices = Verify-23H2VanillaRegistration -clusterNodeSession $clusterNodeSession
if(([Int]::Parse($osVersionInfo.BuildNumber) -ge $23H2BuildNumber) -and !($allowFor23H2Devices))
{
#error message
Write-ErrorLog -Message $NonCloudDeploymentFor23H2DevicesErrorMessage -Category OperationStopped
$resultValue = [OperationStatus]::Failed
$registrationOutput | Add-Member -MemberType NoteProperty -Name $OutputPropertyResult -Value [OperationStatus]::Failed -ErrorAction Continue
$NonCloudDeploymentFor23H2DevicesErrorCode = 9132
Set-WacOutputProperty -IsWAC $IsWAC -PropertyName $OutputPropertyWacResult -PropertyValue $resultValue.ToString() -Output $registrationOutput
Set-WacOutputProperty -IsWAC $IsWAC -PropertyName $OutputPropertyWacErrorCode -PropertyValue $NonCloudDeploymentFor23H2DevicesErrorCode -Output $registrationOutput
Write-Output $registrationOutput | Format-List
Write-NodeEventLog -Message $NonCloudDeploymentFor23H2DevicesErrorMessage -EventID 9132 -IsManagementNode $IsManagementNode -credentials $Credential -ComputerName $ComputerName -Level Error
throw
}

if(-Not ([string]::IsNullOrEmpty($RegContext.AzureResourceUri)))
{
Expand Down Expand Up @@ -3888,17 +3872,6 @@ Set-WacOutputProperty -IsWAC $IsWAC -PropertyName $OutputPropertyWacResult -Prop
}
}

function Verify-23H2VanillaRegistration {
[Microsoft.Azure.PowerShell.Cmdlets.StackHCI.DoNotExportAttribute()]
param(
[System.Management.Automation.Runspaces.PSSession] $clusterNodeSession
)

$detectRegKeyfor23H2 = { $lcmRegKey = Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\LCMAzureStackStampInformation" -Name "InitializationComplete" -ErrorAction SilentlyContinue; $lcmRegKey -ne $null }
$allowFor23H2Devices = Invoke-Command -Session $clusterNodeSession -ScriptBlock $detectRegKeyfor23H2

return $allowFor23H2Devices
}

function Set-ArcRoleforRPSpn {
[Microsoft.Azure.PowerShell.Cmdlets.StackHCI.DoNotExportAttribute()]
Expand Down
14 changes: 7 additions & 7 deletions src/StackHCI/StackHCI/Az.StackHCI.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Generated by: Microsoft Corporation
#
# Generated on: 23/04/2024
# Generated on: 7/17/2024
#

@{
Expand Down Expand Up @@ -51,19 +51,19 @@ DotNetFrameworkVersion = '4.7.2'
# ProcessorArchitecture = ''

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.19.0'; })
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '3.0.2'; })

# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = 'StackHCI.Autorest/bin/Az.StackHCI.private.dll'

# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()
ScriptsToProcess = @()

# Type files (.ps1xml) to be loaded when importing this module
# TypesToProcess = @()
TypesToProcess = @()

# Format files (.ps1xml) to be loaded when importing this module
FormatsToProcess = 'StackHCI.Autorest\Az.StackHCI.format.ps1xml'
FormatsToProcess = 'StackHCI.Autorest/Az.StackHCI.format.ps1xml'

# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
NestedModules = @('StackHCI.Autorest/Az.StackHCI.psm1')
Expand Down Expand Up @@ -109,7 +109,7 @@ PrivateData = @{
PSData = @{

# Tags applied to this module. These help with module discovery in online galleries.
Tags = 'Azure','ResourceManager','ARM','PSModule','StackHci'
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'StackHci'

# A URL to the license for this module.
LicenseUri = 'https://aka.ms/azps-license'
Expand All @@ -134,7 +134,7 @@ PrivateData = @{

} # End of PSData hashtable

} # End of PrivateData hashtable
} # End of PrivateData hashtable

# HelpInfo URI of this module
# HelpInfoURI = ''
Expand Down
1 change: 1 addition & 0 deletions src/StackHCI/StackHCI/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Additional information about change #1
-->
## Upcoming Release
* Allowed registration for 23H2 and above versions of the device

## Version 2.3.2
* Introduced secrets detection feature to safeguard sensitive data.
Expand Down
21 changes: 18 additions & 3 deletions src/StackHCI/StackHCI/help/Add-AzStackHCIVMAttestation.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ Add-AzStackHCIVMAttestation configures guests for AzureStack HCI IMDS Attestatio

### VMName (Default)
```
Add-AzStackHCIVMAttestation [-VMName] <String[]> [-Force] [-WhatIf]
Add-AzStackHCIVMAttestation [-VMName] <String[]> [-Force] [-ProgressAction <ActionPreference>] [-WhatIf]
[-Confirm] [<CommonParameters>]
```

### VMObject
```
Add-AzStackHCIVMAttestation [-Force] [-VM] <Object[]> [-WhatIf] [-Confirm]
Add-AzStackHCIVMAttestation [-Force] [-VM] <Object[]> [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```

### AddAll
```
Add-AzStackHCIVMAttestation [-Force] [-AddAll] [-WhatIf] [-Confirm]
Add-AzStackHCIVMAttestation [-Force] [-AddAll] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```

Expand Down Expand Up @@ -107,6 +107,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -ProgressAction
{{ Fill ProgressAction Description }}

```yaml
Type: System.Management.Automation.ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -VM
Specifies an array of VM objects from Get-VM.

Expand Down
17 changes: 16 additions & 1 deletion src/StackHCI/StackHCI/help/Disable-AzStackHCIAttestation.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Disable-AzStackHCIAttestation disables IMDS Attestation on the host

```
Disable-AzStackHCIAttestation [[-ComputerName] <String>] [-Credential <PSCredential>] [-RemoveVM] [-Force]
[-WhatIf] [-Confirm] [<CommonParameters>]
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -83,6 +83,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -ProgressAction
{{ Fill ProgressAction Description }}

```yaml
Type: System.Management.Automation.ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -RemoveVM
Specifies the guests on each node should be removed from IMDS Attestation before disabling on cluster.
Disable cannot continue before guests are removed.
Expand Down
17 changes: 16 additions & 1 deletion src/StackHCI/StackHCI/help/Disable-AzStackHCIRemoteSupport.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Disables Remote Support.
## SYNTAX

```
Disable-AzStackHCIRemoteSupport [-WhatIf] [-Confirm] [<CommonParameters>]
Disable-AzStackHCIRemoteSupport [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

## DESCRIPTION
Expand All @@ -37,6 +37,21 @@ Disabling Remort support

## PARAMETERS

### -ProgressAction
{{ Fill ProgressAction Description }}

```yaml
Type: System.Management.Automation.ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Confirm
Prompts you for confirmation before running the cmdlet.

Expand Down
17 changes: 16 additions & 1 deletion src/StackHCI/StackHCI/help/Enable-AzStackHCIAttestation.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Enable-AzStackHCIAttestation configures the host and enables specified guests fo

```
Enable-AzStackHCIAttestation [[-ComputerName] <String>] [-Credential <PSCredential>] [-AddVM] [-Force]
[-WhatIf] [-Confirm] [<CommonParameters>]
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -99,6 +99,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -ProgressAction
{{ Fill ProgressAction Description }}

```yaml
Type: System.Management.Automation.ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Confirm
Prompts you for confirmation before running the cmdlet.

Expand Down
17 changes: 16 additions & 1 deletion src/StackHCI/StackHCI/help/Enable-AzStackHCIRemoteSupport.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Enables Remote Support.

```
Enable-AzStackHCIRemoteSupport [-AccessLevel] <String> [[-ExpireInMinutes] <Int32>] [[-SasCredential] <String>]
[-AgreeToRemoteSupportConsent] [-WhatIf] [-Confirm] [<CommonParameters>]
[-AgreeToRemoteSupportConsent] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -118,6 +118,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -ProgressAction
{{ Fill ProgressAction Description }}

```yaml
Type: System.Management.Automation.ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -SasCredential
Hybrid Connection SAS Credential.

Expand Down
17 changes: 16 additions & 1 deletion src/StackHCI/StackHCI/help/Get-AzStackHCILogsDirectory.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Returns Logs directory path on the current node.

```
Get-AzStackHCILogsDirectory [[-Credential] <PSCredential>] [[-ComputerName] <String>]
[-WhatIf] [-Confirm] [<CommonParameters>]
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -66,6 +66,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -ProgressAction
{{ Fill ProgressAction Description }}

```yaml
Type: System.Management.Automation.ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Confirm
Prompts you for confirmation before running the cmdlet.

Expand Down
17 changes: 16 additions & 1 deletion src/StackHCI/StackHCI/help/Get-AzStackHCIRemoteSupportAccess.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Gets Remote Support Access.
## SYNTAX

```
Get-AzStackHCIRemoteSupportAccess [-Cluster] [-IncludeExpired]
Get-AzStackHCIRemoteSupportAccess [-Cluster] [-IncludeExpired] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
```

Expand Down Expand Up @@ -102,6 +102,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -ProgressAction
{{ Fill ProgressAction Description }}

```yaml
Type: System.Management.Automation.ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Gets Remote Support Session History Details.

```
Get-AzStackHCIRemoteSupportSessionHistory [[-SessionId] <String>] [-IncludeSessionTranscript]
[[-FromDate] <DateTime>] [<CommonParameters>]
[[-FromDate] <DateTime>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
```

## DESCRIPTION
Expand Down Expand Up @@ -72,6 +72,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -ProgressAction
{{ Fill ProgressAction Description }}

```yaml
Type: System.Management.Automation.ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -SessionId
Optional.
Session Id to get details for a specific session.
Expand Down
Loading