internal/ProxyCmdletDefinitions.ps1
# ---------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code # is regenerated. # ---------------------------------------------------------------------------------- <# .Synopsis Gets an Agent Version along with the download link currently present. .Description Gets an Agent Version along with the download link currently present. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IAgentVersion .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IAgentVersionsList .Notes COMPLEX PARAMETER PROPERTIES 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. OSTYPEINPUTOBJECT <IStackHcivmIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GalleryImageName <String>]: Name of the gallery image [Id <String>]: Resource identity path [Location <String>]: The location of the Extension being received. [LogicalNetworkName <String>]: Name of the logical network [MachineName <String>]: The name of the hybrid machine. [MarketplaceGalleryImageName <String>]: Name of the marketplace gallery image [MetadataName <String>]: Name of the HybridIdentityMetadata. [NetworkInterfaceName <String>]: Name of the network interface [NetworkSecurityGroupName <String>]: Name of the network security group [OSType <String>]: Defines the os type. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource. [SecurityRuleName <String>]: Name of the security rule. [StorageContainerName <String>]: Name of the storage container [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [Version <String>]: The version of the Extension being received. [VirtualHardDiskName <String>]: Name of the virtual hard disk .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/get-azstackhcivmagentversion #> function Get-AzStackHCIVMAgentVersion { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IAgentVersion], [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IAgentVersionsList])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # Defines the os type ${OSType}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityOSType', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # Defines the agent version. # To get latest, use latest or else a specific agent version. ${Version}, [Parameter(ParameterSetName='GetViaIdentityOSType', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity] # Identity Parameter ${OSTypeInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Get = 'AzStackHci.VM.private\Get-AzStackHCIVMAgentVersion_Get'; GetViaIdentityOSType = 'AzStackHci.VM.private\Get-AzStackHCIVMAgentVersion_GetViaIdentityOSType'; List = 'AzStackHci.VM.private\Get-AzStackHCIVMAgentVersion_List'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis Gets an Extension Metadata based on location, publisher, extensionType and version .Description Gets an Extension Metadata based on location, publisher, extensionType and version .Example {{ Add code here }} .Example {{ Add code here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IExtensionValue .Notes COMPLEX PARAMETER PROPERTIES 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. EXTENSIONTYPEINPUTOBJECT <IStackHcivmIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GalleryImageName <String>]: Name of the gallery image [Id <String>]: Resource identity path [Location <String>]: The location of the Extension being received. [LogicalNetworkName <String>]: Name of the logical network [MachineName <String>]: The name of the hybrid machine. [MarketplaceGalleryImageName <String>]: Name of the marketplace gallery image [MetadataName <String>]: Name of the HybridIdentityMetadata. [NetworkInterfaceName <String>]: Name of the network interface [NetworkSecurityGroupName <String>]: Name of the network security group [OSType <String>]: Defines the os type. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource. [SecurityRuleName <String>]: Name of the security rule. [StorageContainerName <String>]: Name of the storage container [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [Version <String>]: The version of the Extension being received. [VirtualHardDiskName <String>]: Name of the virtual hard disk LOCATIONINPUTOBJECT <IStackHcivmIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GalleryImageName <String>]: Name of the gallery image [Id <String>]: Resource identity path [Location <String>]: The location of the Extension being received. [LogicalNetworkName <String>]: Name of the logical network [MachineName <String>]: The name of the hybrid machine. [MarketplaceGalleryImageName <String>]: Name of the marketplace gallery image [MetadataName <String>]: Name of the HybridIdentityMetadata. [NetworkInterfaceName <String>]: Name of the network interface [NetworkSecurityGroupName <String>]: Name of the network security group [OSType <String>]: Defines the os type. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource. [SecurityRuleName <String>]: Name of the security rule. [StorageContainerName <String>]: Name of the storage container [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [Version <String>]: The version of the Extension being received. [VirtualHardDiskName <String>]: Name of the virtual hard disk PUBLISHERINPUTOBJECT <IStackHcivmIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GalleryImageName <String>]: Name of the gallery image [Id <String>]: Resource identity path [Location <String>]: The location of the Extension being received. [LogicalNetworkName <String>]: Name of the logical network [MachineName <String>]: The name of the hybrid machine. [MarketplaceGalleryImageName <String>]: Name of the marketplace gallery image [MetadataName <String>]: Name of the HybridIdentityMetadata. [NetworkInterfaceName <String>]: Name of the network interface [NetworkSecurityGroupName <String>]: Name of the network security group [OSType <String>]: Defines the os type. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource. [SecurityRuleName <String>]: Name of the security rule. [StorageContainerName <String>]: Name of the storage container [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [Version <String>]: The version of the Extension being received. [VirtualHardDiskName <String>]: Name of the virtual hard disk .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/get-azstackhcivmextensionmetadata #> function Get-AzStackHCIVMExtensionMetadata { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IExtensionValue])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityPublisher', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The extensionType of the Extension being received. ${ExtensionType}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The location of the Extension being received. ${Location}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The publisher of the Extension being received. ${Publisher}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityExtensionType', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityPublisher', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The version of the Extension being received. ${Version}, [Parameter(ParameterSetName='GetViaIdentityExtensionType', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity] # Identity Parameter ${ExtensionTypeInputObject}, [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity] # Identity Parameter ${LocationInputObject}, [Parameter(ParameterSetName='GetViaIdentityPublisher', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity] # Identity Parameter ${PublisherInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Get = 'AzStackHci.VM.private\Get-AzStackHCIVMExtensionMetadata_Get'; GetViaIdentityExtensionType = 'AzStackHci.VM.private\Get-AzStackHCIVMExtensionMetadata_GetViaIdentityExtensionType'; GetViaIdentityLocation = 'AzStackHci.VM.private\Get-AzStackHCIVMExtensionMetadata_GetViaIdentityLocation'; GetViaIdentityPublisher = 'AzStackHci.VM.private\Get-AzStackHCIVMExtensionMetadata_GetViaIdentityPublisher'; List = 'AzStackHci.VM.private\Get-AzStackHCIVMExtensionMetadata_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis Gets a gallery image .Description Gets a gallery image .Example {{ Add code here }} .Example {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IGalleryImage .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/get-azstackhcivmgalleryimage #> function Get-AzStackHCIVMGalleryImage { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IGalleryImage])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Alias('GalleryImageName')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # Name of the gallery image ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List1', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Get = 'AzStackHci.VM.private\Get-AzStackHCIVMGalleryImage_Get'; List = 'AzStackHci.VM.private\Get-AzStackHCIVMGalleryImage_List'; List1 = 'AzStackHci.VM.private\Get-AzStackHCIVMGalleryImage_List1'; } if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis Implements GuestAgent GET method. .Description Implements GuestAgent GET method. .Example {{ Add code here }} .Example {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IGuestAgent .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/get-azstackhcivmguestagent #> function Get-AzStackHCIVMGuestAgent { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IGuestAgent])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The fully qualified Azure Resource manager identifier of the resource. ${ResourceUri}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Get = 'AzStackHci.VM.private\Get-AzStackHCIVMGuestAgent_Get'; List = 'AzStackHci.VM.private\Get-AzStackHCIVMGuestAgent_List'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis Implements HybridIdentityMetadata GET method. .Description Implements HybridIdentityMetadata GET method. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IHybridIdentityMetadata .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IHybridIdentityMetadataAutoGenerated .Notes COMPLEX PARAMETER PROPERTIES 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. MACHINEINPUTOBJECT <IStackHcivmIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GalleryImageName <String>]: Name of the gallery image [Id <String>]: Resource identity path [Location <String>]: The location of the Extension being received. [LogicalNetworkName <String>]: Name of the logical network [MachineName <String>]: The name of the hybrid machine. [MarketplaceGalleryImageName <String>]: Name of the marketplace gallery image [MetadataName <String>]: Name of the HybridIdentityMetadata. [NetworkInterfaceName <String>]: Name of the network interface [NetworkSecurityGroupName <String>]: Name of the network security group [OSType <String>]: Defines the os type. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource. [SecurityRuleName <String>]: Name of the security rule. [StorageContainerName <String>]: Name of the storage container [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [Version <String>]: The version of the Extension being received. [VirtualHardDiskName <String>]: Name of the virtual hard disk .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/get-azstackhcivmhybrididentitymetadata #> function Get-AzStackHCIVMHybridIdentityMetadata { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IHybridIdentityMetadata], [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IHybridIdentityMetadataAutoGenerated])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The fully qualified Azure Resource manager identifier of the resource. ${ResourceUri}, [Parameter(ParameterSetName='Get1', Mandatory)] [Parameter(ParameterSetName='List1', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the hybrid machine. ${MachineName}, [Parameter(ParameterSetName='Get1', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityMachine', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # Name of the HybridIdentityMetadata. ${MetadataName}, [Parameter(ParameterSetName='Get1', Mandatory)] [Parameter(ParameterSetName='List1', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Get1')] [Parameter(ParameterSetName='List1')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentityMachine', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity] # Identity Parameter ${MachineInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Get = 'AzStackHci.VM.private\Get-AzStackHCIVMHybridIdentityMetadata_Get'; Get1 = 'AzStackHci.VM.private\Get-AzStackHCIVMHybridIdentityMetadata_Get1'; GetViaIdentityMachine = 'AzStackHci.VM.private\Get-AzStackHCIVMHybridIdentityMetadata_GetViaIdentityMachine'; List = 'AzStackHci.VM.private\Get-AzStackHCIVMHybridIdentityMetadata_List'; List1 = 'AzStackHci.VM.private\Get-AzStackHCIVMHybridIdentityMetadata_List1'; } if (('Get1', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to get the extension. .Description The operation to get the extension. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMachineExtension .Notes COMPLEX PARAMETER PROPERTIES 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. MACHINEINPUTOBJECT <IStackHcivmIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GalleryImageName <String>]: Name of the gallery image [Id <String>]: Resource identity path [Location <String>]: The location of the Extension being received. [LogicalNetworkName <String>]: Name of the logical network [MachineName <String>]: The name of the hybrid machine. [MarketplaceGalleryImageName <String>]: Name of the marketplace gallery image [MetadataName <String>]: Name of the HybridIdentityMetadata. [NetworkInterfaceName <String>]: Name of the network interface [NetworkSecurityGroupName <String>]: Name of the network security group [OSType <String>]: Defines the os type. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource. [SecurityRuleName <String>]: Name of the security rule. [StorageContainerName <String>]: Name of the storage container [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [Version <String>]: The version of the Extension being received. [VirtualHardDiskName <String>]: Name of the virtual hard disk .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/get-azstackhcivmmachineextension #> function Get-AzStackHCIVMMachineExtension { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMachineExtension])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityMachine', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the machine extension. ${ExtensionName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the machine containing the extension. ${MachineName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentityMachine', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity] # Identity Parameter ${MachineInputObject}, [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Query')] [System.String] # The expand expression to apply on the operation. ${Expand}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Get = 'AzStackHci.VM.private\Get-AzStackHCIVMMachineExtension_Get'; GetViaIdentityMachine = 'AzStackHci.VM.private\Get-AzStackHCIVMMachineExtension_GetViaIdentityMachine'; List = 'AzStackHci.VM.private\Get-AzStackHCIVMMachineExtension_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis Retrieves information about the model view or the instance view of a hybrid machine. .Description Retrieves information about the model view or the instance view of a hybrid machine. .Example {{ Add code here }} .Example {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMachine .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/get-azstackhcivmmachine #> function Get-AzStackHCIVMMachine { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMachine])] [CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Alias('MachineName')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the hybrid machine. ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='Get')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("instanceView")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Query')] [System.String] # The expand expression to apply on the operation. ${Expand}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Get = 'AzStackHci.VM.private\Get-AzStackHCIVMMachine_Get'; List = 'AzStackHci.VM.private\Get-AzStackHCIVMMachine_List'; List1 = 'AzStackHci.VM.private\Get-AzStackHCIVMMachine_List1'; } if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis Gets a marketplace gallery image .Description Gets a marketplace gallery image .Example {{ Add code here }} .Example {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMarketplaceGalleryImage .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/get-azstackhcivmmarketplacegalleryimage #> function Get-AzStackHCIVMMarketplaceGalleryImage { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMarketplaceGalleryImage])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Alias('MarketplaceGalleryImageName')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # Name of the marketplace gallery image ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List1', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Get = 'AzStackHci.VM.private\Get-AzStackHCIVMMarketplaceGalleryImage_Get'; List = 'AzStackHci.VM.private\Get-AzStackHCIVMMarketplaceGalleryImage_List'; List1 = 'AzStackHci.VM.private\Get-AzStackHCIVMMarketplaceGalleryImage_List1'; } if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to get network information of hybrid machine .Description The operation to get network information of hybrid machine .Example {{ Add code here }} .Example {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.INetworkProfile .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/get-azstackhcivmnetworkprofile #> function Get-AzStackHCIVMNetworkProfile { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.INetworkProfile])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the hybrid machine. ${MachineName}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Get = 'AzStackHci.VM.private\Get-AzStackHCIVMNetworkProfile_Get'; } if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis List the operations for the provider .Description List the operations for the provider .Example {{ Add code here }} .Example {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IOperation .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IOperationValue .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/get-azstackhcivmoperation #> function Get-AzStackHCIVMOperation { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IOperation], [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IOperationValue])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ List = 'AzStackHci.VM.private\Get-AzStackHCIVMOperation_List'; List1 = 'AzStackHci.VM.private\Get-AzStackHCIVMOperation_List1'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis Gets a virtual machine instance .Description Gets a virtual machine instance .Example Get-AzStackHCIVMVirtualMachine -Name "testVm" -ResourceGroupName "test-rg" .Example Get-AzStackHCIVMVirtualMachine -ResourceGroupName "test-rg" .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IVirtualMachineInstance .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/get-azstackhcivmvirtualmachine #> function Get-AzStackHCIVMVirtualMachine { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IVirtualMachineInstance])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The fully qualified Azure Resource manager identifier of the resource. ${ResourceUri}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Get = 'AzStackHci.VM.private\Get-AzStackHCIVMVirtualMachine_Get'; List = 'AzStackHci.VM.private\Get-AzStackHCIVMVirtualMachine_List'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to create or update a gallery image. Please note some properties can be set only during gallery image creation. .Description The operation to create or update a gallery image. Please note some properties can be set only during gallery image creation. .Example {{ Add code here }} .Example {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IGalleryImage .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/new-azstackhcivmgalleryimage #> function New-AzStackHCIVMGalleryImage { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IGalleryImage])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Alias('GalleryImageName')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # Name of the gallery image ${Name}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The geo-location where the resource lives ${Location}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("NoCloud", "Azure")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Datasource for the gallery image when provisioning with cloud-init [NoCloud, Azure] ${CloudInitDataSource}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the extended location. ${CustomLocationId}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("V1", "V2")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The hypervisor generation of the Virtual Machine [V1, V2] ${HyperVGeneration}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Security.SecureString] # location of the image the gallery image should be created from ${ImagePath}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("Windows", "Linux")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Operating system type that the gallery image uses [Windows, Linux] ${OSType}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the gallery image definition offer. ${Offer}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the gallery image definition publisher. ${Publisher}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the gallery image definition SKU. ${Sku}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Storage ContainerID of the storage container to be used for gallery image ${StoragePathId}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # This is the version of the gallery image. ${Version}, [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Path of Json file supplied to the Create operation ${JsonFilePath}, [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Json string supplied to the Create operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ CreateExpanded = 'AzStackHci.VM.private\New-AzStackHCIVMGalleryImage_CreateExpanded'; CreateViaJsonFilePath = 'AzStackHci.VM.private\New-AzStackHCIVMGalleryImage_CreateViaJsonFilePath'; CreateViaJsonString = 'AzStackHci.VM.private\New-AzStackHCIVMGalleryImage_CreateViaJsonString'; } if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('ExtendedLocationType') ) { $PSBoundParameters['ExtendedLocationType'] = "CustomLocation" } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis Create GuestAgent. .Description Create GuestAgent. .Example {{ Add code here }} .Example {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IGuestAgent .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/new-azstackhcivmguestagent #> function New-AzStackHCIVMGuestAgent { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IGuestAgent])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The fully qualified Azure Resource manager identifier of the resource. ${ResourceUri}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Security.SecureString] # The password to connect with the guest. ${CredentialsPassword}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The username to connect with the guest. ${CredentialsUsername}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("install", "uninstall", "repair")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The guest agent provisioning action. ${ProvisioningAction}, [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Path of Json file supplied to the Create operation ${JsonFilePath}, [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Json string supplied to the Create operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ CreateExpanded = 'AzStackHci.VM.private\New-AzStackHCIVMGuestAgent_CreateExpanded'; CreateViaJsonFilePath = 'AzStackHci.VM.private\New-AzStackHCIVMGuestAgent_CreateViaJsonFilePath'; CreateViaJsonString = 'AzStackHci.VM.private\New-AzStackHCIVMGuestAgent_CreateViaJsonString'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to create or update a logical network. Please note some properties can be set only during logical network creation. .Description The operation to create or update a logical network. Please note some properties can be set only during logical network creation. .Example {{ Add code here }} .Example {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ILogicalNetwork .Notes COMPLEX PARAMETER PROPERTIES 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. SUBNET <ISubnet[]>: Subnet - list of subnets under the logical network [AddressPrefix <String>]: The address prefix for the subnet: Cidr for this subnet - IPv4, IPv6. [AddressPrefixes <List<String>>]: List of address prefixes for the subnet. [IPAllocationMethod <String>]: IPAllocationMethod - The IP address allocation method. Possible values include: 'Static', 'Dynamic' [IPConfigurationReference <List<ISubnetIPConfigurationReference>>]: IPConfigurationReferences - list of IPConfigurationReferences [Id <String>]: The ARM ID for a Network Interface. [IPPool <List<IIPPool>>]: network associated pool of IP Addresses [End <String>]: End of the IP address pool [Name <String>]: Name of the IP-Pool [Start <String>]: Start of the IP address pool [Type <String>]: Type of the IP Pool [vm, vippool] [Name <String>]: Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. [NetworkSecurityGroupId <String>]: The ARM ID for a Network Security Group. [Route <List<IRoute>>]: Collection of routes contained within a route table. [AddressPrefix <String>]: The destination CIDR to which the route applies. [Name <String>]: Name - name of the subnet [NextHopIPAddress <String>]: The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. [Vlan <Int32?>]: Vlan to use for the subnet .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/new-azstackhcivmlogicalnetwork #> function New-AzStackHCIVMLogicalNetwork { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ILogicalNetwork])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Alias('LogicalNetworkName')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # Name of the logical network ${Name}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The geo-location where the resource lives ${Location}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the extended location. ${CustomLocationId}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String[]] # The list of DNS servers IP addresses. ${DnsServer}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ISubnet[]] # Subnet - list of subnets under the logical network ${Subnet}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # name of the network switch to be used for VMs ${VMSwitchName}, [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Path of Json file supplied to the Create operation ${JsonFilePath}, [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Json string supplied to the Create operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ CreateExpanded = 'AzStackHci.VM.private\New-AzStackHCIVMLogicalNetwork_CreateExpanded'; CreateViaJsonFilePath = 'AzStackHci.VM.private\New-AzStackHCIVMLogicalNetwork_CreateViaJsonFilePath'; CreateViaJsonString = 'AzStackHci.VM.private\New-AzStackHCIVMLogicalNetwork_CreateViaJsonString'; } if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('ExtendedLocationType') ) { $PSBoundParameters['ExtendedLocationType'] = "CustomLocation" } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to create or update the extension. .Description The operation to create or update the extension. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMachineExtension .Inputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMachineExtension .Notes COMPLEX PARAMETER PROPERTIES 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. EXTENSIONPARAMETER <IMachineExtension>: Describes a Machine Extension. Location <String>: The geo-location where the resource lives [Tag <ITrackedResourceTags>]: Resource tags. [(Any) <String>]: This indicates any property can be added to this object. [AutoUpgradeMinorVersion <Boolean?>]: Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. [EnableAutomaticUpgrade <Boolean?>]: Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. [ForceUpdateTag <String>]: How the extension handler should be forced to update even if the extension configuration has not changed. [InstanceViewName <String>]: The machine extension name. [InstanceViewType <String>]: Specifies the type of the extension; an example is "CustomScriptExtension". [InstanceViewTypeHandlerVersion <String>]: Specifies the version of the script handler. [PropertiesType <String>]: Specifies the type of the extension; an example is "CustomScriptExtension". [ProtectedSetting <IMachineExtensionPropertiesProtectedSettings>]: The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. [(Any) <Object>]: This indicates any property can be added to this object. [Publisher <String>]: The name of the extension handler publisher. [Setting <IMachineExtensionPropertiesSettings>]: Json formatted public settings for the extension. [(Any) <Object>]: This indicates any property can be added to this object. [StatusCode <String>]: The status code. [StatusDisplayStatus <String>]: The short localizable label for the status. [StatusLevel <String>]: The level code. [StatusMessage <String>]: The detailed status message, including for alerts and error messages. [StatusTime <DateTime?>]: The time of the status. [TypeHandlerVersion <String>]: Specifies the version of the script handler. MACHINEINPUTOBJECT <IStackHcivmIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GalleryImageName <String>]: Name of the gallery image [Id <String>]: Resource identity path [Location <String>]: The location of the Extension being received. [LogicalNetworkName <String>]: Name of the logical network [MachineName <String>]: The name of the hybrid machine. [MarketplaceGalleryImageName <String>]: Name of the marketplace gallery image [MetadataName <String>]: Name of the HybridIdentityMetadata. [NetworkInterfaceName <String>]: Name of the network interface [NetworkSecurityGroupName <String>]: Name of the network security group [OSType <String>]: Defines the os type. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource. [SecurityRuleName <String>]: Name of the security rule. [StorageContainerName <String>]: Name of the storage container [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [Version <String>]: The version of the Extension being received. [VirtualHardDiskName <String>]: Name of the virtual hard disk .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/new-azstackhcivmmachineextension #> function New-AzStackHCIVMMachineExtension { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMachineExtension])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the machine extension. ${ExtensionName}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the machine where the extension should be created or updated. ${MachineName}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaJsonFilePath')] [Parameter(ParameterSetName='CreateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='CreateViaIdentityMachine', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity] # Identity Parameter ${MachineInputObject}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The geo-location where the resource lives ${Location}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Indicates whether the extension should use a newer minor version if one is available at deployment time. # Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. ${AutoUpgradeMinorVersion}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. ${EnableAutomaticUpgrade}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # How the extension handler should be forced to update even if the extension configuration has not changed. ${ForceUpdateTag}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The machine extension name. ${InstanceViewName}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies the type of the extension; an example is "CustomScriptExtension". ${InstanceViewType}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies the version of the script handler. ${InstanceViewTypeHandlerVersion}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies the type of the extension; an example is "CustomScriptExtension". ${PropertiesType}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMachineExtensionPropertiesProtectedSettings]))] [System.Collections.Hashtable] # The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. ${ProtectedSetting}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the extension handler publisher. ${Publisher}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMachineExtensionPropertiesSettings]))] [System.Collections.Hashtable] # Json formatted public settings for the extension. ${Setting}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The status code. ${StatusCode}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The short localizable label for the status. ${StatusDisplayStatus}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("Info", "Warning", "Error")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The level code. ${StatusLevel}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The detailed status message, including for alerts and error messages. ${StatusMessage}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.DateTime] # The time of the status. ${StatusTime}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies the version of the script handler. ${TypeHandlerVersion}, [Parameter(ParameterSetName='CreateViaIdentityMachine', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMachineExtension] # Describes a Machine Extension. ${ExtensionParameter}, [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Path of Json file supplied to the Create operation ${JsonFilePath}, [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Json string supplied to the Create operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ CreateExpanded = 'AzStackHci.VM.private\New-AzStackHCIVMMachineExtension_CreateExpanded'; CreateViaIdentityMachine = 'AzStackHci.VM.private\New-AzStackHCIVMMachineExtension_CreateViaIdentityMachine'; CreateViaIdentityMachineExpanded = 'AzStackHci.VM.private\New-AzStackHCIVMMachineExtension_CreateViaIdentityMachineExpanded'; CreateViaJsonFilePath = 'AzStackHci.VM.private\New-AzStackHCIVMMachineExtension_CreateViaJsonFilePath'; CreateViaJsonString = 'AzStackHci.VM.private\New-AzStackHCIVMMachineExtension_CreateViaJsonString'; } if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to create or update a hybrid machine. Please note some properties can be set only during machine creation. .Description The operation to create or update a hybrid machine. Please note some properties can be set only during machine creation. .Example {{ Add code here }} .Example {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMachine .Notes COMPLEX PARAMETER PROPERTIES 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. EXTENSION <IMachineExtensionInstanceView[]>: Machine Extensions information (deprecated field) [Name <String>]: The machine extension name. [StatusCode <String>]: The status code. [StatusDisplayStatus <String>]: The short localizable label for the status. [StatusLevel <String>]: The level code. [StatusMessage <String>]: The detailed status message, including for alerts and error messages. [StatusTime <DateTime?>]: The time of the status. [Type <String>]: Specifies the type of the extension; an example is "CustomScriptExtension". [TypeHandlerVersion <String>]: Specifies the version of the script handler. .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/new-azstackhcivmmachine #> function New-AzStackHCIVMMachine { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMachine])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Alias('MachineName')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the hybrid machine. ${Name}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The geo-location where the resource lives ${Location}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The correlation ID passed in from RSM per upgrade. ${AgentUpgradeCorrelationId}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies the version info w.r.t AgentUpgrade for the machine. ${AgentUpgradeDesiredVersion}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Specifies if RSM should try to upgrade this machine ${AgentUpgradeEnableAutomaticUpgrade}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Public Key that the client provides to be used during initial resource onboarding ${ClientPublicKey}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMachineExtensionInstanceView[]] # Machine Extensions information (deprecated field) ${Extension}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The behavior of the service when the Arc-enabled machine starts up. ${ExtensionServiceStartupType}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The current status of the service. ${ExtensionServiceStatus}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The behavior of the service when the Arc-enabled machine starts up. ${GuestConfigurationServiceStartupType}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The current status of the service. ${GuestConfigurationServiceStatus}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("SystemAssigned")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The identity type. ${IdentityType}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("AVS", "HCI", "SCVMM", "VMware")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Indicates which kind of VM fabric the instance is an instance of, such as HCI or SCVMM etc. ${Kind}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies the assessment mode. ${LinuxConfigurationPatchSettingsAssessmentMode}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform", "AutomaticByOS", "Manual")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies the patch mode. ${LinuxConfigurationPatchSettingsPatchMode}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The city or locality where the resource is located. ${LocationDataCity}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The country or region where the resource is located ${LocationDataCountryOrRegion}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The district, state, or province where the resource is located. ${LocationDataDistrict}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # A canonical name for the geographic or physical location. ${LocationDataName}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies whether any MS SQL instance is discovered on the machine. ${MssqlDiscovered}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The type of Operating System (windows/linux). ${OSType}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. ${ParentClusterResourceId}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The resource id of the private link scope this machine is assigned to, if any. ${PrivateLinkScopeResourceId}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies the hybrid machine unique ID. ${VMId}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies the assessment mode. ${WindowsConfigurationPatchSettingsAssessmentMode}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform", "AutomaticByOS", "Manual")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies the patch mode. ${WindowsConfigurationPatchSettingsPatchMode}, [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Path of Json file supplied to the Create operation ${JsonFilePath}, [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Json string supplied to the Create operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ CreateExpanded = 'AzStackHci.VM.private\New-AzStackHCIVMMachine_CreateExpanded'; CreateViaJsonFilePath = 'AzStackHci.VM.private\New-AzStackHCIVMMachine_CreateViaJsonFilePath'; CreateViaJsonString = 'AzStackHci.VM.private\New-AzStackHCIVMMachine_CreateViaJsonString'; } if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to create or update a marketplace gallery image. Please note some properties can be set only during marketplace gallery image creation. .Description The operation to create or update a marketplace gallery image. Please note some properties can be set only during marketplace gallery image creation. .Example {{ Add code here }} .Example {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMarketplaceGalleryImage .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/new-azstackhcivmmarketplacegalleryimage #> function New-AzStackHCIVMMarketplaceGalleryImage { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMarketplaceGalleryImage])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Alias('MarketplaceGalleryImageName')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # Name of the marketplace gallery image ${Name}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The geo-location where the resource lives ${Location}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("NoCloud", "Azure")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Datasource for the gallery image when provisioning with cloud-init [NoCloud, Azure] ${CloudInitDataSource}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the extended location. ${CustomLocationId}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("V1", "V2")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The hypervisor generation of the Virtual Machine [V1, V2] ${HyperVGeneration}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("Windows", "Linux")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Operating system type that the gallery image uses [Windows, Linux] ${OSType}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the gallery image definition offer. ${Offer}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the gallery image definition publisher. ${Publisher}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the gallery image definition SKU. ${Sku}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Storage ContainerID of the storage container to be used for marketplace gallery image ${StoragePathId}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # This is the version of the gallery image. ${Version}, [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Path of Json file supplied to the Create operation ${JsonFilePath}, [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Json string supplied to the Create operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ CreateExpanded = 'AzStackHci.VM.private\New-AzStackHCIVMMarketplaceGalleryImage_CreateExpanded'; CreateViaJsonFilePath = 'AzStackHci.VM.private\New-AzStackHCIVMMarketplaceGalleryImage_CreateViaJsonFilePath'; CreateViaJsonString = 'AzStackHci.VM.private\New-AzStackHCIVMMarketplaceGalleryImage_CreateViaJsonString'; } if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('ExtendedLocationType') ) { $PSBoundParameters['ExtendedLocationType'] = "CustomLocation" } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to create or update a network interface. Please note some properties can be set only during network interface creation. .Description The operation to create or update a network interface. Please note some properties can be set only during network interface creation. .Example New-AzStackHCIVMNetworkInterface -Name "testNic" -ResourceGroupName "test-rg" -CustomLocationId "/subscriptions/{subscriptionID}/resourcegroups/{resourceGroupName}/providers/microsoft.extendedlocation/customlocations/{customLocationName}" -Location "eastus" -SubnetName "testLnet" .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.INetworkInterface .Notes COMPLEX PARAMETER PROPERTIES 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. IPCONFIGURATION <IIPConfiguration[]>: IPConfigurations - A list of IPConfigurations of the network interface. [IPAddress <String>]: PrivateIPAddress - Private IP address of the IP configuration. [Name <String>]: Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. [SubnetId <String>]: The ARM ID for a Logical Network. .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/new-azstackhcivmnetworkinterface #> function New-AzStackHCIVMNetworkInterface { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.INetworkInterface])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Alias('NetworkInterfaceName')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # Name of the network interface ${Name}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The geo-location where the resource lives ${Location}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the extended location. ${CustomLocationId}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String[]] # List of DNS server IP Addresses for the interface ${DnsServer}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IIPConfiguration[]] # IPConfigurations - A list of IPConfigurations of the network interface. ${IPConfiguration}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # MacAddress - The MAC address of the network interface. ${MacAddress}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The ARM ID for a Network Security Group. ${NetworkSecurityGroupId}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Path of Json file supplied to the Create operation ${JsonFilePath}, [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Json string supplied to the Create operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ CreateExpanded = 'AzStackHci.VM.private\New-AzStackHCIVMNetworkInterface_CreateExpanded'; CreateViaJsonFilePath = 'AzStackHci.VM.private\New-AzStackHCIVMNetworkInterface_CreateViaJsonFilePath'; CreateViaJsonString = 'AzStackHci.VM.private\New-AzStackHCIVMNetworkInterface_CreateViaJsonString'; } if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('ExtendedLocationType') ) { $PSBoundParameters['ExtendedLocationType'] = "CustomLocation" } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to create or update a storage container. Please note some properties can be set only during storage container creation. .Description The operation to create or update a storage container. Please note some properties can be set only during storage container creation. .Example New-AzStackHCIVMStoragePath -Name "testStoragePath" -ResourceGroupName "test-rg" -CustomLocationId "/subscriptions/{subscriptionID}/resourcegroups/{resourceGroupName}/providers/microsoft.extendedlocation/customlocations/{customLocationName}"-Location "eastus" -Path "C:\ClusterStorage\Volume1\testpath" .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStorageContainer .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/new-azstackhcivmstoragepath #> function New-AzStackHCIVMStoragePath { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStorageContainer])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Alias('StorageContainerName')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # Name of the storage container ${Name}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The geo-location where the resource lives ${Location}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the extended location. ${CustomLocationId}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Path of the storage container on the disk ${Path}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Path of Json file supplied to the Create operation ${JsonFilePath}, [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Json string supplied to the Create operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ CreateExpanded = 'AzStackHci.VM.private\New-AzStackHCIVMStoragePath_CreateExpanded'; CreateViaJsonFilePath = 'AzStackHci.VM.private\New-AzStackHCIVMStoragePath_CreateViaJsonFilePath'; CreateViaJsonString = 'AzStackHci.VM.private\New-AzStackHCIVMStoragePath_CreateViaJsonString'; } if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('ExtendedLocationType') ) { $PSBoundParameters['ExtendedLocationType'] = "CustomLocation" } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to create or update a virtual hard disk. Please note some properties can be set only during virtual hard disk creation. .Description The operation to create or update a virtual hard disk. Please note some properties can be set only during virtual hard disk creation. .Example New-AzStackHCIVMVirtualHardDisk -Name "testVhd" -ResourceGroupName "test-rg" -CustomLocationId "/subscriptions/{subscriptionID}/resourcegroups/{resourceGroupName}/providers/microsoft.extendedlocation/customlocations/{customLocationName}" -Location "eastus" -SizeGb 2 .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IVirtualHardDisk .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/new-azstackhcivmvirtualharddisk #> function New-AzStackHCIVMVirtualHardDisk { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IVirtualHardDisk])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Alias('VirtualHardDiskName')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # Name of the virtual hard disk ${Name}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The geo-location where the resource lives ${Location}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Int32] # Block size in bytes ${BlockSizeByte}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the extended location. ${CustomLocationId}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("vhdx", "vhd")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The format of the actual VHD file [vhd, vhdx] ${DiskFileFormat}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Boolean for enabling dynamic sizing on the virtual hard disk ${Dynamic}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("V1", "V2")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The hypervisor generation of the Virtual Machine [V1, V2] ${HyperVGeneration}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Int32] # Logical sector in bytes ${LogicalSectorByte}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Int32] # Physical sector in bytes ${PhysicalSectorByte}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Int64] # Size of the disk in GB ${SizeGb}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Storage ContainerID of the storage container to be used for VHD ${StoragePathId}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Path of Json file supplied to the Create operation ${JsonFilePath}, [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Json string supplied to the Create operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ CreateExpanded = 'AzStackHci.VM.private\New-AzStackHCIVMVirtualHardDisk_CreateExpanded'; CreateViaJsonFilePath = 'AzStackHci.VM.private\New-AzStackHCIVMVirtualHardDisk_CreateViaJsonFilePath'; CreateViaJsonString = 'AzStackHci.VM.private\New-AzStackHCIVMVirtualHardDisk_CreateViaJsonString'; } if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('ExtendedLocationType') ) { $PSBoundParameters['ExtendedLocationType'] = "CustomLocation" } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. .Description The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. .Example New-AzStackHCIVMVirtualMachine -Name "testVm" -OsType "Linux" -ImageName "testImage" -VmSize "Standard_K8S_v1" -AdminUsername "localadmin" -ComputerName "testVm" -ResourceGroupName "test-rg" -CustomLocationId "/subscriptions/{subscriptionID}/resourcegroups/{resourceGroupName}/providers/microsoft.extendedlocation/customlocations/{customLocationName}" -Location "eastus" .Example New-AzStackHCIVMVirtualMachine -Name "testVm" -OsType "Linux" -OsDiskName "testOsDisk" -VmSize "Standard_K8S_v1" -AdminUsername "localadmin" -ComputerName "testVm" -ResourceGroupName "test-rg" -CustomLocationId "/subscriptions/{subscriptionID}/resourcegroups/{resourceGroupName}/providers/microsoft.extendedlocation/customlocations/{customLocationName}" -Location "eastus" .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IVirtualMachineInstance .Notes COMPLEX PARAMETER PROPERTIES 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. LINUXCONFIGURATIONSSHPUBLICKEY <ISshPublicKey[]>: The list of SSH public keys used to authenticate with linux based VMs. [KeyData <String>]: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). [Path <String>]: Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys NETWORKPROFILENETWORKINTERFACE <INetworkInterfaceArmReference[]>: NetworkInterfaces - list of network interfaces to be attached to the virtual machine instance [Id <String>]: The ARM ID for a Network Interface. STORAGEPROFILEDATADISK <IVirtualHardDiskArmReference[]>: adds data disks to the virtual machine instance [Id <String>]: The ARM ID for a Virtual Hard Disk. WINDOWSCONFIGURATIONSSHPUBLICKEY <ISshPublicKey[]>: The list of SSH public keys used to authenticate with linux based VMs. [KeyData <String>]: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). [Path <String>]: Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/new-azstackhcivmvirtualmachine #> function New-AzStackHCIVMVirtualMachine { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IVirtualMachineInstance])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The fully qualified Azure Resource manager identifier of the resource. ${ResourceUri}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Security.SecureString] # AdminPassword - admin password ${AdminPassword}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # AdminUsername - admin username ${AdminUsername}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # ComputerName - name of the compute ${ComputerName}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the extended location. ${CustomLocationId}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # DisablePasswordAuthentication - whether password authentication should be disabled ${DisablePasswordAuthentication}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Int64] # Maximum memory in MB ${DynamicMemoryMaximumMemoryInMb}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Int64] # Minimum memory in MB ${DynamicMemoryMinimumMemoryInMb}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Int32] # Defines the amount of extra memory that should be reserved for a virtual machine instance at runtime, as a percentage of the total memory that the virtual machine instance is thought to need. # This only applies to virtual systems with dynamic memory enabled. # This property can be in the range of 5 to 2000. ${DynamicMemoryTargetBuffer}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Whether to EnableAutomaticUpdates on the machine ${EnableAutomaticUpdate}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Enable TPM flag ${EnableTpm}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Security.SecureString] # The HTTP proxy server endpoint to use. ${HttpProxyConfigHttpProxy}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Security.SecureString] # The HTTPS proxy server endpoint to use. ${HttpProxyConfigHttpsProxy}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String[]] # The endpoints that should not go through proxy. ${HttpProxyConfigNoProxy}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Alternative CA cert to use for connecting to proxy servers. ${HttpProxyConfigTrustedCa}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). ${IdentityType}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The ARM ID for an image resource used by the virtual machine instance. ${ImageId}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine instance creation process. ${LinuxConfigurationProvisionVMAgent}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Used to indicate whether the VM Config Agent should be installed during the virtual machine creation process. ${LinuxConfigurationProvisionVMConfigAgent}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ISshPublicKey[]] # The list of SSH public keys used to authenticate with linux based VMs. ${LinuxConfigurationSshPublicKey}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.INetworkInterfaceArmReference[]] # NetworkInterfaces - list of network interfaces to be attached to the virtual machine instance ${NetworkProfileNetworkInterface}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The ARM ID for a Virtual Hard Disk. ${OSDiskId}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("Windows", "Linux")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. # Possible values are: Windows, Linux. ${OSDiskOstype}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Unique identifier defined by ARC to identify the guest of the VM. ${ResourceUid}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Specifies whether secure boot should be enabled on the virtual machine instance. ${SecureBootEnabled}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("TrustedLaunch", "ConfidentialVM")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies the SecurityType of the virtual machine. # EnableTPM and SecureBootEnabled must be set to true for SecurityType to function. ${SecurityProfileSecurityType}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Id of the storage container that hosts the VM configuration file ${StoragePathId}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IVirtualHardDiskArmReference[]] # adds data disks to the virtual machine instance ${StorageProfileDataDisk}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # TimeZone for the virtual machine instance ${TimeZone}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String[]] # The array of user assigned identities associated with the resource. # The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' ${UserAssignedIdentity}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Int64] # RAM in MB for the virtual machine instance ${VmMemory}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Int32] # number of processors for the virtual machine instance ${VmProcessor}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("Default", "Standard_A2_v2", "Standard_A4_v2", "Standard_D2s_v3", "Standard_D4s_v3", "Standard_D8s_v3", "Standard_D16s_v3", "Standard_D32s_v3", "Standard_DS2_v2", "Standard_DS3_v2", "Standard_DS4_v2", "Standard_DS5_v2", "Standard_DS13_v2", "Standard_K8S_v1", "Standard_K8S2_v1", "Standard_K8S3_v1", "Standard_K8S4_v1", "Standard_NK6", "Standard_NK12", "Standard_NV6", "Standard_NV12", "Standard_K8S5_v1", "Custom")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Enum of VM Sizes ${VmSize}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine instance creation process. ${WindowConfigurationProvisionVMAgent}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Used to indicate whether the VM Config Agent should be installed during the virtual machine creation process. ${WindowConfigurationProvisionVMConfigAgent}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ISshPublicKey[]] # The list of SSH public keys used to authenticate with linux based VMs. ${WindowsConfigurationSshPublicKey}, [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Path of Json file supplied to the Create operation ${JsonFilePath}, [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Json string supplied to the Create operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ CreateExpanded = 'AzStackHci.VM.private\New-AzStackHCIVMVirtualMachine_CreateExpanded'; CreateViaJsonFilePath = 'AzStackHci.VM.private\New-AzStackHCIVMVirtualMachine_CreateViaJsonFilePath'; CreateViaJsonString = 'AzStackHci.VM.private\New-AzStackHCIVMVirtualMachine_CreateViaJsonString'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('ExtendedLocationType') ) { $PSBoundParameters['ExtendedLocationType'] = "CustomLocation" } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to delete a gallery image. .Description The operation to delete a gallery image. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity .Outputs System.Boolean .Notes COMPLEX PARAMETER PROPERTIES 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. INPUTOBJECT <IStackHcivmIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GalleryImageName <String>]: Name of the gallery image [Id <String>]: Resource identity path [Location <String>]: The location of the Extension being received. [LogicalNetworkName <String>]: Name of the logical network [MachineName <String>]: The name of the hybrid machine. [MarketplaceGalleryImageName <String>]: Name of the marketplace gallery image [MetadataName <String>]: Name of the HybridIdentityMetadata. [NetworkInterfaceName <String>]: Name of the network interface [NetworkSecurityGroupName <String>]: Name of the network security group [OSType <String>]: Defines the os type. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource. [SecurityRuleName <String>]: Name of the security rule. [StorageContainerName <String>]: Name of the storage container [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [Version <String>]: The version of the Extension being received. [VirtualHardDiskName <String>]: Name of the virtual hard disk .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/remove-azstackhcivmgalleryimage #> function Remove-AzStackHCIVMGalleryImage { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Alias('GalleryImageName')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # Name of the gallery image ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity] # Identity Parameter ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Delete = 'AzStackHci.VM.private\Remove-AzStackHCIVMGalleryImage_Delete'; DeleteViaIdentity = 'AzStackHci.VM.private\Remove-AzStackHCIVMGalleryImage_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis Implements GuestAgent DELETE method. .Description Implements GuestAgent DELETE method. .Example {{ Add code here }} .Example {{ Add code here }} .Outputs System.Boolean .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/remove-azstackhcivmguestagent #> function Remove-AzStackHCIVMGuestAgent { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The fully qualified Azure Resource manager identifier of the resource. ${ResourceUri}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Delete = 'AzStackHci.VM.private\Remove-AzStackHCIVMGuestAgent_Delete'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to delete a logical network. .Description The operation to delete a logical network. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity .Outputs System.Boolean .Notes COMPLEX PARAMETER PROPERTIES 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. INPUTOBJECT <IStackHcivmIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GalleryImageName <String>]: Name of the gallery image [Id <String>]: Resource identity path [Location <String>]: The location of the Extension being received. [LogicalNetworkName <String>]: Name of the logical network [MachineName <String>]: The name of the hybrid machine. [MarketplaceGalleryImageName <String>]: Name of the marketplace gallery image [MetadataName <String>]: Name of the HybridIdentityMetadata. [NetworkInterfaceName <String>]: Name of the network interface [NetworkSecurityGroupName <String>]: Name of the network security group [OSType <String>]: Defines the os type. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource. [SecurityRuleName <String>]: Name of the security rule. [StorageContainerName <String>]: Name of the storage container [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [Version <String>]: The version of the Extension being received. [VirtualHardDiskName <String>]: Name of the virtual hard disk .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/remove-azstackhcivmlogicalnetwork #> function Remove-AzStackHCIVMLogicalNetwork { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Alias('LogicalNetworkName')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # Name of the logical network ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity] # Identity Parameter ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Delete = 'AzStackHci.VM.private\Remove-AzStackHCIVMLogicalNetwork_Delete'; DeleteViaIdentity = 'AzStackHci.VM.private\Remove-AzStackHCIVMLogicalNetwork_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to delete the extension. .Description The operation to delete the extension. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity .Outputs System.Boolean .Notes COMPLEX PARAMETER PROPERTIES 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. INPUTOBJECT <IStackHcivmIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GalleryImageName <String>]: Name of the gallery image [Id <String>]: Resource identity path [Location <String>]: The location of the Extension being received. [LogicalNetworkName <String>]: Name of the logical network [MachineName <String>]: The name of the hybrid machine. [MarketplaceGalleryImageName <String>]: Name of the marketplace gallery image [MetadataName <String>]: Name of the HybridIdentityMetadata. [NetworkInterfaceName <String>]: Name of the network interface [NetworkSecurityGroupName <String>]: Name of the network security group [OSType <String>]: Defines the os type. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource. [SecurityRuleName <String>]: Name of the security rule. [StorageContainerName <String>]: Name of the storage container [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [Version <String>]: The version of the Extension being received. [VirtualHardDiskName <String>]: Name of the virtual hard disk MACHINEINPUTOBJECT <IStackHcivmIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GalleryImageName <String>]: Name of the gallery image [Id <String>]: Resource identity path [Location <String>]: The location of the Extension being received. [LogicalNetworkName <String>]: Name of the logical network [MachineName <String>]: The name of the hybrid machine. [MarketplaceGalleryImageName <String>]: Name of the marketplace gallery image [MetadataName <String>]: Name of the HybridIdentityMetadata. [NetworkInterfaceName <String>]: Name of the network interface [NetworkSecurityGroupName <String>]: Name of the network security group [OSType <String>]: Defines the os type. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource. [SecurityRuleName <String>]: Name of the security rule. [StorageContainerName <String>]: Name of the storage container [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [Version <String>]: The version of the Extension being received. [VirtualHardDiskName <String>]: Name of the virtual hard disk .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/remove-azstackhcivmmachineextension #> function Remove-AzStackHCIVMMachineExtension { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Parameter(ParameterSetName='DeleteViaIdentityMachine', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the machine extension. ${ExtensionName}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the machine where the extension should be deleted. ${MachineName}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='DeleteViaIdentityMachine', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity] # Identity Parameter ${MachineInputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Delete = 'AzStackHci.VM.private\Remove-AzStackHCIVMMachineExtension_Delete'; DeleteViaIdentity = 'AzStackHci.VM.private\Remove-AzStackHCIVMMachineExtension_DeleteViaIdentity'; DeleteViaIdentityMachine = 'AzStackHci.VM.private\Remove-AzStackHCIVMMachineExtension_DeleteViaIdentityMachine'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to delete a hybrid machine. .Description The operation to delete a hybrid machine. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity .Outputs System.Boolean .Notes COMPLEX PARAMETER PROPERTIES 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. INPUTOBJECT <IStackHcivmIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GalleryImageName <String>]: Name of the gallery image [Id <String>]: Resource identity path [Location <String>]: The location of the Extension being received. [LogicalNetworkName <String>]: Name of the logical network [MachineName <String>]: The name of the hybrid machine. [MarketplaceGalleryImageName <String>]: Name of the marketplace gallery image [MetadataName <String>]: Name of the HybridIdentityMetadata. [NetworkInterfaceName <String>]: Name of the network interface [NetworkSecurityGroupName <String>]: Name of the network security group [OSType <String>]: Defines the os type. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource. [SecurityRuleName <String>]: Name of the security rule. [StorageContainerName <String>]: Name of the storage container [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [Version <String>]: The version of the Extension being received. [VirtualHardDiskName <String>]: Name of the virtual hard disk .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/remove-azstackhcivmmachine #> function Remove-AzStackHCIVMMachine { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Alias('MachineName')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the hybrid machine. ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity] # Identity Parameter ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Delete = 'AzStackHci.VM.private\Remove-AzStackHCIVMMachine_Delete'; DeleteViaIdentity = 'AzStackHci.VM.private\Remove-AzStackHCIVMMachine_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to delete a marketplace gallery image. .Description The operation to delete a marketplace gallery image. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity .Outputs System.Boolean .Notes COMPLEX PARAMETER PROPERTIES 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. INPUTOBJECT <IStackHcivmIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GalleryImageName <String>]: Name of the gallery image [Id <String>]: Resource identity path [Location <String>]: The location of the Extension being received. [LogicalNetworkName <String>]: Name of the logical network [MachineName <String>]: The name of the hybrid machine. [MarketplaceGalleryImageName <String>]: Name of the marketplace gallery image [MetadataName <String>]: Name of the HybridIdentityMetadata. [NetworkInterfaceName <String>]: Name of the network interface [NetworkSecurityGroupName <String>]: Name of the network security group [OSType <String>]: Defines the os type. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource. [SecurityRuleName <String>]: Name of the security rule. [StorageContainerName <String>]: Name of the storage container [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [Version <String>]: The version of the Extension being received. [VirtualHardDiskName <String>]: Name of the virtual hard disk .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/remove-azstackhcivmmarketplacegalleryimage #> function Remove-AzStackHCIVMMarketplaceGalleryImage { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Alias('MarketplaceGalleryImageName')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # Name of the marketplace gallery image ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity] # Identity Parameter ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Delete = 'AzStackHci.VM.private\Remove-AzStackHCIVMMarketplaceGalleryImage_Delete'; DeleteViaIdentity = 'AzStackHci.VM.private\Remove-AzStackHCIVMMarketplaceGalleryImage_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to delete a network interface. .Description The operation to delete a network interface. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity .Outputs System.Boolean .Notes COMPLEX PARAMETER PROPERTIES 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. INPUTOBJECT <IStackHcivmIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GalleryImageName <String>]: Name of the gallery image [Id <String>]: Resource identity path [Location <String>]: The location of the Extension being received. [LogicalNetworkName <String>]: Name of the logical network [MachineName <String>]: The name of the hybrid machine. [MarketplaceGalleryImageName <String>]: Name of the marketplace gallery image [MetadataName <String>]: Name of the HybridIdentityMetadata. [NetworkInterfaceName <String>]: Name of the network interface [NetworkSecurityGroupName <String>]: Name of the network security group [OSType <String>]: Defines the os type. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource. [SecurityRuleName <String>]: Name of the security rule. [StorageContainerName <String>]: Name of the storage container [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [Version <String>]: The version of the Extension being received. [VirtualHardDiskName <String>]: Name of the virtual hard disk .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/remove-azstackhcivmnetworkinterface #> function Remove-AzStackHCIVMNetworkInterface { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Alias('NetworkInterfaceName')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # Name of the network interface ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity] # Identity Parameter ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Delete = 'AzStackHci.VM.private\Remove-AzStackHCIVMNetworkInterface_Delete'; DeleteViaIdentity = 'AzStackHci.VM.private\Remove-AzStackHCIVMNetworkInterface_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to delete a storage container. .Description The operation to delete a storage container. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity .Outputs System.Boolean .Notes COMPLEX PARAMETER PROPERTIES 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. INPUTOBJECT <IStackHcivmIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GalleryImageName <String>]: Name of the gallery image [Id <String>]: Resource identity path [Location <String>]: The location of the Extension being received. [LogicalNetworkName <String>]: Name of the logical network [MachineName <String>]: The name of the hybrid machine. [MarketplaceGalleryImageName <String>]: Name of the marketplace gallery image [MetadataName <String>]: Name of the HybridIdentityMetadata. [NetworkInterfaceName <String>]: Name of the network interface [NetworkSecurityGroupName <String>]: Name of the network security group [OSType <String>]: Defines the os type. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource. [SecurityRuleName <String>]: Name of the security rule. [StorageContainerName <String>]: Name of the storage container [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [Version <String>]: The version of the Extension being received. [VirtualHardDiskName <String>]: Name of the virtual hard disk .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/remove-azstackhcivmstoragepath #> function Remove-AzStackHCIVMStoragePath { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Alias('StorageContainerName')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # Name of the storage container ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity] # Identity Parameter ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Delete = 'AzStackHci.VM.private\Remove-AzStackHCIVMStoragePath_Delete'; DeleteViaIdentity = 'AzStackHci.VM.private\Remove-AzStackHCIVMStoragePath_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to delete a virtual hard disk. .Description The operation to delete a virtual hard disk. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity .Outputs System.Boolean .Notes COMPLEX PARAMETER PROPERTIES 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. INPUTOBJECT <IStackHcivmIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GalleryImageName <String>]: Name of the gallery image [Id <String>]: Resource identity path [Location <String>]: The location of the Extension being received. [LogicalNetworkName <String>]: Name of the logical network [MachineName <String>]: The name of the hybrid machine. [MarketplaceGalleryImageName <String>]: Name of the marketplace gallery image [MetadataName <String>]: Name of the HybridIdentityMetadata. [NetworkInterfaceName <String>]: Name of the network interface [NetworkSecurityGroupName <String>]: Name of the network security group [OSType <String>]: Defines the os type. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource. [SecurityRuleName <String>]: Name of the security rule. [StorageContainerName <String>]: Name of the storage container [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [Version <String>]: The version of the Extension being received. [VirtualHardDiskName <String>]: Name of the virtual hard disk .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/remove-azstackhcivmvirtualharddisk #> function Remove-AzStackHCIVMVirtualHardDisk { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Alias('VirtualHardDiskName')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # Name of the virtual hard disk ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity] # Identity Parameter ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Delete = 'AzStackHci.VM.private\Remove-AzStackHCIVMVirtualHardDisk_Delete'; DeleteViaIdentity = 'AzStackHci.VM.private\Remove-AzStackHCIVMVirtualHardDisk_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to delete a virtual machine instance. .Description The operation to delete a virtual machine instance. .Example {{ Add code here }} .Example {{ Add code here }} .Outputs System.Boolean .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/remove-azstackhcivmvirtualmachine #> function Remove-AzStackHCIVMVirtualMachine { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The fully qualified Azure Resource manager identifier of the resource. ${ResourceUri}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Delete = 'AzStackHci.VM.private\Remove-AzStackHCIVMVirtualMachine_Delete'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to restart a virtual machine instance. .Description The operation to restart a virtual machine instance. .Example {{ Add code here }} .Example {{ Add code here }} .Outputs System.Boolean .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/restart-azstackhcivmvirtualmachine #> function Restart-AzStackHCIVMVirtualMachine { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Restart', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The fully qualified Azure Resource manager identifier of the resource. ${ResourceUri}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Restart = 'AzStackHci.VM.private\Restart-AzStackHCIVMVirtualMachine_Restart'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to create or update a gallery image. Please note some properties can be set only during gallery image creation. .Description The operation to create or update a gallery image. Please note some properties can be set only during gallery image creation. .Example {{ Add code here }} .Example {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IGalleryImage .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/set-azstackhcivmgalleryimage #> function Set-AzStackHCIVMGalleryImage { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IGalleryImage])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Alias('GalleryImageName')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # Name of the gallery image ${Name}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The geo-location where the resource lives ${Location}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("NoCloud", "Azure")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Datasource for the gallery image when provisioning with cloud-init [NoCloud, Azure] ${CloudInitDataSource}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Storage ContainerID of the storage container to be used for gallery image ${ContainerId}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the extended location. ${ExtendedLocationName}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("CustomLocation")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The type of the extended location. ${ExtendedLocationType}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("V1", "V2")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The hypervisor generation of the Virtual Machine [V1, V2] ${HyperVGeneration}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the gallery image definition offer. ${IdentifierOffer}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the gallery image definition publisher. ${IdentifierPublisher}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the gallery image definition SKU. ${IdentifierSku}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Security.SecureString] # location of the image the gallery image should be created from ${ImagePath}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("Windows", "Linux")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Operating system type that the gallery image uses [Windows, Linux] ${OSType}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # This is the version of the gallery image. ${VersionName}, [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Path of Json file supplied to the Update operation ${JsonFilePath}, [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Json string supplied to the Update operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ UpdateExpanded = 'AzStackHci.VM.private\Set-AzStackHCIVMGalleryImage_UpdateExpanded'; UpdateViaJsonFilePath = 'AzStackHci.VM.private\Set-AzStackHCIVMGalleryImage_UpdateViaJsonFilePath'; UpdateViaJsonString = 'AzStackHci.VM.private\Set-AzStackHCIVMGalleryImage_UpdateViaJsonString'; } if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to create or update a logical network. Please note some properties can be set only during logical network creation. .Description The operation to create or update a logical network. Please note some properties can be set only during logical network creation. .Example {{ Add code here }} .Example {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ILogicalNetwork .Notes COMPLEX PARAMETER PROPERTIES 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. SUBNET <ISubnet[]>: Subnet - list of subnets under the logical network [AddressPrefix <String>]: The address prefix for the subnet: Cidr for this subnet - IPv4, IPv6. [AddressPrefixes <List<String>>]: List of address prefixes for the subnet. [IPAllocationMethod <String>]: IPAllocationMethod - The IP address allocation method. Possible values include: 'Static', 'Dynamic' [IPConfigurationReference <List<ISubnetIPConfigurationReference>>]: IPConfigurationReferences - list of IPConfigurationReferences [Id <String>]: The ARM ID for a Network Interface. [IPPool <List<IIPPool>>]: network associated pool of IP Addresses [End <String>]: End of the IP address pool [Name <String>]: Name of the IP-Pool [Start <String>]: Start of the IP address pool [Type <String>]: Type of the IP Pool [vm, vippool] [Name <String>]: Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. [NetworkSecurityGroupId <String>]: The ARM ID for a Network Security Group. [Route <List<IRoute>>]: Collection of routes contained within a route table. [AddressPrefix <String>]: The destination CIDR to which the route applies. [Name <String>]: Name - name of the subnet [NextHopIPAddress <String>]: The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. [Vlan <Int32?>]: Vlan to use for the subnet .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/set-azstackhcivmlogicalnetwork #> function Set-AzStackHCIVMLogicalNetwork { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ILogicalNetwork])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Alias('LogicalNetworkName')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # Name of the logical network ${Name}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The geo-location where the resource lives ${Location}, [Parameter(ParameterSetName='UpdateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String[]] # The list of DNS servers IP addresses. ${DhcpOptionDnsServer}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the extended location. ${ExtendedLocationName}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("CustomLocation")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The type of the extended location. ${ExtendedLocationType}, [Parameter(ParameterSetName='UpdateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ISubnet[]] # Subnet - list of subnets under the logical network ${Subnet}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # name of the network switch to be used for VMs ${VMSwitchName}, [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Path of Json file supplied to the Update operation ${JsonFilePath}, [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Json string supplied to the Update operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ UpdateExpanded = 'AzStackHci.VM.private\Set-AzStackHCIVMLogicalNetwork_UpdateExpanded'; UpdateViaJsonFilePath = 'AzStackHci.VM.private\Set-AzStackHCIVMLogicalNetwork_UpdateViaJsonFilePath'; UpdateViaJsonString = 'AzStackHci.VM.private\Set-AzStackHCIVMLogicalNetwork_UpdateViaJsonString'; } if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to create or update the extension. .Description The operation to create or update the extension. .Example {{ Add code here }} .Example {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMachineExtension .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/set-azstackhcivmmachineextension #> function Set-AzStackHCIVMMachineExtension { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMachineExtension])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the machine extension. ${ExtensionName}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the machine where the extension should be created or updated. ${MachineName}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The geo-location where the resource lives ${Location}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Indicates whether the extension should use a newer minor version if one is available at deployment time. # Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. ${AutoUpgradeMinorVersion}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. ${EnableAutomaticUpgrade}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # How the extension handler should be forced to update even if the extension configuration has not changed. ${ForceUpdateTag}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The machine extension name. ${InstanceViewName}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies the type of the extension; an example is "CustomScriptExtension". ${InstanceViewType}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies the version of the script handler. ${InstanceViewTypeHandlerVersion}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies the type of the extension; an example is "CustomScriptExtension". ${PropertiesType}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMachineExtensionPropertiesProtectedSettings]))] [System.Collections.Hashtable] # The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. ${ProtectedSetting}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the extension handler publisher. ${Publisher}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMachineExtensionPropertiesSettings]))] [System.Collections.Hashtable] # Json formatted public settings for the extension. ${Setting}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The status code. ${StatusCode}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The short localizable label for the status. ${StatusDisplayStatus}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("Info", "Warning", "Error")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The level code. ${StatusLevel}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The detailed status message, including for alerts and error messages. ${StatusMessage}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.DateTime] # The time of the status. ${StatusTime}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies the version of the script handler. ${TypeHandlerVersion}, [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Path of Json file supplied to the Update operation ${JsonFilePath}, [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Json string supplied to the Update operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ UpdateExpanded = 'AzStackHci.VM.private\Set-AzStackHCIVMMachineExtension_UpdateExpanded'; UpdateViaJsonFilePath = 'AzStackHci.VM.private\Set-AzStackHCIVMMachineExtension_UpdateViaJsonFilePath'; UpdateViaJsonString = 'AzStackHci.VM.private\Set-AzStackHCIVMMachineExtension_UpdateViaJsonString'; } if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to create or update a hybrid machine. Please note some properties can be set only during machine creation. .Description The operation to create or update a hybrid machine. Please note some properties can be set only during machine creation. .Example {{ Add code here }} .Example {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMachine .Notes COMPLEX PARAMETER PROPERTIES 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. EXTENSION <IMachineExtensionInstanceView[]>: Machine Extensions information (deprecated field) [Name <String>]: The machine extension name. [StatusCode <String>]: The status code. [StatusDisplayStatus <String>]: The short localizable label for the status. [StatusLevel <String>]: The level code. [StatusMessage <String>]: The detailed status message, including for alerts and error messages. [StatusTime <DateTime?>]: The time of the status. [Type <String>]: Specifies the type of the extension; an example is "CustomScriptExtension". [TypeHandlerVersion <String>]: Specifies the version of the script handler. .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/set-azstackhcivmmachine #> function Set-AzStackHCIVMMachine { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMachine])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Alias('MachineName')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the hybrid machine. ${Name}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The geo-location where the resource lives ${Location}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The correlation ID passed in from RSM per upgrade. ${AgentUpgradeCorrelationId}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies the version info w.r.t AgentUpgrade for the machine. ${AgentUpgradeDesiredVersion}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Specifies if RSM should try to upgrade this machine ${AgentUpgradeEnableAutomaticUpgrade}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Public Key that the client provides to be used during initial resource onboarding ${ClientPublicKey}, [Parameter(ParameterSetName='UpdateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMachineExtensionInstanceView[]] # Machine Extensions information (deprecated field) ${Extension}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The behavior of the service when the Arc-enabled machine starts up. ${ExtensionServiceStartupType}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The current status of the service. ${ExtensionServiceStatus}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The behavior of the service when the Arc-enabled machine starts up. ${GuestConfigurationServiceStartupType}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The current status of the service. ${GuestConfigurationServiceStatus}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("SystemAssigned")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The identity type. ${IdentityType}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("AVS", "HCI", "SCVMM", "VMware")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Indicates which kind of VM fabric the instance is an instance of, such as HCI or SCVMM etc. ${Kind}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies the assessment mode. ${LinuxConfigurationPatchSettingsAssessmentMode}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform", "AutomaticByOS", "Manual")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies the patch mode. ${LinuxConfigurationPatchSettingsPatchMode}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The city or locality where the resource is located. ${LocationDataCity}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The country or region where the resource is located ${LocationDataCountryOrRegion}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The district, state, or province where the resource is located. ${LocationDataDistrict}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # A canonical name for the geographic or physical location. ${LocationDataName}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies whether any MS SQL instance is discovered on the machine. ${MssqlDiscovered}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The type of Operating System (windows/linux). ${OSType}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. ${ParentClusterResourceId}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The resource id of the private link scope this machine is assigned to, if any. ${PrivateLinkScopeResourceId}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies the hybrid machine unique ID. ${VMId}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies the assessment mode. ${WindowsConfigurationPatchSettingsAssessmentMode}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform", "AutomaticByOS", "Manual")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies the patch mode. ${WindowsConfigurationPatchSettingsPatchMode}, [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Path of Json file supplied to the Update operation ${JsonFilePath}, [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Json string supplied to the Update operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ UpdateExpanded = 'AzStackHci.VM.private\Set-AzStackHCIVMMachine_UpdateExpanded'; UpdateViaJsonFilePath = 'AzStackHci.VM.private\Set-AzStackHCIVMMachine_UpdateViaJsonFilePath'; UpdateViaJsonString = 'AzStackHci.VM.private\Set-AzStackHCIVMMachine_UpdateViaJsonString'; } if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to create or update a marketplace gallery image. Please note some properties can be set only during marketplace gallery image creation. .Description The operation to create or update a marketplace gallery image. Please note some properties can be set only during marketplace gallery image creation. .Example {{ Add code here }} .Example {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMarketplaceGalleryImage .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/set-azstackhcivmmarketplacegalleryimage #> function Set-AzStackHCIVMMarketplaceGalleryImage { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMarketplaceGalleryImage])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Alias('MarketplaceGalleryImageName')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # Name of the marketplace gallery image ${Name}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The geo-location where the resource lives ${Location}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("NoCloud", "Azure")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Datasource for the gallery image when provisioning with cloud-init [NoCloud, Azure] ${CloudInitDataSource}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Storage ContainerID of the storage container to be used for marketplace gallery image ${ContainerId}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the extended location. ${ExtendedLocationName}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("CustomLocation")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The type of the extended location. ${ExtendedLocationType}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("V1", "V2")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The hypervisor generation of the Virtual Machine [V1, V2] ${HyperVGeneration}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the gallery image definition offer. ${IdentifierOffer}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the gallery image definition publisher. ${IdentifierPublisher}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the gallery image definition SKU. ${IdentifierSku}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("Windows", "Linux")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Operating system type that the gallery image uses [Windows, Linux] ${OSType}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # This is the version of the gallery image. ${VersionName}, [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Path of Json file supplied to the Update operation ${JsonFilePath}, [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Json string supplied to the Update operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ UpdateExpanded = 'AzStackHci.VM.private\Set-AzStackHCIVMMarketplaceGalleryImage_UpdateExpanded'; UpdateViaJsonFilePath = 'AzStackHci.VM.private\Set-AzStackHCIVMMarketplaceGalleryImage_UpdateViaJsonFilePath'; UpdateViaJsonString = 'AzStackHci.VM.private\Set-AzStackHCIVMMarketplaceGalleryImage_UpdateViaJsonString'; } if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to create or update a network interface. Please note some properties can be set only during network interface creation. .Description The operation to create or update a network interface. Please note some properties can be set only during network interface creation. .Example {{ Add code here }} .Example {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.INetworkInterface .Notes COMPLEX PARAMETER PROPERTIES 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. IPCONFIGURATION <IIPConfiguration[]>: IPConfigurations - A list of IPConfigurations of the network interface. [IPAddress <String>]: PrivateIPAddress - Private IP address of the IP configuration. [Name <String>]: Name - The name of the resource that is unique within a resource group. This name can be used to access the resource. [SubnetId <String>]: The ARM ID for a Logical Network. .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/set-azstackhcivmnetworkinterface #> function Set-AzStackHCIVMNetworkInterface { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.INetworkInterface])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Alias('NetworkInterfaceName')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # Name of the network interface ${Name}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The geo-location where the resource lives ${Location}, [Parameter(ParameterSetName='UpdateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String[]] # List of DNS server IP Addresses for the interface ${DnsSettingDnsServer}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the extended location. ${ExtendedLocationName}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("CustomLocation")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The type of the extended location. ${ExtendedLocationType}, [Parameter(ParameterSetName='UpdateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IIPConfiguration[]] # IPConfigurations - A list of IPConfigurations of the network interface. ${IPConfiguration}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # MacAddress - The MAC address of the network interface. ${MacAddress}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The ARM ID for a Network Security Group. ${NetworkSecurityGroupId}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Path of Json file supplied to the Update operation ${JsonFilePath}, [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Json string supplied to the Update operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ UpdateExpanded = 'AzStackHci.VM.private\Set-AzStackHCIVMNetworkInterface_UpdateExpanded'; UpdateViaJsonFilePath = 'AzStackHci.VM.private\Set-AzStackHCIVMNetworkInterface_UpdateViaJsonFilePath'; UpdateViaJsonString = 'AzStackHci.VM.private\Set-AzStackHCIVMNetworkInterface_UpdateViaJsonString'; } if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis Update a network security group in the specified resource group. .Description Update a network security group in the specified resource group. .Example {{ Add code here }} .Example {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.INetworkSecurityGroup .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/set-azstackhcivmnetworksecuritygroup #> function Set-AzStackHCIVMNetworkSecurityGroup { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.INetworkSecurityGroup])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Alias('NetworkSecurityGroupName')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # Name of the network security group ${Name}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The geo-location where the resource lives ${Location}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the extended location. ${ExtendedLocationName}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("CustomLocation")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The type of the extended location. ${ExtendedLocationType}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Path of Json file supplied to the Update operation ${JsonFilePath}, [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Json string supplied to the Update operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ UpdateExpanded = 'AzStackHci.VM.private\Set-AzStackHCIVMNetworkSecurityGroup_UpdateExpanded'; UpdateViaJsonFilePath = 'AzStackHci.VM.private\Set-AzStackHCIVMNetworkSecurityGroup_UpdateViaJsonFilePath'; UpdateViaJsonString = 'AzStackHci.VM.private\Set-AzStackHCIVMNetworkSecurityGroup_UpdateViaJsonString'; } if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis Update a security rule in the specified resource group. .Description Update a security rule in the specified resource group. .Example {{ Add code here }} .Example {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ISecurityRule .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/set-azstackhcivmsecurityrule #> function Set-AzStackHCIVMSecurityRule { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ISecurityRule])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Alias('SecurityRuleName')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # Name of the security rule. ${Name}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # Name of the network security group ${NetworkSecurityGroupName}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("Allow", "Deny")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The network traffic is allowed or denied. ${Access}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # A description for this rule. # Restricted to 140 chars. ${Description}, [Parameter(ParameterSetName='UpdateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String[]] # The destination address prefixes. # CIDR or destination IP ranges. ${DestinationAddressPrefix}, [Parameter(ParameterSetName='UpdateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String[]] # The destination port ranges. # Integer or range between 0 and 65535. # Asterisk '*' can also be used to match all ports. ${DestinationPortRange}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("Inbound", "Outbound")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The direction of the rule. # The direction specifies if rule will be evaluated on incoming or outgoing traffic. ${Direction}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the extended location. ${ExtendedLocationName}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("CustomLocation")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The type of the extended location. ${ExtendedLocationType}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Int32] # The priority of the rule. # The value can be between 100 and 4096. # The priority number must be unique for each rule in the collection. # The lower the priority number, the higher the priority of the rule. ${Priority}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("Tcp", "Udp", "Icmp", "*")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Network protocol this rule applies to. ${Protocol}, [Parameter(ParameterSetName='UpdateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String[]] # The CIDR or source IP ranges. ${SourceAddressPrefix}, [Parameter(ParameterSetName='UpdateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String[]] # The source port ranges. # Integer or range between 0 and 65535. # Asterisk '*' can also be used to match all ports. ${SourcePortRange}, [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Path of Json file supplied to the Update operation ${JsonFilePath}, [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Json string supplied to the Update operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ UpdateExpanded = 'AzStackHci.VM.private\Set-AzStackHCIVMSecurityRule_UpdateExpanded'; UpdateViaJsonFilePath = 'AzStackHci.VM.private\Set-AzStackHCIVMSecurityRule_UpdateViaJsonFilePath'; UpdateViaJsonString = 'AzStackHci.VM.private\Set-AzStackHCIVMSecurityRule_UpdateViaJsonString'; } if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to create or update a storage container. Please note some properties can be set only during storage container creation. .Description The operation to create or update a storage container. Please note some properties can be set only during storage container creation. .Example {{ Add code here }} .Example {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStorageContainer .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/set-azstackhcivmstoragecontainer #> function Set-AzStackHCIVMStorageContainer { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStorageContainer])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Alias('StorageContainerName')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # Name of the storage container ${Name}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The geo-location where the resource lives ${Location}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the extended location. ${ExtendedLocationName}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("CustomLocation")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The type of the extended location. ${ExtendedLocationType}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Path of the storage container on the disk ${Path}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Path of Json file supplied to the Update operation ${JsonFilePath}, [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Json string supplied to the Update operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ UpdateExpanded = 'AzStackHci.VM.private\Set-AzStackHCIVMStorageContainer_UpdateExpanded'; UpdateViaJsonFilePath = 'AzStackHci.VM.private\Set-AzStackHCIVMStorageContainer_UpdateViaJsonFilePath'; UpdateViaJsonString = 'AzStackHci.VM.private\Set-AzStackHCIVMStorageContainer_UpdateViaJsonString'; } if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to create or update a virtual hard disk. Please note some properties can be set only during virtual hard disk creation. .Description The operation to create or update a virtual hard disk. Please note some properties can be set only during virtual hard disk creation. .Example {{ Add code here }} .Example {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IVirtualHardDisk .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/set-azstackhcivmvirtualharddisk #> function Set-AzStackHCIVMVirtualHardDisk { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IVirtualHardDisk])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Alias('VirtualHardDiskName')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # Name of the virtual hard disk ${Name}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The geo-location where the resource lives ${Location}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Int32] # Block size in bytes ${BlockSizeByte}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Storage ContainerID of the storage container to be used for VHD ${ContainerId}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("vhdx", "vhd")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The format of the actual VHD file [vhd, vhdx] ${DiskFileFormat}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Int64] # Size of the disk in GB ${DiskSizeGb}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Boolean for enabling dynamic sizing on the virtual hard disk ${Dynamic}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the extended location. ${ExtendedLocationName}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("CustomLocation")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The type of the extended location. ${ExtendedLocationType}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("V1", "V2")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The hypervisor generation of the Virtual Machine [V1, V2] ${HyperVGeneration}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Int32] # Logical sector in bytes ${LogicalSectorByte}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Int32] # Physical sector in bytes ${PhysicalSectorByte}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Path of Json file supplied to the Update operation ${JsonFilePath}, [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Json string supplied to the Update operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ UpdateExpanded = 'AzStackHci.VM.private\Set-AzStackHCIVMVirtualHardDisk_UpdateExpanded'; UpdateViaJsonFilePath = 'AzStackHci.VM.private\Set-AzStackHCIVMVirtualHardDisk_UpdateViaJsonFilePath'; UpdateViaJsonString = 'AzStackHci.VM.private\Set-AzStackHCIVMVirtualHardDisk_UpdateViaJsonString'; } if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. .Description The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. .Example {{ Add code here }} .Example {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IVirtualMachineInstance .Notes COMPLEX PARAMETER PROPERTIES 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. LINUXCONFIGURATIONSSHPUBLICKEY <ISshPublicKey[]>: The list of SSH public keys used to authenticate with linux based VMs. [KeyData <String>]: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). [Path <String>]: Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys NETWORKPROFILENETWORKINTERFACE <INetworkInterfaceArmReference[]>: NetworkInterfaces - list of network interfaces to be attached to the virtual machine instance [Id <String>]: The ARM ID for a Network Interface. STORAGEPROFILEDATADISK <IVirtualHardDiskArmReference[]>: adds data disks to the virtual machine instance [Id <String>]: The ARM ID for a Virtual Hard Disk. WINDOWSCONFIGURATIONSSHPUBLICKEY <ISshPublicKey[]>: The list of SSH public keys used to authenticate with linux based VMs. [KeyData <String>]: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). [Path <String>]: Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/set-azstackhcivmvirtualmachineinstance #> function Set-AzStackHCIVMVirtualMachineInstance { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IVirtualMachineInstance])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The fully qualified Azure Resource manager identifier of the resource. ${ResourceUri}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Int32] # Defines the amount of extra memory that should be reserved for a virtual machine instance at runtime, as a percentage of the total memory that the virtual machine instance is thought to need. # This only applies to virtual systems with dynamic memory enabled. # This property can be in the range of 5 to 2000. ${DynamicMemoryConfigTargetMemoryBuffer}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Int64] # Maximum memory in MB ${DynamicMemoryMaximumMemoryInMb}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Int64] # Minimum memory in MB ${DynamicMemoryMinimumMemoryInMb}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the extended location. ${ExtendedLocationName}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("CustomLocation")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The type of the extended location. ${ExtendedLocationType}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Int64] # RAM in MB for the virtual machine instance ${HardwareProfileMemoryMb}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Int32] # number of processors for the virtual machine instance ${HardwareProfileProcessor}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("Default", "Standard_A2_v2", "Standard_A4_v2", "Standard_D2s_v3", "Standard_D4s_v3", "Standard_D8s_v3", "Standard_D16s_v3", "Standard_D32s_v3", "Standard_DS2_v2", "Standard_DS3_v2", "Standard_DS4_v2", "Standard_DS5_v2", "Standard_DS13_v2", "Standard_K8S_v1", "Standard_K8S2_v1", "Standard_K8S3_v1", "Standard_K8S4_v1", "Standard_NK6", "Standard_NK12", "Standard_NV6", "Standard_NV12", "Standard_K8S5_v1", "Custom")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Enum of VM Sizes ${HardwareProfileVMSize}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Security.SecureString] # The HTTP proxy server endpoint to use. ${HttpProxyConfigHttpProxy}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Security.SecureString] # The HTTPS proxy server endpoint to use. ${HttpProxyConfigHttpsProxy}, [Parameter(ParameterSetName='UpdateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String[]] # The endpoints that should not go through proxy. ${HttpProxyConfigNoProxy}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Alternative CA cert to use for connecting to proxy servers. ${HttpProxyConfigTrustedCa}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). ${IdentityType}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The ARM ID for an image resource used by the virtual machine instance. ${ImageReferenceId}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # DisablePasswordAuthentication - whether password authentication should be disabled ${LinuxConfigurationDisablePasswordAuthentication}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine instance creation process. ${LinuxConfigurationProvisionVMAgent}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Used to indicate whether the VM Config Agent should be installed during the virtual machine creation process. ${LinuxConfigurationProvisionVMConfigAgent}, [Parameter(ParameterSetName='UpdateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ISshPublicKey[]] # The list of SSH public keys used to authenticate with linux based VMs. ${LinuxConfigurationSshPublicKey}, [Parameter(ParameterSetName='UpdateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.INetworkInterfaceArmReference[]] # NetworkInterfaces - list of network interfaces to be attached to the virtual machine instance ${NetworkProfileNetworkInterface}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The ARM ID for a Virtual Hard Disk. ${OSDiskId}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("Windows", "Linux")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. # Possible values are: Windows, Linux. ${OSDiskOstype}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Security.SecureString] # AdminPassword - admin password ${OSProfileAdminPassword}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # AdminUsername - admin username ${OSProfileAdminUsername}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # ComputerName - name of the compute ${OSProfileComputerName}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Unique identifier defined by ARC to identify the guest of the VM. ${ResourceUid}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Enable TPM flag ${SecurityProfileEnableTpm}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("TrustedLaunch", "ConfidentialVM")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies the SecurityType of the virtual machine. # EnableTPM and SecureBootEnabled must be set to true for SecurityType to function. ${SecurityProfileSecurityType}, [Parameter(ParameterSetName='UpdateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IVirtualHardDiskArmReference[]] # adds data disks to the virtual machine instance ${StorageProfileDataDisk}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Id of the storage container that hosts the VM configuration file ${StorageProfileVMConfigStoragePathId}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Specifies whether secure boot should be enabled on the virtual machine instance. ${UefiSettingSecureBootEnabled}, [Parameter(ParameterSetName='UpdateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String[]] # The array of user assigned identities associated with the resource. # The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' ${UserAssignedIdentity}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Whether to EnableAutomaticUpdates on the machine ${WindowConfigurationEnableAutomaticUpdate}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine instance creation process. ${WindowConfigurationProvisionVMAgent}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Used to indicate whether the VM Config Agent should be installed during the virtual machine creation process. ${WindowConfigurationProvisionVMConfigAgent}, [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # TimeZone for the virtual machine instance ${WindowConfigurationTimeZone}, [Parameter(ParameterSetName='UpdateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ISshPublicKey[]] # The list of SSH public keys used to authenticate with linux based VMs. ${WindowsConfigurationSshPublicKey}, [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Path of Json file supplied to the Update operation ${JsonFilePath}, [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Json string supplied to the Update operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ UpdateExpanded = 'AzStackHci.VM.private\Set-AzStackHCIVMVirtualMachineInstance_UpdateExpanded'; UpdateViaJsonFilePath = 'AzStackHci.VM.private\Set-AzStackHCIVMVirtualMachineInstance_UpdateViaJsonFilePath'; UpdateViaJsonString = 'AzStackHci.VM.private\Set-AzStackHCIVMVirtualMachineInstance_UpdateViaJsonString'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to start a virtual machine instance. .Description The operation to start a virtual machine instance. .Example {{ Add code here }} .Example {{ Add code here }} .Outputs System.Boolean .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/start-azstackhcivmvirtualmachine #> function Start-AzStackHCIVMVirtualMachine { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Start', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The fully qualified Azure Resource manager identifier of the resource. ${ResourceUri}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Start = 'AzStackHci.VM.private\Start-AzStackHCIVMVirtualMachine_Start'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to stop a virtual machine instance. .Description The operation to stop a virtual machine instance. .Example {{ Add code here }} .Example {{ Add code here }} .Outputs System.Boolean .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/stop-azstackhcivmvirtualmachine #> function Stop-AzStackHCIVMVirtualMachine { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Stop', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The fully qualified Azure Resource manager identifier of the resource. ${ResourceUri}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Stop = 'AzStackHci.VM.private\Stop-AzStackHCIVMVirtualMachine_Stop'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to Upgrade Machine Extensions. .Description The operation to Upgrade Machine Extensions. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMachineExtensionUpgrade .Inputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity .Outputs System.Boolean .Notes COMPLEX PARAMETER PROPERTIES 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. EXTENSIONUPGRADEPARAMETER <IMachineExtensionUpgrade>: Describes the Machine Extension Upgrade Properties. [ExtensionTarget <IExtensionTarget>]: Describes the Extension Target Properties. [(Any) <IExtensionTargetProperties>]: This indicates any property can be added to this object. INPUTOBJECT <IStackHcivmIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GalleryImageName <String>]: Name of the gallery image [Id <String>]: Resource identity path [Location <String>]: The location of the Extension being received. [LogicalNetworkName <String>]: Name of the logical network [MachineName <String>]: The name of the hybrid machine. [MarketplaceGalleryImageName <String>]: Name of the marketplace gallery image [MetadataName <String>]: Name of the HybridIdentityMetadata. [NetworkInterfaceName <String>]: Name of the network interface [NetworkSecurityGroupName <String>]: Name of the network security group [OSType <String>]: Defines the os type. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource. [SecurityRuleName <String>]: Name of the security rule. [StorageContainerName <String>]: Name of the storage container [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [Version <String>]: The version of the Extension being received. [VirtualHardDiskName <String>]: Name of the virtual hard disk .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/update-azstackhcivmextension #> function Update-AzStackHCIVMExtension { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='UpgradeExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Upgrade', Mandatory)] [Parameter(ParameterSetName='UpgradeExpanded', Mandatory)] [Parameter(ParameterSetName='UpgradeViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='UpgradeViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the hybrid machine. ${MachineName}, [Parameter(ParameterSetName='Upgrade', Mandatory)] [Parameter(ParameterSetName='UpgradeExpanded', Mandatory)] [Parameter(ParameterSetName='UpgradeViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='UpgradeViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Upgrade')] [Parameter(ParameterSetName='UpgradeExpanded')] [Parameter(ParameterSetName='UpgradeViaJsonFilePath')] [Parameter(ParameterSetName='UpgradeViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='UpgradeViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpgradeViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='Upgrade', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpgradeViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMachineExtensionUpgrade] # Describes the Machine Extension Upgrade Properties. ${ExtensionUpgradeParameter}, [Parameter(ParameterSetName='UpgradeExpanded')] [Parameter(ParameterSetName='UpgradeViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IExtensionTarget]))] [System.Collections.Hashtable] # Describes the Extension Target Properties. ${ExtensionTarget}, [Parameter(ParameterSetName='UpgradeViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Path of Json file supplied to the Upgrade operation ${JsonFilePath}, [Parameter(ParameterSetName='UpgradeViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Json string supplied to the Upgrade operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Returns true when the command succeeds ${PassThru}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Upgrade = 'AzStackHci.VM.private\Update-AzStackHCIVMExtension_Upgrade'; UpgradeExpanded = 'AzStackHci.VM.private\Update-AzStackHCIVMExtension_UpgradeExpanded'; UpgradeViaIdentity = 'AzStackHci.VM.private\Update-AzStackHCIVMExtension_UpgradeViaIdentity'; UpgradeViaIdentityExpanded = 'AzStackHci.VM.private\Update-AzStackHCIVMExtension_UpgradeViaIdentityExpanded'; UpgradeViaJsonFilePath = 'AzStackHci.VM.private\Update-AzStackHCIVMExtension_UpgradeViaJsonFilePath'; UpgradeViaJsonString = 'AzStackHci.VM.private\Update-AzStackHCIVMExtension_UpgradeViaJsonString'; } if (('Upgrade', 'UpgradeExpanded', 'UpgradeViaJsonFilePath', 'UpgradeViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to update a gallery image. .Description The operation to update a gallery image. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IGalleryImage .Notes COMPLEX PARAMETER PROPERTIES 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. INPUTOBJECT <IStackHcivmIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GalleryImageName <String>]: Name of the gallery image [Id <String>]: Resource identity path [Location <String>]: The location of the Extension being received. [LogicalNetworkName <String>]: Name of the logical network [MachineName <String>]: The name of the hybrid machine. [MarketplaceGalleryImageName <String>]: Name of the marketplace gallery image [MetadataName <String>]: Name of the HybridIdentityMetadata. [NetworkInterfaceName <String>]: Name of the network interface [NetworkSecurityGroupName <String>]: Name of the network security group [OSType <String>]: Defines the os type. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource. [SecurityRuleName <String>]: Name of the security rule. [StorageContainerName <String>]: Name of the storage container [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [Version <String>]: The version of the Extension being received. [VirtualHardDiskName <String>]: Name of the virtual hard disk .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/update-azstackhcivmgalleryimage #> function Update-AzStackHCIVMGalleryImage { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IGalleryImage])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('GalleryImageName')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # Name of the gallery image ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaJsonFilePath')] [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IGalleryImageTagsUpdateTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Path of Json file supplied to the Update operation ${JsonFilePath}, [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Json string supplied to the Update operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ UpdateExpanded = 'AzStackHci.VM.private\Update-AzStackHCIVMGalleryImage_UpdateExpanded'; UpdateViaIdentityExpanded = 'AzStackHci.VM.private\Update-AzStackHCIVMGalleryImage_UpdateViaIdentityExpanded'; UpdateViaJsonFilePath = 'AzStackHci.VM.private\Update-AzStackHCIVMGalleryImage_UpdateViaJsonFilePath'; UpdateViaJsonString = 'AzStackHci.VM.private\Update-AzStackHCIVMGalleryImage_UpdateViaJsonString'; } if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis Update GuestAgent. .Description Update GuestAgent. .Example {{ Add code here }} .Example {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IGuestAgent .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/update-azstackhcivmguestagent #> function Update-AzStackHCIVMGuestAgent { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IGuestAgent])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The fully qualified Azure Resource manager identifier of the resource. ${ResourceUri}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Security.SecureString] # The password to connect with the guest. ${CredentialsPassword}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The username to connect with the guest. ${CredentialsUsername}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("install", "uninstall", "repair")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The guest agent provisioning action. ${ProvisioningAction}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ UpdateExpanded = 'AzStackHci.VM.private\Update-AzStackHCIVMGuestAgent_UpdateExpanded'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to create or update the extension. .Description The operation to create or update the extension. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMachineExtensionUpdate .Inputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMachineExtension .Notes COMPLEX PARAMETER PROPERTIES 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. EXTENSIONPARAMETER <IMachineExtensionUpdate>: Describes a Machine Extension Update. [Tag <IResourceUpdateTags>]: Resource tags [(Any) <String>]: This indicates any property can be added to this object. [AutoUpgradeMinorVersion <Boolean?>]: Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. [EnableAutomaticUpgrade <Boolean?>]: Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. [ForceUpdateTag <String>]: How the extension handler should be forced to update even if the extension configuration has not changed. [ProtectedSetting <IMachineExtensionUpdatePropertiesProtectedSettings>]: The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. [(Any) <Object>]: This indicates any property can be added to this object. [Publisher <String>]: The name of the extension handler publisher. [Setting <IMachineExtensionUpdatePropertiesSettings>]: Json formatted public settings for the extension. [(Any) <Object>]: This indicates any property can be added to this object. [Type <String>]: Specifies the type of the extension; an example is "CustomScriptExtension". [TypeHandlerVersion <String>]: Specifies the version of the script handler. INPUTOBJECT <IStackHcivmIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GalleryImageName <String>]: Name of the gallery image [Id <String>]: Resource identity path [Location <String>]: The location of the Extension being received. [LogicalNetworkName <String>]: Name of the logical network [MachineName <String>]: The name of the hybrid machine. [MarketplaceGalleryImageName <String>]: Name of the marketplace gallery image [MetadataName <String>]: Name of the HybridIdentityMetadata. [NetworkInterfaceName <String>]: Name of the network interface [NetworkSecurityGroupName <String>]: Name of the network security group [OSType <String>]: Defines the os type. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource. [SecurityRuleName <String>]: Name of the security rule. [StorageContainerName <String>]: Name of the storage container [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [Version <String>]: The version of the Extension being received. [VirtualHardDiskName <String>]: Name of the virtual hard disk MACHINEINPUTOBJECT <IStackHcivmIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GalleryImageName <String>]: Name of the gallery image [Id <String>]: Resource identity path [Location <String>]: The location of the Extension being received. [LogicalNetworkName <String>]: Name of the logical network [MachineName <String>]: The name of the hybrid machine. [MarketplaceGalleryImageName <String>]: Name of the marketplace gallery image [MetadataName <String>]: Name of the HybridIdentityMetadata. [NetworkInterfaceName <String>]: Name of the network interface [NetworkSecurityGroupName <String>]: Name of the network security group [OSType <String>]: Defines the os type. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource. [SecurityRuleName <String>]: Name of the security rule. [StorageContainerName <String>]: Name of the storage container [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [Version <String>]: The version of the Extension being received. [VirtualHardDiskName <String>]: Name of the virtual hard disk .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/update-azstackhcivmmachineextension #> function Update-AzStackHCIVMMachineExtension { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMachineExtension])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaIdentityMachine', Mandatory)] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the machine extension. ${ExtensionName}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the machine where the extension should be created or updated. ${MachineName}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaJsonFilePath')] [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='UpdateViaIdentityMachine', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity] # Identity Parameter ${MachineInputObject}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Indicates whether the extension should use a newer minor version if one is available at deployment time. # Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. ${AutoUpgradeMinorVersion}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. ${EnableAutomaticUpgrade}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # How the extension handler should be forced to update even if the extension configuration has not changed. ${ForceUpdateTag}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMachineExtensionUpdatePropertiesProtectedSettings]))] [System.Collections.Hashtable] # The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. ${ProtectedSetting}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the extension handler publisher. ${Publisher}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMachineExtensionUpdatePropertiesSettings]))] [System.Collections.Hashtable] # Json formatted public settings for the extension. ${Setting}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IResourceUpdateTags]))] [System.Collections.Hashtable] # Resource tags ${Tag}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies the type of the extension; an example is "CustomScriptExtension". ${Type}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies the version of the script handler. ${TypeHandlerVersion}, [Parameter(ParameterSetName='UpdateViaIdentityMachine', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMachineExtensionUpdate] # Describes a Machine Extension Update. ${ExtensionParameter}, [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Path of Json file supplied to the Update operation ${JsonFilePath}, [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Json string supplied to the Update operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ UpdateExpanded = 'AzStackHci.VM.private\Update-AzStackHCIVMMachineExtension_UpdateExpanded'; UpdateViaIdentityExpanded = 'AzStackHci.VM.private\Update-AzStackHCIVMMachineExtension_UpdateViaIdentityExpanded'; UpdateViaIdentityMachine = 'AzStackHci.VM.private\Update-AzStackHCIVMMachineExtension_UpdateViaIdentityMachine'; UpdateViaIdentityMachineExpanded = 'AzStackHci.VM.private\Update-AzStackHCIVMMachineExtension_UpdateViaIdentityMachineExpanded'; UpdateViaJsonFilePath = 'AzStackHci.VM.private\Update-AzStackHCIVMMachineExtension_UpdateViaJsonFilePath'; UpdateViaJsonString = 'AzStackHci.VM.private\Update-AzStackHCIVMMachineExtension_UpdateViaJsonString'; } if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to update a hybrid machine. .Description The operation to update a hybrid machine. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMachine .Notes COMPLEX PARAMETER PROPERTIES 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. INPUTOBJECT <IStackHcivmIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GalleryImageName <String>]: Name of the gallery image [Id <String>]: Resource identity path [Location <String>]: The location of the Extension being received. [LogicalNetworkName <String>]: Name of the logical network [MachineName <String>]: The name of the hybrid machine. [MarketplaceGalleryImageName <String>]: Name of the marketplace gallery image [MetadataName <String>]: Name of the HybridIdentityMetadata. [NetworkInterfaceName <String>]: Name of the network interface [NetworkSecurityGroupName <String>]: Name of the network security group [OSType <String>]: Defines the os type. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource. [SecurityRuleName <String>]: Name of the security rule. [StorageContainerName <String>]: Name of the storage container [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [Version <String>]: The version of the Extension being received. [VirtualHardDiskName <String>]: Name of the virtual hard disk .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/update-azstackhcivmmachine #> function Update-AzStackHCIVMMachine { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMachine])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('MachineName')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the hybrid machine. ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaJsonFilePath')] [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The correlation ID passed in from RSM per upgrade. ${AgentUpgradeCorrelationId}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies the version info w.r.t AgentUpgrade for the machine. ${AgentUpgradeDesiredVersion}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Specifies if RSM should try to upgrade this machine ${AgentUpgradeEnableAutomaticUpgrade}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("SystemAssigned")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The identity type. ${IdentityType}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("AVS", "HCI", "SCVMM", "VMware")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Indicates which kind of VM fabric the instance is an instance of, such as HCI or SCVMM etc. ${Kind}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies the assessment mode. ${LinuxConfigurationPatchSettingsAssessmentMode}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform", "AutomaticByOS", "Manual")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies the patch mode. ${LinuxConfigurationPatchSettingsPatchMode}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The city or locality where the resource is located. ${LocationDataCity}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The country or region where the resource is located ${LocationDataCountryOrRegion}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The district, state, or province where the resource is located. ${LocationDataDistrict}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # A canonical name for the geographic or physical location. ${LocationDataName}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. ${ParentClusterResourceId}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The resource id of the private link scope this machine is assigned to, if any. ${PrivateLinkScopeResourceId}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IResourceUpdateTags]))] [System.Collections.Hashtable] # Resource tags ${Tag}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies the assessment mode. ${WindowsConfigurationPatchSettingsAssessmentMode}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform", "AutomaticByOS", "Manual")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies the patch mode. ${WindowsConfigurationPatchSettingsPatchMode}, [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Path of Json file supplied to the Update operation ${JsonFilePath}, [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Json string supplied to the Update operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ UpdateExpanded = 'AzStackHci.VM.private\Update-AzStackHCIVMMachine_UpdateExpanded'; UpdateViaIdentityExpanded = 'AzStackHci.VM.private\Update-AzStackHCIVMMachine_UpdateViaIdentityExpanded'; UpdateViaJsonFilePath = 'AzStackHci.VM.private\Update-AzStackHCIVMMachine_UpdateViaJsonFilePath'; UpdateViaJsonString = 'AzStackHci.VM.private\Update-AzStackHCIVMMachine_UpdateViaJsonString'; } if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to update a marketplace gallery image. .Description The operation to update a marketplace gallery image. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMarketplaceGalleryImage .Notes COMPLEX PARAMETER PROPERTIES 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. INPUTOBJECT <IStackHcivmIdentity>: Identity Parameter [ExtensionName <String>]: The name of the machine extension. [ExtensionType <String>]: The extensionType of the Extension being received. [GalleryImageName <String>]: Name of the gallery image [Id <String>]: Resource identity path [Location <String>]: The location of the Extension being received. [LogicalNetworkName <String>]: Name of the logical network [MachineName <String>]: The name of the hybrid machine. [MarketplaceGalleryImageName <String>]: Name of the marketplace gallery image [MetadataName <String>]: Name of the HybridIdentityMetadata. [NetworkInterfaceName <String>]: Name of the network interface [NetworkSecurityGroupName <String>]: Name of the network security group [OSType <String>]: Defines the os type. [Publisher <String>]: The publisher of the Extension being received. [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceUri <String>]: The fully qualified Azure Resource manager identifier of the resource. [SecurityRuleName <String>]: Name of the security rule. [StorageContainerName <String>]: Name of the storage container [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [Version <String>]: The version of the Extension being received. [VirtualHardDiskName <String>]: Name of the virtual hard disk .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/update-azstackhcivmmarketplacegalleryimage #> function Update-AzStackHCIVMMarketplaceGalleryImage { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMarketplaceGalleryImage])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('MarketplaceGalleryImageName')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # Name of the marketplace gallery image ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaJsonFilePath')] [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. # The value must be an UUID. ${SubscriptionId}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IStackHcivmIdentity] # Identity Parameter ${InputObject}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IMarketplaceGalleryImageTagsUpdateTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Path of Json file supplied to the Update operation ${JsonFilePath}, [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Json string supplied to the Update operation ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ UpdateExpanded = 'AzStackHci.VM.private\Update-AzStackHCIVMMarketplaceGalleryImage_UpdateExpanded'; UpdateViaIdentityExpanded = 'AzStackHci.VM.private\Update-AzStackHCIVMMarketplaceGalleryImage_UpdateViaIdentityExpanded'; UpdateViaJsonFilePath = 'AzStackHci.VM.private\Update-AzStackHCIVMMarketplaceGalleryImage_UpdateViaJsonFilePath'; UpdateViaJsonString = 'AzStackHci.VM.private\Update-AzStackHCIVMMarketplaceGalleryImage_UpdateViaJsonString'; } if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. .Description The operation to create or update a virtual machine instance. Please note some properties can be set only during virtual machine instance creation. .Example {{ Add code here }} .Example {{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IVirtualMachineInstance .Notes COMPLEX PARAMETER PROPERTIES 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. LINUXCONFIGURATIONSSHPUBLICKEY <ISshPublicKey[]>: The list of SSH public keys used to authenticate with linux based VMs. [KeyData <String>]: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). [Path <String>]: Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys NETWORKPROFILENETWORKINTERFACE <INetworkInterfaceArmReference[]>: NetworkInterfaces - list of network interfaces to be attached to the virtual machine instance [Id <String>]: The ARM ID for a Network Interface. STORAGEPROFILEDATADISK <IVirtualHardDiskArmReference[]>: adds data disks to the virtual machine instance [Id <String>]: The ARM ID for a Virtual Hard Disk. WINDOWSCONFIGURATIONSSHPUBLICKEY <ISshPublicKey[]>: The list of SSH public keys used to authenticate with linux based VMs. [KeyData <String>]: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). [Path <String>]: Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys .Link https://learn.microsoft.com/powershell/module/azstackhci.vm/update-azstackhcivmvirtualmachine #> function Update-AzStackHCIVMVirtualMachine { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IVirtualMachineInstance])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Path')] [System.String] # The fully qualified Azure Resource manager identifier of the resource. ${ResourceUri}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Int32] # Defines the amount of extra memory that should be reserved for a virtual machine instance at runtime, as a percentage of the total memory that the virtual machine instance is thought to need. # This only applies to virtual systems with dynamic memory enabled. # This property can be in the range of 5 to 2000. ${DynamicMemoryConfigTargetMemoryBuffer}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Int64] # Maximum memory in MB ${DynamicMemoryMaximumMemoryInMb}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Int64] # Minimum memory in MB ${DynamicMemoryMinimumMemoryInMb}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The name of the extended location. ${ExtendedLocationName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("CustomLocation")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The type of the extended location. ${ExtendedLocationType}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Int64] # RAM in MB for the virtual machine instance ${HardwareProfileMemoryMb}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Int32] # number of processors for the virtual machine instance ${HardwareProfileProcessor}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("Default", "Standard_A2_v2", "Standard_A4_v2", "Standard_D2s_v3", "Standard_D4s_v3", "Standard_D8s_v3", "Standard_D16s_v3", "Standard_D32s_v3", "Standard_DS2_v2", "Standard_DS3_v2", "Standard_DS4_v2", "Standard_DS5_v2", "Standard_DS13_v2", "Standard_K8S_v1", "Standard_K8S2_v1", "Standard_K8S3_v1", "Standard_K8S4_v1", "Standard_NK6", "Standard_NK12", "Standard_NV6", "Standard_NV12", "Standard_K8S5_v1", "Custom")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Enum of VM Sizes ${HardwareProfileVMSize}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Security.SecureString] # The HTTP proxy server endpoint to use. ${HttpProxyConfigHttpProxy}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Security.SecureString] # The HTTPS proxy server endpoint to use. ${HttpProxyConfigHttpsProxy}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String[]] # The endpoints that should not go through proxy. ${HttpProxyConfigNoProxy}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Alternative CA cert to use for connecting to proxy servers. ${HttpProxyConfigTrustedCa}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). ${IdentityType}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # DisablePasswordAuthentication - whether password authentication should be disabled ${LinuxConfigurationDisablePasswordAuthentication}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine instance creation process. ${LinuxConfigurationProvisionVMAgent}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Used to indicate whether the VM Config Agent should be installed during the virtual machine creation process. ${LinuxConfigurationProvisionVMConfigAgent}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ISshPublicKey[]] # The list of SSH public keys used to authenticate with linux based VMs. ${LinuxConfigurationSshPublicKey}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.INetworkInterfaceArmReference[]] # NetworkInterfaces - list of network interfaces to be attached to the virtual machine instance ${NetworkProfileNetworkInterface}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # The ARM ID for a Virtual Hard Disk. ${OSDiskId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("Windows", "Linux")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. # Possible values are: Windows, Linux. ${OSDiskOstype}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # AdminUsername - admin username ${OSProfileAdminUsername}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # ComputerName - name of the compute ${OSProfileComputerName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Unique identifier defined by ARC to identify the guest of the VM. ${ResourceUid}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Enable TPM flag ${SecurityProfileEnableTpm}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.PSArgumentCompleterAttribute("TrustedLaunch", "ConfidentialVM")] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Specifies the SecurityType of the virtual machine. # EnableTPM and SecureBootEnabled must be set to true for SecurityType to function. ${SecurityProfileSecurityType}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.IVirtualHardDiskArmReference[]] # adds data disks to the virtual machine instance ${StorageProfileDataDisk}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # Id of the storage container that hosts the VM configuration file ${StorageProfileVMConfigStoragePathId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Specifies whether secure boot should be enabled on the virtual machine instance. ${UefiSettingSecureBootEnabled}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String[]] # The array of user assigned identities associated with the resource. # The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' ${UserAssignedIdentity}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Whether to EnableAutomaticUpdates on the machine ${WindowConfigurationEnableAutomaticUpdate}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Used to indicate whether Arc for Servers agent onboarding should be triggered during the virtual machine instance creation process. ${WindowConfigurationProvisionVMAgent}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.Management.Automation.SwitchParameter] # Used to indicate whether the VM Config Agent should be installed during the virtual machine creation process. ${WindowConfigurationProvisionVMConfigAgent}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [System.String] # TimeZone for the virtual machine instance ${WindowConfigurationTimeZone}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Models.ISshPublicKey[]] # The list of SSH public keys used to authenticate with linux based VMs. ${WindowsConfigurationSshPublicKey}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Azure')] [System.Management.Automation.PSObject] # The DefaultProfile parameter is not functional. # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command as a job ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Run the command asynchronously ${NoWait}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.StackHCIVM.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ UpdateExpanded = 'AzStackHci.VM.private\Update-AzStackHCIVMVirtualMachine_UpdateExpanded'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } |