CINXE.COM

New-AzVM (Az.Compute) | Microsoft Learn

<!DOCTYPE html><html class="hasSidebar hasPageActions hasBreadcrumb reference reference has-default-focus theme-light" lang="en-us" dir="ltr" data-authenticated="false" data-auth-status-determined="false" data-target="docs" x-ms-format-detection="none"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta property="og:title" content="New-AzVM (Az.Compute)" /> <meta property="og:type" content="website" /> <meta property="og:url" content="https://learn.microsoft.com/en-us/powershell/module/az.compute/new-azvm?view=azps-13.0.0" /><meta property="og:description" content="The New-AzVM cmdlet creates a virtual machine in Azure. This cmdlet takes a virtual machine object as input. The New-AzVM cmdlet will create a new storage account for boot diagnostics if one does not already exist. Use the New-AzVMConfig cmdlet to create a virtual machine object. Then use the following cmdlets to set different properties of the virtual machine object: Add-AzVMNetworkInterface to set the network profile. Set-AzVMOperatingSystem to set the OS profile. Set-AzVMSourceImage to set the source image. Set-AzVMOSDisk to set the OS disk(storage profile). Get-AzComputeResourceSku can also be used to find out available virtual machine sizes for your subscription and region. The SimpleParameterSet provides a convenient method to create a VM by making common VM creation arguments optional. See Quickstart: Create a Windows virtual machine in Azure with PowerShell for tutorial. " /><meta property="og:image" content="https://learn.microsoft.com/en-us/media/open-graph-image.png" /> <meta property="og:image:alt" content="Microsoft Learn" /> <meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:site" content="@MicrosoftLearn" /> <meta name="color-scheme" content="light dark"><meta name="apiPlatform" content="powershell" /> <meta name="archive_url" content="https://learn.microsoft.com/previous-versions/powershell/azure/deploymentmanager/overview" /> <meta name="author" content="mikefrobbins" /> <meta name="breadcrumb_path" content="/powershell/bread/toc.json" /> <meta name="default_moniker" content="azps-13.0.0" /> <meta name="depot_name" content="Azure.azureps" /> <meta name="description" content="The New-AzVM cmdlet creates a virtual machine in Azure. This cmdlet takes a virtual machine object as input. The New-AzVM cmdlet will create a new storage account for boot diagnostics if one does not already exist. Use the New-AzVMConfig cmdlet to create a virtual machine object. Then use the following cmdlets to set different properties of the virtual machine object: Add-AzVMNetworkInterface to set the network profile. Set-AzVMOperatingSystem to set the OS profile. Set-AzVMSourceImage to set the source image. Set-AzVMOSDisk to set the OS disk(storage profile). Get-AzComputeResourceSku can also be used to find out available virtual machine sizes for your subscription and region. The SimpleParameterSet provides a convenient method to create a VM by making common VM creation arguments optional. See Quickstart: Create a Windows virtual machine in Azure with PowerShell for tutorial. " /> <meta name="document_id" content="395a7898-b2ec-d568-e222-9df72b405a6f" /> <meta name="document_version_independent_id" content="a6bc52d2-3a95-211b-80ef-401958e6ec03" /> <meta name="external help file" content="Microsoft.Azure.PowerShell.Cmdlets.Compute.dll-Help.xml" /> <meta name="feedback_help_link_type" content="ask-the-community" /> <meta name="feedback_help_link_url" content="https://techcommunity.microsoft.com/t5/azure-tools/bd-p/AzureTools" /> <meta name="feedback_product_url" content="https://github.com/Azure/azure-powershell/issues/new/choose" /> <meta name="feedback_system" content="OpenSource" /> <meta name="git_commit_id" content="e625709f7333248458a75ec66834797048204e6f" /> <meta name="gitcommit" content="https://github.com/MicrosoftDocs/azure-docs-powershell/blob/e625709f7333248458a75ec66834797048204e6f/azps-13.0.0/Az.Compute/New-AzVM.md" /> <meta name="locale" content="en-us" /> <meta name="module" content="Az.Compute" /> <meta name="Module Name" content="Az.Compute" /> <meta name="monikers" content="azps-13.0.0" /> <meta name="ms.assetid" content="05E6155D-4F0E-406B-9312-77AD97EF66EE" /> <meta name="ms.author" content="mirobb" /> <meta name="ms.date" content="11/19/2024" /> <meta name="ms.devlang" content="powershell" /> <meta name="ms.manager" content="jasongroce" /> <meta name="ms.service" content="azure-virtual-machines" /> <meta name="ms.topic" content="reference" /> <meta name="online version" content="https://learn.microsoft.com/powershell/module/az.compute/new-azvm" /> <meta name="original_content_git_url" content="https://github.com/Azure/azure-powershell/blob/main/src/Compute/Compute/help/New-AzVM.md" /> <meta name="page_kind" content="command" /> <meta name="page_type" content="powershell" /> <meta name="PlatyPS schema version" content="2.0.0" /> <meta name="schema" content="PowershellCmdlet" /> <meta name="site_name" content="Docs" /> <meta name="toc_rel" content="../azure-powershell/toc.json" /> <meta name="uhfHeaderId" content="Azure" /> <meta name="uid" content="Az.Compute.New-AzVM" /> <meta name="updated_at" content="2024-11-19 05:50 PM" /> <meta name="persistent_id" content="66143d02-78ac-30ef-dca1-709f3deb6078" /> <meta name="cmProducts" content="https://authoring-docs-microsoft.poolparty.biz/devrel/2ed91286-6cf7-4b83-810d-75d0ee3b09dd" data-source="generated" /> <meta name="cmProducts" content="https://authoring-docs-microsoft.poolparty.biz/devrel/68ec7f3a-2bc6-459f-b959-19beb729907d" data-source="generated" /> <meta name="spProducts" content="https://authoring-docs-microsoft.poolparty.biz/devrel/6735bd7e-4f7b-457d-b58c-29e6f0198677" data-source="generated" /> <meta name="spProducts" content="https://authoring-docs-microsoft.poolparty.biz/devrel/90370425-aca4-4a39-9533-d52e5e002a5d" data-source="generated" /> <meta name="scope" content="Virtual Machines, Virtual Machine Scale Sets, Azure, Azure Powershell" /><meta name="github_feedback_content_git_url" content="https://github.com/Azure/azure-powershell/blob/main/src/Compute/Compute/help/New-AzVM.md" /><link href="https://learn.microsoft.com/en-us/powershell/module/az.compute/new-azvm?view=azps-13.0.0" rel="canonical"><title>New-AzVM (Az.Compute) | Microsoft Learn</title><link rel="stylesheet" href="/static/assets/0.4.028726178/styles/site-ltr.css"> <script id="msdocs-script"> var msDocs = {environment: { supportLevel: 'production', accessLevel: 'online', reviewFeatures: false, systemContent: true, azurePortalHostname: 'portal.azure.com', legacyHosting: false, siteName: 'learn', },data: { timeOrigin: Date.now(), contentLocale: 'en-us', contentDir: 'ltr', userLocale: 'en-us', userDir: 'ltr', pageTemplate: 'Reference', brand: 'azure', context: {}, hasBinaryRating: true, feedbackHelpLinkType:'ask-the-community', feedbackHelpLinkUrl:'https://techcommunity.microsoft.com/t5/azure-tools/bd-p/AzureTools', standardFeedback: false, showFeedbackReport: false, enableTutorialFeedback: false, feedbackSystem: 'OpenSource', feedbackGitHubRepo: '', feedbackProductUrl: 'https://github.com/Azure/azure-powershell/issues/new/choose',extendBreadcrumb: true,isEditDisplayable: true, hideViewSource: false, hasPageActions: true, hasPrintButton: true, hasBookmark: true, hasShare: true, isPermissioned: false, isPrivateUnauthorized: false,hasRecommendations: false,openSourceFeedback: true, openSourceFeedbackIssueUrl: 'https://github.com/Azure/azure-powershell/issues/new?template=4-AZ-DOC-BUG.yml', openSourceFeedbackIssueTitle: '', openSourceFeedbackIssueLabels: '',contributors: [{ name: "huypub", url: "https://github.com/huypub" }],}, functions:{} }; </script><script src="https://wcpstatic.microsoft.com/mscc/lib/v2/wcp-consent.js"></script> <script src="https://js.monitor.azure.com/scripts/c/ms.jsll-4.min.js"></script><script src="/static/assets/0.4.028726178/global/deprecation.js"></script><script src="/static/assets/0.4.028726178/scripts/en-us/index-docs.js"></script></head> <body lang="en-us" dir="ltr"> <div class="header-holder has-default-focus"> <a href="#main" style="z-index: 1070" class="outline-color-text visually-hidden-until-focused position-fixed inner-focus focus-visible top-0 left-0 right-0 padding-xs text-align-center has-body-background" tabindex="1">Skip to main content</a><a href="#side-doc-outline" style="z-index: 1070" class="outline-color-text visually-hidden-until-focused position-fixed inner-focus focus-visible top-0 left-0 right-0 padding-xs text-align-center has-body-background" tabindex="2">Skip to in-page navigation</a><div hidden id="cookie-consent-holder" data-test-id="cookie-consent-container"></div> <div id="unsupported-browser" style=" background-color: white; color: black; padding: 16px; border-bottom: 1px solid grey;" hidden > <div style="max-width: 800px; margin: 0 auto;"> <p style="font-size: 24px">This browser is no longer supported.</p> <p style="font-size: 16px; margin-top: 16px;">Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.</p> <div style="margin-top: 12px;"> <a href="https://go.microsoft.com/fwlink/p/?LinkID=2092881 " style=" background-color: #0078d4; border: 1px solid #0078d4; color: white; padding: 6px 12px; border-radius: 2px; display: inline-block; ">Download Microsoft Edge</a> <a href="https://learn.microsoft.com/en-us/lifecycle/faq/internet-explorer-microsoft-edge" style=" background-color: white; padding: 6px 12px; border: 1px solid #505050; color: #171717; border-radius: 2px; display: inline-block; ">More info about Internet Explorer and Microsoft Edge</a> </div> </div> </div> <!-- liquid-tag banners global --> <!-- site header --> <header id="ms--site-header" data-test-id="site-header-wrapper" role="banner" itemscope="itemscope" itemtype="http://schema.org/Organization"> <div id="ms--mobile-nav" class="site-header display-none-tablet padding-inline-none gap-none" data-bi-name="mobile-header" data-test-id="mobile-header"></div> <div id="ms--primary-nav" class="site-header display-none display-flex-tablet" data-bi-name="L1-header" data-test-id="primary-header"></div> <div id="ms--secondary-nav" class="site-header display-none display-flex-tablet" data-bi-name="L2-header" data-test-id="secondary-header"></div> </header><div id="content-header" class="content-header uhf-container has-padding has-default-focus border-bottom-none" data-bi-name="content-header"> <div class="content-header-controls margin-xxs margin-inline-sm-tablet"> <button type="button" class="contents-button button button-sm margin-right-xxs" data-bi-name="contents-expand" aria-haspopup="true" data-contents-button> <span class="icon"><span class="docon docon-menu" aria-hidden="true"></span></span> <span class="contents-expand-title">Table of contents</span> </button> <button type="button" class="ap-collapse-behavior ap-expanded button button-sm" data-bi-name="ap-collapse" aria-controls="action-panel"> <span class="icon"><span class="docon docon-exit-mode" aria-hidden="true"></span></span> <span>Exit focus mode</span> </button> </div> </div><div id="disclaimer-holder" class="has-overflow-hidden has-default-focus"> <!-- liquid-tag banners sectional --> </div> </div> <div class="mainContainer uhf-container has-default-focus" data-bi-name="body"> <div class="columns has-large-gaps is-gapless-mobile "><div id="left-container" class="left-container is-hidden-mobile column is-one-third-tablet is-one-quarter-desktop"> <nav id="affixed-left-container" class="margin-top-sm-tablet position-sticky display-flex flex-direction-column" aria-label="Primary"></nav> </div><!-- .primary-holder --> <section class="primary-holder column is-two-thirds-tablet is-three-quarters-desktop"> <!--div.columns --> <div class="columns is-gapless-mobile has-large-gaps "><div id="main-column" class="column is-full is-8-desktop"> <main id="main" class="" role="main" data-bi-name="content" lang="en-us" dir="ltr"><!-- article-header --> <div id="article-header" class="background-color-body margin-top-sm-tablet margin-bottom-xs display-none-print"> <div class="display-flex align-items-center "><details id="article-header-breadcrumbs-overflow-popover" class="popover" data-for="article-header-breadcrumbs"> <summary class="button button-clear button-primary button-sm inner-focus" aria-label="All breadcrumbs"> <span class="icon"> <span class="docon docon-more"></span> </span> </summary> <div id="article-header-breadcrumbs-overflow" class="popover-content padding-none"> </div> </details> <bread-crumbs id="article-header-breadcrumbs" data-test-id="article-header-breadcrumbs" class="overflow-hidden flex-grow-1 margin-right-sm margin-right-md-tablet margin-right-lg-desktop margin-left-negative-xxs padding-left-xxs"></bread-crumbs><div id="article-header-page-actions" class="opacity-none margin-left-auto display-flex flex-wrap-no-wrap align-items-stretch"><a id="lang-link-tablet" class="button button-primary button-clear button-sm display-none display-inline-flex-tablet" title="Read in English" data-bi-name="language-toggle" data-read-in-link hidden> <span class="icon margin-none" aria-hidden="true" data-read-in-link-icon> <span class="docon docon-locale-globe"></span> </span> <span class="is-visually-hidden" data-read-in-link-text>Read in English</span> </a><button type="button" class="collection button button-clear button-sm button-primary display-none display-inline-flex-tablet" data-list-type="collection" data-bi-name="collection" title="Add to collection"> <span class="icon margin-none" aria-hidden="true"> <span class="docon docon-circle-addition"></span> </span> <span class="collection-status is-visually-hidden">Save</span> </button><a data-contenteditbtn class="button button-clear button-sm text-decoration-none button-primary display-none display-inline-flex-tablet" aria-label="Edit" title="Edit This Document" data-bi-name="edit" href="https://github.com/Azure/azure-powershell/blob/main/src/Compute/Compute/help/New-AzVM.md"> <span class="icon margin-none" aria-hidden="true"> <span class="docon docon-edit-outline"></span> </span> </a> <details class="popover popover-right" id="article-header-page-actions-overflow"> <summary class="justify-content-flex-start button button-clear button-sm button-primary" aria-label="More actions" title="More actions"> <span class="icon" aria-hidden="true"> <span class="docon docon-more-vertical"></span> </span> </summary> <div class="popover-content padding-xs"><button data-page-action-item="overflow-mobile" type="button" class="justify-content-flex-start button-block button-sm has-inner-focus button button-clear display-none-tablet" data-bi-name="contents-expand" data-contents-button data-popover-close> <span class="icon"> <span class="docon docon-editor-list-bullet" aria-hidden="true"></span> </span><span class="contents-expand-title">Table of contents</span></button><a id="lang-link-overflow" class="justify-content-flex-start button-sm has-inner-focus button button-clear button-block display-none-tablet" title="Read in English" data-bi-name="language-toggle" data-page-action-item="overflow-mobile" data-check-hidden="true" data-read-in-link hidden > <span class="icon" aria-hidden="true" data-read-in-link-icon> <span class="docon docon-locale-globe"></span> </span> <span data-read-in-link-text>Read in English</span> </a><button type="button" class="collection justify-content-flex-start button button-clear button-sm has-inner-focus button-block display-none-tablet" data-list-type="collection" data-bi-name="collection" title="Save" data-page-action-item="overflow-mobile" data-check-hidden="true" data-popover-close> <span class="icon" aria-hidden="true"> <span class="docon docon-circle-addition"></span> </span> <span class="collection-status">Save</span> </button> <button type="button" class="collection justify-content-flex-start button button-clear button-sm has-inner-focus button-block display-none-tablet" data-list-type="plan" data-bi-name="plan" title="Add to Plan" data-page-action-item="overflow-mobile" data-check-hidden="true" data-popover-close hidden> <span class="icon" aria-hidden="true"> <span class="docon docon-circle-addition"></span> </span> <span class="plan-status">Add to Plan</span> </button><a data-contenteditbtn class="button button-clear button-block button-sm has-inner-focus justify-content-flex-start text-decoration-none display-none-tablet" aria-label="Edit" title="Edit This Document" data-bi-name="edit" href="https://github.com/Azure/azure-powershell/blob/main/src/Compute/Compute/help/New-AzVM.md"> <span class="icon" aria-hidden="true"> <span class="docon docon-edit-outline"></span> </span> <span>Edit</span> </a><div aria-hidden="true" class="margin-none" data-page-action-item="overflow-all"></div> <hr class="display-none-tablet margin-bottom-xxs margin-top-xxs" /> <h4 class="font-size-sm padding-left-xxs">Share via</h4> <a class="button button-clear button-sm button-block has-inner-focus text-decoration-none justify-content-flex-start share-facebook" data-bi-name="facebook" data-page-action-item="overflow-all"> <span class="icon" aria-hidden="true"> <span class="docon docon-facebook-share font-size-md color-primary"></span> </span> <span class="margin-left-xxs">Facebook</span> </a> <a class="button button-clear button-sm has-inner-focus button-block text-decoration-none justify-content-flex-start share-twitter" data-bi-name="twitter" data-page-action-item="overflow-all"> <span class="icon" aria-hidden="true"> <span class="docon docon-xlogo-share font-size-xxs"></span> </span> <span class="margin-left-xxs">x.com</span> </a> <a class="button button-clear button-sm has-inner-focus button-block text-decoration-none justify-content-flex-start share-linkedin" data-bi-name="linkedin" data-page-action-item="overflow-all"> <span class="icon" aria-hidden="true"> <span class="docon docon-linked-in-logo font-size-sm color-primary"></span> </span> <span class="margin-left-xxs">LinkedIn</span> </a> <a class="button button-clear button-sm button-block has-inner-focus text-decoration-none justify-content-flex-start margin-bottom-xxs share-email" data-bi-name="email" data-page-action-item="overflow-all"> <span class="icon" aria-hidden="true"> <span class="docon docon-mail-message font-size-sm color-primary"></span> </span> <span class="margin-left-xxs">Email</span> </a><hr /> <button class="button button-block button-clear button-sm justify-content-flex-start has-inner-focus margin-top-xxs" title="Print" type="button" aria-label="Print" data-bi-name="print" data-page-action-item="overflow-all" data-popover-close data-print-page data-check-hidden="true"> <span class="icon" aria-hidden="true"> <span class="docon docon-print font-size-sm color-primary"></span> </span> <span class="margin-left-xxs">Print</span> </button> </div> </details> </div></div> </div> <!-- end article-header --><div> <button type="button" class="border contents-button button button-clear button-sm is-hidden-tablet has-inner-focus" data-bi-name="contents-expand" data-contents-button hidden> <span class="icon"> <span class="docon docon-editor-list-bullet" aria-hidden="true"></span> </span><span class="contents-expand-title">Table of contents</span></button> </div><!-- end mobile-contents button --> <div class="content "><!-- <content> --><h1>New-AzVM</h1> <div class="display-flex-tablet justify-content-space-between-tablet"> <ul class="metadata page-metadata align-items-center" data-bi-name="page info"> <li>Reference</li> </ul> <div id="user-feedback" class="margin-block-xxs display-none-print" data-hide-on-archived=""> <button id="user-feedback-button" data-test-id="conceptual-feedback-button" class="button button-sm button-clear button-primary" type="button" data-bi-name="user-feedback-button" data-user-feedback-button=""> <span class="icon" aria-hidden="true"> <span class="docon docon-like"></span> </span> <span>Feedback</span> </button> </div> </div> <div class="metadata"> <dl class="attributeList"> <dt>Module:</dt> <dd><a href="./?view=azps-13.0.0" data-linktype="relative-path">Az.Compute</a></dd> </dl> </div> <nav id="center-doc-outline" class="doc-outline is-hidden-desktop display-none-print margin-bottom-sm" data-bi-name="intopic toc" aria-label=""> <h2 class="title is-6 margin-block-xs"></h2> </nav> <div class="margin-block-sm"> <p>Creates a virtual machine.</p> </div> <h2 id="syntax">Syntax</h2> <pre class="wrap"><code class="lang-powershell" dir="ltr">New-AzVM [[-ResourceGroupName] &lt;String&gt;] [[-Location] &lt;String&gt;] [-EdgeZone &lt;String&gt;] [[-Zone] &lt;String[]&gt;] [-PublicIpSku &lt;String&gt;] -Name &lt;String&gt; -Credential &lt;PSCredential&gt; [-NetworkInterfaceDeleteOption &lt;String&gt;] [-VirtualNetworkName &lt;String&gt;] [-AddressPrefix &lt;String&gt;] [-SubnetName &lt;String&gt;] [-SubnetAddressPrefix &lt;String&gt;] [-PublicIpAddressName &lt;String&gt;] [-DomainNameLabel &lt;String&gt;] [-AllocationMethod &lt;String&gt;] [-SecurityGroupName &lt;String&gt;] [-OpenPorts &lt;Int32[]&gt;] [-Image &lt;String&gt;] [-Size &lt;String&gt;] [-AvailabilitySetName &lt;String&gt;] [-SystemAssignedIdentity] [-UserAssignedIdentity &lt;String&gt;] [-AsJob] [-OSDiskDeleteOption &lt;String&gt;] [-DataDiskSizeInGb &lt;Int32[]&gt;] [-DataDiskDeleteOption &lt;String&gt;] [-EnableUltraSSD] [-ProximityPlacementGroupId &lt;String&gt;] [-HostId &lt;String&gt;] [-VmssId &lt;String&gt;] [-Priority &lt;String&gt;] [-EvictionPolicy &lt;String&gt;] [-MaxPrice &lt;Double&gt;] [-EncryptionAtHost] [-HostGroupId &lt;String&gt;] [-SshKeyName &lt;String&gt;] [-GenerateSshKey] [-CapacityReservationGroupId &lt;String&gt;] [-UserData &lt;String&gt;] [-ImageReferenceId &lt;String&gt;] [-PlatformFaultDomain &lt;Int32&gt;] [-HibernationEnabled] [-vCPUCountAvailable &lt;Int32&gt;] [-vCPUCountPerCore &lt;Int32&gt;] [-DiskControllerType &lt;String&gt;] [-SharedGalleryImageId &lt;String&gt;] [-SecurityType &lt;String&gt;] [-EnableVtpm &lt;Boolean&gt;] [-EnableSecureBoot &lt;Boolean&gt;] [-IfMatch &lt;String&gt;] [-IfNoneMatch &lt;String&gt;] [-SshKeyType &lt;String&gt;] [-DefaultProfile &lt;IAzureContextContainer&gt;] [-WhatIf] [-Confirm] [&lt;CommonParameters&gt;]</code></pre> <pre class="wrap"><code class="lang-powershell" dir="ltr">New-AzVM [-ResourceGroupName] &lt;String&gt; [-Location] &lt;String&gt; [-EdgeZone &lt;String&gt;] [-VM] &lt;PSVirtualMachine&gt; [[-Zone] &lt;String[]&gt;] [-DisableBginfoExtension] [-Tag &lt;Hashtable&gt;] [-LicenseType &lt;String&gt;] [-AsJob] [-OSDiskDeleteOption &lt;String&gt;] [-DataDiskDeleteOption &lt;String&gt;] [-SshKeyName &lt;String&gt;] [-GenerateSshKey] [-vCPUCountAvailable &lt;Int32&gt;] [-vCPUCountPerCore &lt;Int32&gt;] [-IfMatch &lt;String&gt;] [-IfNoneMatch &lt;String&gt;] [-DefaultProfile &lt;IAzureContextContainer&gt;] [-WhatIf] [-Confirm] [&lt;CommonParameters&gt;]</code></pre> <pre class="wrap"><code class="lang-powershell" dir="ltr">New-AzVM [[-ResourceGroupName] &lt;String&gt;] [[-Location] &lt;String&gt;] [-EdgeZone &lt;String&gt;] [-PublicIpSku &lt;String&gt;] -Name &lt;String&gt; [-NetworkInterfaceDeleteOption &lt;String&gt;] [-VirtualNetworkName &lt;String&gt;] [-AddressPrefix &lt;String&gt;] [-SubnetName &lt;String&gt;] [-SubnetAddressPrefix &lt;String&gt;] [-PublicIpAddressName &lt;String&gt;] [-DomainNameLabel &lt;String&gt;] [-AllocationMethod &lt;String&gt;] [-SecurityGroupName &lt;String&gt;] [-OpenPorts &lt;Int32[]&gt;] -DiskFile &lt;String&gt; [-Linux] [-Size &lt;String&gt;] [-AvailabilitySetName &lt;String&gt;] [-SystemAssignedIdentity] [-UserAssignedIdentity &lt;String&gt;] [-AsJob] [-OSDiskDeleteOption &lt;String&gt;] [-DataDiskSizeInGb &lt;Int32[]&gt;] [-DataDiskDeleteOption &lt;String&gt;] [-EnableUltraSSD] [-ProximityPlacementGroupId &lt;String&gt;] [-HostId &lt;String&gt;] [-VmssId &lt;String&gt;] [-Priority &lt;String&gt;] [-EvictionPolicy &lt;String&gt;] [-MaxPrice &lt;Double&gt;] [-EncryptionAtHost] [-HostGroupId &lt;String&gt;] [-CapacityReservationGroupId &lt;String&gt;] [-UserData &lt;String&gt;] [-PlatformFaultDomain &lt;Int32&gt;] [-HibernationEnabled] [-vCPUCountAvailable &lt;Int32&gt;] [-vCPUCountPerCore &lt;Int32&gt;] [-IfMatch &lt;String&gt;] [-IfNoneMatch &lt;String&gt;] [-DefaultProfile &lt;IAzureContextContainer&gt;] [-WhatIf] [-Confirm] [&lt;CommonParameters&gt;]</code></pre> <h2 id="description">Description</h2> <p>The <strong>New-AzVM</strong> cmdlet creates a virtual machine in Azure. This cmdlet takes a virtual machine object as input. The <strong>New-AzVM</strong> cmdlet will create a new storage account for boot diagnostics if one does not already exist. <br> <br> Use the <strong><a href="/en-us/powershell/module/az.compute/new-azvmconfig" data-linktype="absolute-path">New-AzVMConfig</a></strong> cmdlet to create a virtual machine object. <br> Then use the following cmdlets to set different properties of the virtual machine object:</p> <ul> <li><strong><a href="/en-us/powershell/module/az.compute/add-azvmnetworkinterface" data-linktype="absolute-path">Add-AzVMNetworkInterface</a></strong> to set the network profile.<br></li> <li><strong><a href="/en-us/powershell/module/az.compute/set-azvmoperatingsystem" data-linktype="absolute-path">Set-AzVMOperatingSystem</a></strong> to set the OS profile. <br></li> <li><strong><a href="/en-us/powershell/module/az.compute/set-azvmsourceimage" data-linktype="absolute-path">Set-AzVMSourceImage</a></strong> to set the source image.<br></li> <li><strong><a href="/en-us/powershell/module/az.compute/set-azvmosdisk" data-linktype="absolute-path">Set-AzVMOSDisk</a></strong> to set the OS disk(storage profile).<br></li> <li><strong><a href="/en-us/powershell/module/az.compute/get-azcomputeresourcesku" data-linktype="absolute-path">Get-AzComputeResourceSku</a></strong> can also be used to find out available virtual machine sizes for your subscription and region.<br> <br> The <code>SimpleParameterSet</code> provides a convenient method to create a VM by making common VM creation arguments optional.<br> <br> See <a href="/en-us/azure/virtual-machines/windows/quick-create-powershell" data-linktype="absolute-path">Quickstart: Create a Windows virtual machine in Azure with PowerShell</a> for tutorial. <br></li> </ul> <h2 id="examples">Examples</h2> <h3 id="example-1-create-a-virtual-machine">Example 1: Create a virtual machine</h3> <pre><code data-interactive="azurepowershell" class="lang-powershell">New-AzVM -Name MyVm -Credential (Get-Credential) VERBOSE: Use 'mstsc /v:myvm-222222.eastus.cloudapp.azure.com' to connect to the VM. ResourceGroupName : MyVm Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyVm/provi ders/Microsoft.Compute/virtualMachines/MyVm VmId : 11111111-1111-1111-1111-111111111111 Name : MyVm Type : Microsoft.Compute/virtualMachines Location : eastus Tags : {} HardwareProfile : {VmSize} NetworkProfile : {NetworkInterfaces} OSProfile : {ComputerName, AdminUsername, WindowsConfiguration, Secrets} ProvisioningState : Succeeded StorageProfile : {ImageReference, OsDisk, DataDisks} FullyQualifiedDomainName : myvm-222222.eastus.cloudapp.azure.com</code></pre> <p>This example script shows how to create a virtual machine. The script will ask a user name and password for the VM. This script uses several other cmdlets.</p> <h3 id="example-2-create-a-virtual-machine-from-a-custom-user-image">Example 2: Create a virtual machine from a custom user image</h3> <pre><code data-interactive="azurepowershell" class="lang-powershell">## VM Account # Credentials for Local Admin account you created in the sysprepped (generalized) vhd image $VMLocalAdminUser = "LocalAdminUser" $VMLocalAdminSecurePassword = ConvertTo-SecureString -String "****" -AsPlainText -Force ## Azure Account $LocationName = "westus" $ResourceGroupName = "MyResourceGroup" # This a Premium_LRS storage account. # It is required in order to run a client VM with efficiency and high performance. $StorageAccount = "Mydisk" ## VM $OSDiskName = "MyClient" $ComputerName = "MyClientVM" $OSDiskUri = "https://Mydisk.blob.core.windows.net/disks/MyOSDisk.vhd" $SourceImageUri = "https://Mydisk.blob.core.windows.net/vhds/MyOSImage.vhd" $VMName = "MyVM" # Modern hardware environment with fast disk, high IOPs performance. # Required to run a client VM with efficiency and performance $VMSize = "Standard_DS3" $OSDiskCaching = "ReadWrite" $OSCreateOption = "FromImage" ## Networking $DNSNameLabel = "mydnsname" # mydnsname.westus.cloudapp.azure.com $NetworkName = "MyNet" $NICName = "MyNIC" $PublicIPAddressName = "MyPIP" $SubnetName = "MySubnet" $SubnetAddressPrefix = "10.0.0.0/24" $VnetAddressPrefix = "10.0.0.0/16" $SingleSubnet = New-AzVirtualNetworkSubnetConfig -Name $SubnetName -AddressPrefix $SubnetAddressPrefix $Vnet = New-AzVirtualNetwork -Name $NetworkName -ResourceGroupName $ResourceGroupName -Location $LocationName -AddressPrefix $VnetAddressPrefix -Subnet $SingleSubnet $PIP = New-AzPublicIpAddress -Name $PublicIPAddressName -DomainNameLabel $DNSNameLabel -ResourceGroupName $ResourceGroupName -Location $LocationName -AllocationMethod Dynamic $NIC = New-AzNetworkInterface -Name $NICName -ResourceGroupName $ResourceGroupName -Location $LocationName -SubnetId $Vnet.Subnets[0].Id -PublicIpAddressId $PIP.Id $Credential = New-Object System.Management.Automation.PSCredential ($VMLocalAdminUser, $VMLocalAdminSecurePassword); $securityTypeStnd = "Standard" $VirtualMachine = New-AzVMConfig -VMName $VMName -VMSize $VMSize -SecurityType $securityTypeStnd $VirtualMachine = Set-AzVMOperatingSystem -VM $VirtualMachine -Windows -ComputerName $ComputerName -Credential $Credential -ProvisionVMAgent -EnableAutoUpdate $VirtualMachine = Add-AzVMNetworkInterface -VM $VirtualMachine -Id $NIC.Id $VirtualMachine = Set-AzVMOSDisk -VM $VirtualMachine -Name $OSDiskName -VhdUri $OSDiskUri -SourceImageUri $SourceImageUri -Caching $OSDiskCaching -CreateOption $OSCreateOption -Windows New-AzVM -ResourceGroupName $ResourceGroupName -Location $LocationName -VM $VirtualMachine -Verbose -Zone @("1")</code></pre> <p>This example takes an existing sys-prepped, generalized custom operating system image and attaches a data disk to it, provisions a new network, deploys the VHD, and runs it. This script can be used for automatic provisioning because it uses the local virtual machine admin credentials inline instead of calling <strong>Get-Credential</strong> which requires user interaction. This script assumes that you are already logged into your Azure account. You can confirm your login status by using the <strong>Get-AzSubscription</strong> cmdlet.</p> <h3 id="example-3-create-a-vm-from-a-marketplace-image-without-a-public-ip">Example 3: Create a VM from a marketplace image without a Public IP</h3> <pre><code data-interactive="azurepowershell" class="lang-powershell">$VMLocalAdminUser = "LocalAdminUser" $VMLocalAdminSecurePassword = ConvertTo-SecureString -String "****" -AsPlainText -Force $LocationName = "eastus2" $ResourceGroupName = "MyResourceGroup" $ComputerName = "MyVM" $VMName = "MyVM" $VMSize = "Standard_DS3" $NetworkName = "MyNet" $NICName = "MyNIC" $SubnetName = "MySubnet" $SubnetAddressPrefix = "10.0.0.0/24" $VnetAddressPrefix = "10.0.0.0/16" $SingleSubnet = New-AzVirtualNetworkSubnetConfig -Name $SubnetName -AddressPrefix $SubnetAddressPrefix $Vnet = New-AzVirtualNetwork -Name $NetworkName -ResourceGroupName $ResourceGroupName -Location $LocationName -AddressPrefix $VnetAddressPrefix -Subnet $SingleSubnet $NIC = New-AzNetworkInterface -Name $NICName -ResourceGroupName $ResourceGroupName -Location $LocationName -SubnetId $Vnet.Subnets[0].Id $Credential = New-Object System.Management.Automation.PSCredential ($VMLocalAdminUser, $VMLocalAdminSecurePassword); $VirtualMachine = New-AzVMConfig -VMName $VMName -VMSize $VMSize $VirtualMachine = Set-AzVMOperatingSystem -VM $VirtualMachine -Windows -ComputerName $ComputerName -Credential $Credential -ProvisionVMAgent -EnableAutoUpdate $VirtualMachine = Add-AzVMNetworkInterface -VM $VirtualMachine -Id $NIC.Id $VirtualMachine = Set-AzVMSourceImage -VM $VirtualMachine -PublisherName 'MicrosoftWindowsServer' -Offer 'WindowsServer' -Skus '2022-datacenter-azure-edition-core' -Version latest New-AzVM -ResourceGroupName $ResourceGroupName -Location $LocationName -VM $VirtualMachine -Verbose</code></pre> <p>This command creates a VM from a marketplace image without a Public IP.</p> <h3 id="example-4-create-a-vm-with-a-userdata-value">Example 4: Create a VM with a UserData value:</h3> <pre><code data-interactive="azurepowershell" class="lang-powershell"># VM Account $VMLocalAdminUser = "LocalAdminUser"; $VMLocalAdminSecurePassword = ConvertTo-SecureString -String "****" -AsPlainText -Force; # Azure Account $LocationName = "eastus"; $ResourceGroupName = "MyResourceGroup"; # VM Profile &amp; Hardware $VMName = 'v' + $ResourceGroupName; $domainNameLabel = "d1" + $ResourceGroupName; $Credential = New-Object System.Management.Automation.PSCredential ($VMLocalAdminUser, $VMLocalAdminSecurePassword); # Create UserData value $text = "text for UserData"; $bytes = [System.Text.Encoding]::Unicode.GetBytes($text); $userData = [Convert]::ToBase64String($bytes); # Create VM New-AzVM -ResourceGroupName $ResourceGroupName -Name $VMName -Credential $Credential -DomainNameLabel $domainNameLabel -UserData $userData; $vm = Get-AzVM -ResourceGroupName $ResourceGroupName -Name $VMName -UserData;</code></pre> <p>The UserData value must always be Base64 encoded.</p> <h3 id="example-5-creating-a-new-vm-with-an-existing-subnet-in-another-resource-group">Example 5: Creating a new VM with an existing subnet in another resource group</h3> <pre><code data-interactive="azurepowershell" class="lang-powershell">$UserName = "User" $Password = ConvertTo-SecureString -String "****" -AsPlainText -Force $psCred = New-Object System.Management.Automation.PSCredential($UserName, $Password) $Vnet = $(Get-AzVirtualNetwork -ResourceGroupName ResourceGroup2 -Name VnetName) $PIP = (Get-AzPublicIpAddress -ResourceGroupName ResourceGroup2 -Name PublicIPName) $NIC = New-AzNetworkInterface -Name NICname -ResourceGroupName ResourceGroup2 -Location SouthCentralUS -SubnetId $Vnet.Subnets[1].Id -PublicIpAddressId $PIP.Id $VirtualMachine = New-AzVMConfig -VMName VirtualMachineName -VMSize Standard_D4s_v3 $VirtualMachine = Set-AzVMOperatingSystem -VM $VirtualMachine -Windows -ComputerName computerName -Credential $psCred -ProvisionVMAgent -EnableAutoUpdate $VirtualMachine = Add-AzVMNetworkInterface -VM $VirtualMachine -Id $NIC.Id $VirtualMachine = Set-AzVMSourceImage -VM $VirtualMachine -PublisherName 'MicrosoftWindowsServer' -Offer 'WindowsServer' -Skus '2022-datacenter-azure-edition-core' -Version latest New-AzVM -ResourceGroupName ResourceGroup1 -Location SouthCentralUS -VM $VirtualMachine</code></pre> <p>This example deploys a Windows VM from the marketplace in one resource group with an existing subnet in another resource group.</p> <h3 id="example-6-creating-a-new-vm-as-part-of-a-vmss-with-a-platformfaultdomain-value">Example 6: Creating a new VM as part of a VMSS with a PlatformFaultDomain value.</h3> <pre><code data-interactive="azurepowershell" class="lang-powershell">$resourceGroupName= "ResourceGroupName"; $loc = 'eastus'; New-AzResourceGroup -Name $resourceGroupName -Location $loc -Force; $domainNameLabel = "d1" + $resourceGroupName; $vmname = "vm" + $resourceGroupName; $platformFaultDomainVMDefaultSet = 2; $vmssFaultDomain = 3; $securePassword = ConvertTo-SecureString -String "****" -AsPlainText -Force; $user = &lt;USERNAME&gt;; $cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword); $vmssName = "vmss" + $resourceGroupName; $vmssConfig = New-AzVmssConfig -Location $loc -PlatformFaultDomainCount $vmssFaultDomain; $vmss = New-AzVmss -ResourceGroupName $resourceGroupName -Name $vmssName -VirtualMachineScaleSet $vmssConfig; $vm = New-AzVM -ResourceGroupName $resourceGroupName -Name $vmname -Credential $cred -DomainNameLabel $domainNameLabel -PlatformFaultDomain $platformFaultDomainVMDefaultSet -VmssId $vmss.Id;</code></pre> <p>This example creates a new VM as part of a VMSS with a PlatformFaultDomain value.</p> <h3 id="example-7-create-a-vm-using-the-image-alias">Example 7: Create a VM using the -Image alias.</h3> <pre><code data-interactive="azurepowershell" class="lang-powershell">$resourceGroupName= "&lt;Resource Group Name&gt;" $loc = "&lt;Azure Region&gt;" $domainNameLabel = "&lt;Domain Name Label&gt;" $vmname = "&lt;Virtual Machine Name&gt;" $securePassword = ConvertTo-SecureString -String "****" -AsPlainText -Force $user = "&lt;Username&gt;" $cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword) New-AzResourceGroup -Name $resourceGroupName -Location $loc -Force # Create a VM using an Image alias. $vmname = 'v' + $resourceGroupName $domainNameLabel = "d" + $resourceGroupName $vm = New-AzVM -ResourceGroupName $resourceGroupName -Name $vmname -Credential $cred -Image OpenSuseLeap154Gen2 -DomainNameLabel $domainNameLabel $vm = Get-AzVM -ResourceGroupName $resourceGroupName -Name $vmname</code></pre> <p>This example creates a new VM using the -Image parameter, providing many default values to the VM.</p> <h3 id="example-8-creating-a-vm-for-trusted-launch-securitytype">Example 8: Creating a VM for Trusted Launch SecurityType.</h3> <pre><code data-interactive="azurepowershell" class="lang-powershell">$rgname = &lt;Resource Group Name&gt;; $loc = "eastus"; New-AzResourceGroup -Name $rgname -Location $loc -Force; # VM Profile &amp; Hardware $domainNameLabel1 = 'd1' + $rgname; $vmsize = 'Standard_D4s_v3'; $vmname1 = 'v' + $rgname; $imageName = "Win2022AzureEdition"; $disable = $false; $enable = $true; $securityType = "TrustedLaunch"; $securePassword = ConvertTo-SecureString -String "****" -AsPlainText -Force; $user = &lt;Username&gt;; $cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword); # VM creation using Simple parameterset New-AzVM -ResourceGroupName $rgname -Location $loc -Name $vmname1 -Credential $cred -Size $vmsize -Image $imageName -DomainNameLabel $domainNameLabel1 -SecurityType $securityType; $vm1 = Get-AzVM -ResourceGroupName $rgname -Name $vmname1; # Verify Values #$vm1.SecurityProfile.SecurityType "TrustedLaunch"; #$vm1.SecurityProfile.UefiSettings.VTpmEnabled $true; #$vm1.SecurityProfile.UefiSettings.SecureBootEnabled $true;</code></pre> <p>This example Creates a new VM with the TrustedLaunch Security Type and sets flags EnableSecureBoot and EnableVtpm as True by default. A Trusted Launch VM requires a Gen2 image. Please check <a href="https://aka.ms/trustedlaunch" data-linktype="external">the Trusted Launch feature page</a> for more information.</p> <h3 id="example-9-create-a-vm-with-trusted-launch-turned-on-by-defualt-using-new-azvmconfig">Example 9: Create a VM with Trusted Launch turned on by defualt using New-AzVMConfig.</h3> <pre><code data-interactive="azurepowershell" class="lang-powershell">$rgname = "&lt;Resource Group Name&gt;"; $loc = "&lt;Azure Region&gt;"; $vmname = 'vm' + $rgname; $domainNameLabel = "d1" + $rgname; $vnetname = "vn" + $rgname; $vnetAddress = "10.0.0.0/16"; $subnetname = "slb" + $rgname; $subnetAddress = "10.0.2.0/24"; $OSDiskName = $vmname + "-osdisk"; $NICName = $vmname+ "-nic"; $NSGName = $vmname + "-NSG"; $OSDiskSizeinGB = 128; $VMSize = "Standard_DS2_v2"; $PublisherName = "MicrosoftWindowsServer"; $Offer = "WindowsServer"; $SKU = "2022-datacenter-azure-edition"; $version = "latest"; $securePassword = ConvertTo-SecureString -String "****" -AsPlainText -Force; $user = &lt;Username&gt;; $cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword); # Network setup $frontendSubnet = New-AzVirtualNetworkSubnetConfig -Name $subnetname -AddressPrefix $subnetAddress; $vnet = New-AzVirtualNetwork -Name $vnetname -ResourceGroupName $rgname -Location $loc -AddressPrefix $vnetAddress -Subnet $frontendSubnet; $nsgRuleRDP = New-AzNetworkSecurityRuleConfig -Name RDP -Protocol Tcp -Direction Inbound -Priority 1001 -SourceAddressPrefix * -SourcePortRange * -DestinationAddressPrefix * -DestinationPortRange 3389 -Access Allow; $nsg = New-AzNetworkSecurityGroup -ResourceGroupName $RGName -Location $loc -Name $NSGName -SecurityRules $nsgRuleRDP; $nic = New-AzNetworkInterface -Name $NICName -ResourceGroupName $RGName -Location $loc -SubnetId $vnet.Subnets[0].Id -NetworkSecurityGroupId $nsg.Id -EnableAcceleratedNetworking; # VM $vmConfig = New-AzVMConfig -VMName $vmName -VMSize $VMSize; Set-AzVMOperatingSystem -VM $vmConfig -Windows -ComputerName $vmName -Credential $cred; Set-AzVMSourceImage -VM $vmConfig -PublisherName $PublisherName -Offer $Offer -Skus $SKU -Version $version ; Add-AzVMNetworkInterface -VM $vmConfig -Id $nic.Id; New-AzVM -ResourceGroupName $rgname -Location $loc -VM $vmConfig; $vm = Get-AzVM -ResourceGroupName $rgname -Name $vmname; # Verify $vm.SecurityProfile.SecurityType is TrustedLaunch # Verify $vm.SecurityProfile.UefiSettings.SecureBootEnabled is true. # Verify $vm.SecurityProfile.UefiSettings.VTpmEnabled is true.</code></pre> <p>This example shows how to create a VM with a valid Gen2 image, allowing the VM to default to TrustedLaunch which requires Gen2 images. Please check <a href="https://aka.ms/trustedlaunch" data-linktype="external">the Trusted Launch feature page</a> for more information.</p> <h3 id="example-10-creates-a-vm-with-trustedlaunch-turned-on-by-default">Example 10: Creates a VM with TrustedLaunch turned on by default.</h3> <pre><code data-interactive="azurepowershell" class="lang-powershell">$rgname = "&lt;Resource Group Name&gt;"; $loc = "&lt;Azure Region&gt;"; $vmname = 'vm' + $rgname; $domainNameLabel = "d1" + $rgname; $securePassword = ConvertTo-SecureString -String "****" -AsPlainText -Force; $user = &lt;Username&gt;; $cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword); # Create VM $vm = New-AzVM -ResourceGroupName $rgname -Name $vmname -Credential $cred -DomainNameLabel $domainNameLabel; $vm = Get-AzVM -ResourceGroupName $rgname -Name $vmname; # Verify $vm.SecurityProfile.SecurityType is TrustedLaunch. # Verify the $vm.StorageProfile.ImageReference.Sku has defaulted to "2022-datacenter-azure-edition", a Gen2 image.</code></pre> <p>This example shows how the simple cmdlet call with minimal parameters will result in a TrustedLaunch enabled VM with a Gen2 image. Please check <a href="https://aka.ms/trustedlaunch" data-linktype="external">the Trusted Launch feature page</a> for more information.</p> <p>=======</p> <h2 id="parameters">Parameters</h2> <h3 id="-addressprefix" class="font-size-md font-family-monospace">-AddressPrefix</h3> <div class="parameterInfo"> <p>The address prefix for the virtual network which will be created for the VM.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>192.168.0.0/16</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-allocationmethod" class="font-size-md font-family-monospace">-AllocationMethod</h3> <div class="parameterInfo"> <p>The IP allocation method for the public IP which will be created for the VM.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Accepted values:</td><td>Static, Dynamic</td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>Static</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-asjob" class="font-size-md font-family-monospace">-AsJob</h3> <div class="parameterInfo"> <p>Run cmdlet in the background and return a Job to track progress.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.management.automation.switchparameter" data-linktype="absolute-path">SwitchParameter</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-availabilitysetname" class="font-size-md font-family-monospace">-AvailabilitySetName</h3> <div class="parameterInfo"> <p>Specifies a name for the availability set.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-capacityreservationgroupid" class="font-size-md font-family-monospace">-CapacityReservationGroupId</h3> <div class="parameterInfo"> <p>Id of the capacity reservation Group that is used to allocate.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-confirm" class="font-size-md font-family-monospace">-Confirm</h3> <div class="parameterInfo"> <p>Prompts you for confirmation before running the cmdlet.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.management.automation.switchparameter" data-linktype="absolute-path">SwitchParameter</a></td></tr> <tr><td>Aliases:</td><td>cf</td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>False</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-credential" class="font-size-md font-family-monospace">-Credential</h3> <div class="parameterInfo"> <p>The administrator credentials for the VM. <br><br> <strong>Username</strong> <br> <strong>Restriction:</strong> <br> Windows: Cannot contain special characters /""[]:|&lt;&gt;+=;,?*@&amp; or end in "." <br> Linux: Username must only contain letters, numbers, hyphens, and underscores and may not start with a hyphen or number. <br> <strong>Disallowed values:</strong> "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". <br> <strong>Minimum-length:</strong> 1 character <br> <strong>Max-length:</strong> 20 characters for Windows, 64 characters for Linux <br><br> <strong>Password</strong> <br> Must have 3 of the following: 1 lower case character, 1 upper case character, 1 number, and 1 special character. <br> The value must be between 12 and 123 characters long.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.management.automation.pscredential" data-linktype="absolute-path">PSCredential</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>True</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-datadiskdeleteoption" class="font-size-md font-family-monospace">-DataDiskDeleteOption</h3> <div class="parameterInfo"> <p>Specifies Data Disk delete option after VM deletion. Options are Detach, Delete</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-datadisksizeingb" class="font-size-md font-family-monospace">-DataDiskSizeInGb</h3> <div class="parameterInfo"> <p>Specifies the sizes of data disks in GB.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.int32" data-linktype="absolute-path">Int32</a><span>[</span><span>]</span></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-defaultprofile" class="font-size-md font-family-monospace">-DefaultProfile</h3> <div class="parameterInfo"> <p>The credentials, account, tenant, and subscription used for communication with azure.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/microsoft.azure.commands.common.authentication.abstractions.core.iazurecontextcontainer" data-linktype="absolute-path">IAzureContextContainer</a></td></tr> <tr><td>Aliases:</td><td>AzContext, AzureRmContext, AzureCredential</td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-disablebginfoextension" class="font-size-md font-family-monospace">-DisableBginfoExtension</h3> <div class="parameterInfo"> <p>Indicates that this cmdlet does not install the <strong>BG Info</strong> extension on the virtual machine.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.management.automation.switchparameter" data-linktype="absolute-path">SwitchParameter</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-diskcontrollertype" class="font-size-md font-family-monospace">-DiskControllerType</h3> <div class="parameterInfo"> <p>Specifies the disk controller type configured for the VM and VirtualMachineScaleSet. This property is only supported for virtual machines whose operating system disk and VM sku supports Generation 2 (<a href="/en-us/azure/virtual-machines/generation-2" data-linktype="absolute-path">https://learn.microsoft.com/en-us/azure/virtual-machines/generation-2</a>), please check the HyperVGenerations capability returned as part of VM sku capabilities in the response of Microsoft.Compute SKUs api for the region contains V2 (<a href="/en-us/rest/api/compute/resourceskus/list" data-linktype="absolute-path">https://learn.microsoft.com/rest/api/compute/resourceskus/list</a>) . <br> For more information about Disk Controller Types supported please refer to <a href="https://aka.ms/azure-diskcontrollertypes" data-linktype="external">https://aka.ms/azure-diskcontrollertypes</a>.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-diskfile" class="font-size-md font-family-monospace">-DiskFile</h3> <div class="parameterInfo"> <p>The local path to the virtual hard disk file to be uploaded to the cloud and for creating the VM, and it must have '.vhd' as its suffix.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>True</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-domainnamelabel" class="font-size-md font-family-monospace">-DomainNameLabel</h3> <div class="parameterInfo"> <p>The subdomain label for the fully-qualified domain name (FQDN) of the VM. This will take the form <code>{domainNameLabel}.{location}.cloudapp.azure.com</code>.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-edgezone" class="font-size-md font-family-monospace">-EdgeZone</h3> <div class="parameterInfo"> <p>Sets the edge zone name. If set, the query will be routed to the specified edgezone instead of the main region.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>True</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-enablesecureboot" class="font-size-md font-family-monospace">-EnableSecureBoot</h3> <div class="parameterInfo"> <p>Specifies whether secure boot should be enabled on the virtual machine.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.nullable-1" data-linktype="absolute-path">Nullable&lt;T&gt;</a><span>[</span><a class="no-loc" href="/en-us/dotnet/api/system.boolean" data-linktype="absolute-path">Boolean</a><span>]</span></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>True</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-enableultrassd" class="font-size-md font-family-monospace">-EnableUltraSSD</h3> <div class="parameterInfo"> <p>Use UltraSSD disks for the vm.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.management.automation.switchparameter" data-linktype="absolute-path">SwitchParameter</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-enablevtpm" class="font-size-md font-family-monospace">-EnableVtpm</h3> <div class="parameterInfo"> <p>Specifies whether vTPM should be enabled on the virtual machine.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.nullable-1" data-linktype="absolute-path">Nullable&lt;T&gt;</a><span>[</span><a class="no-loc" href="/en-us/dotnet/api/system.boolean" data-linktype="absolute-path">Boolean</a><span>]</span></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>True</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-encryptionathost" class="font-size-md font-family-monospace">-EncryptionAtHost</h3> <div class="parameterInfo"> <p>EncryptionAtHost property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself. Default: The Encryption at host will be disabled unless this property is set to true for the resource.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.management.automation.switchparameter" data-linktype="absolute-path">SwitchParameter</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>False</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-evictionpolicy" class="font-size-md font-family-monospace">-EvictionPolicy</h3> <div class="parameterInfo"> <p>The eviction policy for the Azure Spot virtual machine. Supported values are 'Deallocate' and 'Delete'.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-generatesshkey" class="font-size-md font-family-monospace">-GenerateSshKey</h3> <div class="parameterInfo"> <p>Generate a SSH Public/Private key pair and create a SSH Public Key resource on Azure.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.management.automation.switchparameter" data-linktype="absolute-path">SwitchParameter</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-hibernationenabled" class="font-size-md font-family-monospace">-HibernationEnabled</h3> <div class="parameterInfo"> <p>The flag that enables or disables hibernation capability on the VM.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.management.automation.switchparameter" data-linktype="absolute-path">SwitchParameter</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>True</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-hostgroupid" class="font-size-md font-family-monospace">-HostGroupId</h3> <div class="parameterInfo"> <p>Specifies the dedicated host group the virtual machine will reside in.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>True</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-hostid" class="font-size-md font-family-monospace">-HostId</h3> <div class="parameterInfo"> <p>The Id of Host</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-ifmatch" class="font-size-md font-family-monospace">-IfMatch</h3> <div class="parameterInfo"> <p>used to make a request conditional for the PUT and other non-safe methods. The server will only return the requested resources if the resource matches one of the listed ETag values. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>True</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-ifnonematch" class="font-size-md font-family-monospace">-IfNoneMatch</h3> <div class="parameterInfo"> <p>Used to make a request conditional for the GET and HEAD methods. The server will only return the requested resources if none of the listed ETag values match the current entity. Used to make a request conditional for the GET and HEAD methods. The server will only return the requested resources if none of the listed ETag values match the current entity. Set to '*' to allow a new record set to be created, but to prevent updating an existing record set. Other values will result in error from server as they are not supported.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>True</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-image" class="font-size-md font-family-monospace">-Image</h3> <div class="parameterInfo"> <p>The friendly image name upon which the VM will be built. The available aliases are: Win2022AzureEdition, Win2022AzureEditionCore, Win2019Datacenter, Win2016Datacenter, Win2012R2Datacenter, Win2012Datacenter, Ubuntu2204, CentOS85Gen2, Debian11, OpenSuseLeap154Gen2, RHELRaw8LVMGen2, SuseSles15SP3, FlatcarLinuxFreeGen2.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Aliases:</td><td>ImageName</td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>Win2016Datacenter</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-imagereferenceid" class="font-size-md font-family-monospace">-ImageReferenceId</h3> <div class="parameterInfo"> <p>Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET call.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-licensetype" class="font-size-md font-family-monospace">-LicenseType</h3> <div class="parameterInfo"> <p>Specifies a license type, which indicates that the image or disk for the virtual machine was licensed on-premises. Possible values for Windows Server are:</p> <ul> <li>Windows_Client</li> <li>Windows_Server</li> </ul> <p>Possible values for Linux Server operating system are:</p> <ul> <li>RHEL_BYOS (for RHEL)</li> <li>SLES_BYOS (for SUSE)</li> </ul> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-linux" class="font-size-md font-family-monospace">-Linux</h3> <div class="parameterInfo"> <p>Indicates whether the disk file is for Linux VM, if specified; or Windows, if not specified by default.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.management.automation.switchparameter" data-linktype="absolute-path">SwitchParameter</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-location" class="font-size-md font-family-monospace">-Location</h3> <div class="parameterInfo"> <p>Specifies a location for the virtual machine.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>1</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>True</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-maxprice" class="font-size-md font-family-monospace">-MaxPrice</h3> <div class="parameterInfo"> <p>The max price of the billing of a low priority virtual machine.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.double" data-linktype="absolute-path">Double</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-name" class="font-size-md font-family-monospace">-Name</h3> <div class="parameterInfo"> <p>The name of the VM resource.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>True</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-networkinterfacedeleteoption" class="font-size-md font-family-monospace">-NetworkInterfaceDeleteOption</h3> <div class="parameterInfo"> <p>Specifies what action to perform on the NetworkInterface resource when the VM is deleted. Options are: Detach, Delete.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-openports" class="font-size-md font-family-monospace">-OpenPorts</h3> <div class="parameterInfo"> <p>A list of ports to open on the network security group (NSG) for the created VM. The default value depends on the type of image chosen (i.e., Windows: 3389, 5985 and Linux: 22).</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.int32" data-linktype="absolute-path">Int32</a><span>[</span><span>]</span></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-osdiskdeleteoption" class="font-size-md font-family-monospace">-OSDiskDeleteOption</h3> <div class="parameterInfo"> <p>Specifies OS Disk delete option after VM deletion. Options are Detach, Delete</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-platformfaultdomain" class="font-size-md font-family-monospace">-PlatformFaultDomain</h3> <div class="parameterInfo"> <p>Specifies the fault domain of the virtual machine.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.int32" data-linktype="absolute-path">Int32</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>True</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-priority" class="font-size-md font-family-monospace">-Priority</h3> <div class="parameterInfo"> <p>The priority for the virtual machine. Only supported values are 'Regular', 'Spot' and 'Low'. 'Regular' is for regular virtual machine. 'Spot' is for spot virtual machine. 'Low' is also for spot virtual machine but is replaced by 'Spot'. Please use 'Spot' instead of 'Low'.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-proximityplacementgroupid" class="font-size-md font-family-monospace">-ProximityPlacementGroupId</h3> <div class="parameterInfo"> <p>The resource id of the Proximity Placement Group to use with this virtual machine.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Aliases:</td><td>ProximityPlacementGroup</td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-publicipaddressname" class="font-size-md font-family-monospace">-PublicIpAddressName</h3> <div class="parameterInfo"> <p>The name of a new (or existing) public IP address for the created VM to use. If not specified, a name will be generated.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-publicipsku" class="font-size-md font-family-monospace">-PublicIpSku</h3> <div class="parameterInfo"> <p>Specifies public IP sku name</p> <p>Accepted values are "Basic" and "Standard"</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>Standard</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-resourcegroupname" class="font-size-md font-family-monospace">-ResourceGroupName</h3> <div class="parameterInfo"> <p>Specifies the name of a resource group.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>0</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>True</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-securitygroupname" class="font-size-md font-family-monospace">-SecurityGroupName</h3> <div class="parameterInfo"> <p>The name of a new (or existing) network security group (NSG) for the created VM to use. If not specified, a name will be generated.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-securitytype" class="font-size-md font-family-monospace">-SecurityType</h3> <div class="parameterInfo"> <p>Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. By default, UefiSettings will not be enabled unless this property is set.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Accepted values:</td><td>TrustedLaunch, ConfidentialVM, Standard</td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>True</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-sharedgalleryimageid" class="font-size-md font-family-monospace">-SharedGalleryImageId</h3> <div class="parameterInfo"> <p>Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET call.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-size" class="font-size-md font-family-monospace">-Size</h3> <div class="parameterInfo"> <p>The Virtual Machine Size. <a href="/en-us/powershell/module/az.compute/get-azcomputeresourcesku" data-linktype="absolute-path">Get-AzComputeResourceSku</a> can be used to find out available sizes for your subscription and region.<br> The Default Value is: Standard_D2s_v3.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>Standard_D2s_v3</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-sshkeyname" class="font-size-md font-family-monospace">-SshKeyName</h3> <div class="parameterInfo"> <p>Name of the SSH Public Key resource.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-sshkeytype" class="font-size-md font-family-monospace">-SshKeyType</h3> <div class="parameterInfo"> <p>Specify the type of SSH key to generate. Allowed values are 'Ed25519' and 'RSA'.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Accepted values:</td><td>Ed25519, RSA</td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-subnetaddressprefix" class="font-size-md font-family-monospace">-SubnetAddressPrefix</h3> <div class="parameterInfo"> <p>The address prefix for the subnet which will be created for the VM.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>192.168.1.0/24</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-subnetname" class="font-size-md font-family-monospace">-SubnetName</h3> <div class="parameterInfo"> <p>The name of a new (or existing) subnet for the created VM to use. If not specified, a name will be generated.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-systemassignedidentity" class="font-size-md font-family-monospace">-SystemAssignedIdentity</h3> <div class="parameterInfo"> <p>If the parameter is present then the VM is assigned a managed system identity that is auto generated.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.management.automation.switchparameter" data-linktype="absolute-path">SwitchParameter</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-tag" class="font-size-md font-family-monospace">-Tag</h3> <div class="parameterInfo"> <p>Specifies that resources and resource groups can be tagged with a set of name-value pairs. Adding tags to resources enables you to group resources together across resource groups and to create your own views. Each resource or resource group can have a maximum of 15 tags.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.collections.hashtable" data-linktype="absolute-path">Hashtable</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>True</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-userassignedidentity" class="font-size-md font-family-monospace">-UserAssignedIdentity</h3> <div class="parameterInfo"> <p>The name of a managed service identity that should be assigned to the VM.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-userdata" class="font-size-md font-family-monospace">-UserData</h3> <div class="parameterInfo"> <p>UserData for the VM, which will be base-64 encoded. Customer should not pass any secrets in here.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>True</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-vcpucountavailable" class="font-size-md font-family-monospace">-vCPUCountAvailable</h3> <div class="parameterInfo"> <p>Specifies the number of vCPUs available for the VM. When this property is not specified in the request body the default behavior is to set it to the value of vCPUs available for that VM size exposed in api response of <a href="/en-us/rest/api/compute/resource-skus/list" data-linktype="absolute-path">List all available virtual machine sizes in a region</a>.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.int32" data-linktype="absolute-path">Int32</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>True</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-vcpucountpercore" class="font-size-md font-family-monospace">-vCPUCountPerCore</h3> <div class="parameterInfo"> <p>Specifies the vCPU to physical core ratio. When this property is not specified in the request body the default behavior is set to the value of vCPUsPerCore for the VM Size exposed in api response of <a href="/en-us/rest/api/compute/resource-skus/list" data-linktype="absolute-path">List all available virtual machine sizes in a region</a>. Setting this property to 1 also means that hyper-threading is disabled.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.int32" data-linktype="absolute-path">Int32</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>True</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-virtualnetworkname" class="font-size-md font-family-monospace">-VirtualNetworkName</h3> <div class="parameterInfo"> <p>The name of a new (or existing) virtual network for the created VM to use. If not specified, a name will be generated.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-vm" class="font-size-md font-family-monospace">-VM</h3> <div class="parameterInfo"> <p>Specifies a local virtual machine to create. To obtain a virtual machine object, use the New-AzVMConfig cmdlet. Other cmdlets can be used to configure the virtual machine, such as Set-AzVMOperatingSystem, Set-AzVMSourceImage, and Add-AzVMNetworkInterface.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/microsoft.azure.commands.compute.models.psvirtualmachine" data-linktype="absolute-path">PSVirtualMachine</a></td></tr> <tr><td>Aliases:</td><td>VMProfile</td></tr> <tr><td>Position:</td><td>2</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>True</td></tr> <tr><td>Accept pipeline input:</td><td>True</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-vmssid" class="font-size-md font-family-monospace">-VmssId</h3> <div class="parameterInfo"> <p>The ID of Virtual Machine Scale Set that this VM will be associated with</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-whatif" class="font-size-md font-family-monospace">-WhatIf</h3> <div class="parameterInfo"> <p>Shows what would happen if the cmdlet runs. The cmdlet is not run.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.management.automation.switchparameter" data-linktype="absolute-path">SwitchParameter</a></td></tr> <tr><td>Aliases:</td><td>wi</td></tr> <tr><td>Position:</td><td>Named</td></tr> <tr><td>Default value:</td><td>False</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h3 id="-zone" class="font-size-md font-family-monospace">-Zone</h3> <div class="parameterInfo"> <p>Specifies the zone of the virtual machine. Although it takes in an array of zones, virtual machines do not support multiple availability zones. The allowed value depends on the capabilities of the region. Allowed value will normally be 1, 2, or 3. More information on <a href="/en-us/azure/reliability/availability-zones-overview#availability-zones" data-linktype="absolute-path">Azure availability zones</a>.</p> <table class="table stack"> <tbody><tr><td>Type:</td><td><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a><span>[</span><span>]</span></td></tr> <tr><td>Position:</td><td>3</td></tr> <tr><td>Default value:</td><td>None</td></tr> <tr><td>Required:</td><td>False</td></tr> <tr><td>Accept pipeline input:</td><td>False</td></tr> <tr><td>Accept wildcard characters:</td><td>False</td></tr> </tbody></table> </div> <h2 id="inputs">Inputs</h2> <p><strong><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a></strong></p> <p><strong><a class="no-loc" href="/en-us/dotnet/api/microsoft.azure.commands.compute.models.psvirtualmachine" data-linktype="absolute-path">PSVirtualMachine</a></strong></p> <p><strong><a class="no-loc" href="/en-us/dotnet/api/system.string" data-linktype="absolute-path">String</a><span>[</span><span>]</span></strong></p> <p><strong><a class="no-loc" href="/en-us/dotnet/api/system.collections.hashtable" data-linktype="absolute-path">Hashtable</a></strong></p> <h2 id="outputs">Outputs</h2> <p><strong><a class="no-loc" href="/en-us/dotnet/api/microsoft.azure.commands.compute.models.psazureoperationresponse" data-linktype="absolute-path">PSAzureOperationResponse</a></strong></p> <p><strong><a class="no-loc" href="/en-us/dotnet/api/microsoft.azure.commands.compute.models.psvirtualmachine" data-linktype="absolute-path">PSVirtualMachine</a></strong></p> <h2 id="related-links">Related Links</h2> <ul> <li><a href="get-azvm?view=azps-13.0.0" data-linktype="relative-path">Get-AzVM</a></li> <li><a href="remove-azvm?view=azps-13.0.0" data-linktype="relative-path">Remove-AzVM</a></li> <li><a href="restart-azvm?view=azps-13.0.0" data-linktype="relative-path">Restart-AzVM</a></li> <li><a href="start-azvm?view=azps-13.0.0" data-linktype="relative-path">Start-AzVM</a></li> <li><a href="stop-azvm?view=azps-13.0.0" data-linktype="relative-path">Stop-AzVM</a></li> <li><a href="update-azvm?view=azps-13.0.0" data-linktype="relative-path">Update-AzVM</a></li> <li><a href="add-azvmdatadisk?view=azps-13.0.0" data-linktype="relative-path">Add-AzVMDataDisk</a></li> <li><a href="add-azvmnetworkinterface?view=azps-13.0.0" data-linktype="relative-path">Add-AzVMNetworkInterface</a></li> <li><a href="new-azvmconfig?view=azps-13.0.0" data-linktype="relative-path">New-AzVMConfig</a></li> <li><a href="set-azvmoperatingsystem?view=azps-13.0.0" data-linktype="relative-path">Set-AzVMOperatingSystem</a></li> <li><a href="set-azvmsourceimage?view=azps-13.0.0" data-linktype="relative-path">Set-AzVMSourceImage</a></li> <li><a href="set-azvmosdisk?view=azps-13.0.0" data-linktype="relative-path">Set-AzVMOSDisk</a></li> </ul> </div><div id="ms--inline-notifications" class="margin-block-xs" data-bi-name="inline-notification"></div><div id="assertive-live-region" role="alert" aria-live="assertive" class="visually-hidden" aria-relevant="additions" aria-atomic="true"></div> <div id="polite-live-region" role="status" aria-live="polite" class="visually-hidden" aria-relevant="additions" aria-atomic="true"></div> <!-- </content> --> </main><!-- recommendations section --><!-- end recommendations section --> <!-- feedback section --><section class="feedback-section position-relative margin-top-lg border border-radius padding-xxs" data-bi-name="open-source-feedback-section" data-open-source-feedback-section hidden> <div class="display-flex flex-direction-column flex-direction-row-tablet"> <div class="width-450-tablet padding-inline-xs padding-inline-xs-tablet padding-top-xs padding-bottom-sm padding-top-xs-tablet background-color-body-medium"> <div class="display-flex flex-direction-column"> <div class="padding-bottom-xxs"> <span class="icon margin-right-xxs" aria-hidden="true"> <span class="docon docon-brand-github"></span> </span> <span class="font-weight-semibold" >Collaborate with us on GitHub</span> </div> <span class="line-height-normal"> The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see <a href="https://learn.microsoft.com/powershell/azure/azps-docs-style-guide">our contributor guide</a>. </span> </div> </div> <div class="display-flex gap-xs width-full-tablet flex-direction-column padding-xs justify-content-space-evenly"> <div class="media"><div class="media-left"> <div class="image image-36x36" hidden data-open-source-image-container> <img class="theme-display is-light" src="https://learn.microsoft.com/media/logos/logo-powershell.svg" aria-hidden="true" data-open-source-image-light/> <img class="theme-display is-dark is-high-contrast" src="https://learn.microsoft.com/media/logos/logo-powershell.svg" aria-hidden="true" data-open-source-image-dark/> </div> </div> <div class="media-content"> <p class="font-size-xl font-weight-semibold margin-bottom-xxs" data-open-source-product-title>Azure PowerShell</p> <div class="display-flex gap-xs flex-direction-column"> <p class="line-height-normal" data-open-source-product-description></p> <div class="display-flex gap-xs flex-direction-column"> <a href="" data-github-link> <span class="icon margin-right-xxs" aria-hidden="true"> <span class="docon docon-bug"></span> </span> <span>Open a documentation issue</span> </a> <a href="https://github.com/Azure/azure-powershell/issues/new/choose" class="display-block margin-top-auto font-size-md" data-feedback-product-url> <span class="icon margin-right-xxs" aria-hidden="true"> <span class="docon docon-feedback"></span> </span> <span>Provide product feedback</span> </a> </div> </div> </div> </div> </div> </div> </section><!-- end feedback section --> <!-- feedback report section --><!-- end feedback report section --><div class="border-top is-visible-interactive has-default-focus margin-top-sm "><footer id="footer-interactive" data-bi-name="footer" class="footer-layout"><div class="display-flex gap-xs flex-wrap-wrap is-full-height padding-right-lg-desktop"><a data-mscc-ic="false" class="locale-selector-link button button-sm button-clear flex-shrink-0" href="#" data-bi-name="select-locale"> <span class="icon" aria-hidden="true"> <span class="docon docon-world"></span> </span> <span class="local-selector-link-text"></span></a><div class="ccpa-privacy-link" data-ccpa-privacy-link hidden> <a href="https://aka.ms/yourcaliforniaprivacychoices" class="button button-sm button-clear flex-shrink-0" data-mscc-ic="false" data-bi-name="your-privacy-choices" > <svg role="img" aria-label="California Consumer Privacy Act (CCPA) Opt-Out Icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 14" xml:space="preserve" height="16" width="43" focusable="false" > <title>California Consumer Privacy Act (CCPA) Opt-Out Icon</title> <path d="M7.4 12.8h6.8l3.1-11.6H7.4C4.2 1.2 1.6 3.8 1.6 7s2.6 5.8 5.8 5.8z" style="fill-rule:evenodd;clip-rule:evenodd;fill:#fff"></path> <path d="M22.6 0H7.4c-3.9 0-7 3.1-7 7s3.1 7 7 7h15.2c3.9 0 7-3.1 7-7s-3.2-7-7-7zm-21 7c0-3.2 2.6-5.8 5.8-5.8h9.9l-3.1 11.6H7.4c-3.2 0-5.8-2.6-5.8-5.8z" style="fill-rule:evenodd;clip-rule:evenodd;fill:#06f"></path> <path d="M24.6 4c.2.2.2.6 0 .8L22.5 7l2.2 2.2c.2.2.2.6 0 .8-.2.2-.6.2-.8 0l-2.2-2.2-2.2 2.2c-.2.2-.6.2-.8 0-.2-.2-.2-.6 0-.8L20.8 7l-2.2-2.2c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0l2.2 2.2L23.8 4c.2-.2.6-.2.8 0z" style="fill:#fff"></path> <path d="M12.7 4.1c.2.2.3.6.1.8L8.6 9.8c-.1.1-.2.2-.3.2-.2.1-.5.1-.7-.1L5.4 7.7c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0L8 8.6l3.8-4.5c.2-.2.6-.2.9 0z" style="fill:#06f"></path> </svg> <span>Your Privacy Choices</span> </a> </div> <div class="flex-shrink-0"> <div class="dropdown has-caret-up"> <button class="dropdown-trigger button button-clear button-sm has-inner-focus theme-dropdown-trigger" aria-controls="theme-menu-interactive" aria-expanded="false" title="Theme" data-bi-name="theme"> <span class="icon"> <span class="docon docon-sun" aria-hidden="true"></span> </span> <span>Theme</span> <span class="icon expanded-indicator" aria-hidden="true"> <span class="docon docon-chevron-down-light"></span> </span> </button> <div class="dropdown-menu" id="theme-menu-interactive" role="menu"> <ul class="theme-selector padding-xxs" role="none"> <li class="theme display-block" role="menuitem"> <button class="button button-clear button-sm theme-control button-block justify-content-flex-start" data-theme-to="light"> <span class="theme-light margin-right-xxs"> <span class="theme-selector-icon border display-inline-block has-body-background" aria-hidden="true"> <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 14"> <rect width="22" height="14" class="has-fill-body-background" /> <rect x="5" y="5" width="12" height="4" class="has-fill-secondary" /> <rect x="5" y="2" width="2" height="1" class="has-fill-secondary" /> <rect x="8" y="2" width="2" height="1" class="has-fill-secondary" /> <rect x="11" y="2" width="3" height="1" class="has-fill-secondary" /> <rect x="1" y="1" width="2" height="2" class="has-fill-secondary" /> <rect x="5" y="10" width="7" height="2" rx="0.3" class="has-fill-primary" /> <rect x="19" y="1" width="2" height="2" rx="1" class="has-fill-secondary" /> </svg> </span> </span> <span>Light</span> </button> </li> <li class="theme display-block" role="menuitem"> <button class="button button-clear button-sm theme-control button-block justify-content-flex-start" data-theme-to="dark"> <span class="theme-dark margin-right-xxs"> <span class="border theme-selector-icon display-inline-block has-body-background" aria-hidden="true"> <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 14"> <rect width="22" height="14" class="has-fill-body-background" /> <rect x="5" y="5" width="12" height="4" class="has-fill-secondary" /> <rect x="5" y="2" width="2" height="1" class="has-fill-secondary" /> <rect x="8" y="2" width="2" height="1" class="has-fill-secondary" /> <rect x="11" y="2" width="3" height="1" class="has-fill-secondary" /> <rect x="1" y="1" width="2" height="2" class="has-fill-secondary" /> <rect x="5" y="10" width="7" height="2" rx="0.3" class="has-fill-primary" /> <rect x="19" y="1" width="2" height="2" rx="1" class="has-fill-secondary" /> </svg> </span> </span> <span>Dark</span> </button> </li> <li class="theme display-block" role="menuitem"> <button class="button button-clear button-sm theme-control button-block justify-content-flex-start" data-theme-to="high-contrast"> <span class="theme-high-contrast margin-right-xxs"> <span class="border theme-selector-icon display-inline-block has-body-background" aria-hidden="true"> <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 14"> <rect width="22" height="14" class="has-fill-body-background" /> <rect x="5" y="5" width="12" height="4" class="has-fill-secondary" /> <rect x="5" y="2" width="2" height="1" class="has-fill-secondary" /> <rect x="8" y="2" width="2" height="1" class="has-fill-secondary" /> <rect x="11" y="2" width="3" height="1" class="has-fill-secondary" /> <rect x="1" y="1" width="2" height="2" class="has-fill-secondary" /> <rect x="5" y="10" width="7" height="2" rx="0.3" class="has-fill-primary" /> <rect x="19" y="1" width="2" height="2" rx="1" class="has-fill-secondary" /> </svg> </span> </span> <span>High contrast</span> </button> </li> </ul> </div> </div> </div> </div> <ul class="links" data-bi-name="footerlinks"> <li class="manage-cookies-holder" hidden></li><li><a class="external-link-indicator" data-mscc-ic="false" href="/en-us/previous-versions/" data-bi-name="archivelink">Previous Versions</a></li> <li><a class="external-link-indicator" data-mscc-ic="false" href="https://techcommunity.microsoft.com/t5/microsoft-learn-blog/bg-p/MicrosoftLearnBlog" data-bi-name="bloglink">Blog</a></li> <li><a class="external-link-indicator" data-mscc-ic="false" href="/en-us/contribute/" data-bi-name="contributorGuide">Contribute</a></li><li><a class="external-link-indicator" data-mscc-ic="false" href="https://go.microsoft.com/fwlink/?LinkId=521839" data-bi-name="privacy">Privacy</a></li><li><a class="external-link-indicator" data-mscc-ic="false" href="/en-us/legal/termsofuse" data-bi-name="termsofuse">Terms of Use</a></li><li><a class="external-link-indicator" data-mscc-ic="false" href="https://www.microsoft.com/legal/intellectualproperty/Trademarks/" data-bi-name="trademarks">Trademarks</a></li><li>&copy; Microsoft 2024</li> </ul> </footer></div></div><div id="ms--additional-resources" class="right-container column is-4-desktop display-none display-block-desktop" data-bi-name="pageactions" role="complementary" aria-label="Additional resources" > <div id="affixed-right-container" class="margin-top-sm-tablet" data-bi-name="right-column"> <h2 id="ms--additional-resources-heading" class="title is-6 margin-top-md" hidden>Additional resources</h2> <section id="right-rail-events" data-bi-name="events-card" hidden></section> <section id="right-rail-training" data-bi-name="learning-resources-card" hidden></section> <section id="right-rail-recommendations" data-bi-name="recommendations" hidden></section> <nav id="side-doc-outline" class="doc-outline" data-bi-name="intopic toc" aria-label="In this article"> <h3>In this article</h3> </nav> <section id="right-rail-qna" class="margin-top-xxs" data-bi-name="qna-link-card" hidden></section> </div> </div></div> <!--end of div.columns --> </section> <!--end of .primary-holder --> <!-- interactive container --> <aside id="interactive-container" class="interactive-container is-visible-interactive column has-body-background-dark "> </aside> <!-- end of interactive container --> </div> </div> <!--end of .mainContainer --> <section class="border-top has-default-focus is-hidden-interactive margin-top-sm "><footer id="footer" data-bi-name="footer" class="footer-layout uhf-container has-padding" role="contentinfo"><div class="display-flex gap-xs flex-wrap-wrap is-full-height padding-right-lg-desktop"><a data-mscc-ic="false" class="locale-selector-link button button-sm button-clear flex-shrink-0" href="#" data-bi-name="select-locale"> <span class="icon" aria-hidden="true"> <span class="docon docon-world"></span> </span> <span class="local-selector-link-text"></span></a><div class="ccpa-privacy-link" data-ccpa-privacy-link hidden> <a href="https://aka.ms/yourcaliforniaprivacychoices" class="button button-sm button-clear flex-shrink-0" data-mscc-ic="false" data-bi-name="your-privacy-choices" > <svg role="img" aria-label="California Consumer Privacy Act (CCPA) Opt-Out Icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 14" xml:space="preserve" height="16" width="43" focusable="false" > <title>California Consumer Privacy Act (CCPA) Opt-Out Icon</title> <path d="M7.4 12.8h6.8l3.1-11.6H7.4C4.2 1.2 1.6 3.8 1.6 7s2.6 5.8 5.8 5.8z" style="fill-rule:evenodd;clip-rule:evenodd;fill:#fff"></path> <path d="M22.6 0H7.4c-3.9 0-7 3.1-7 7s3.1 7 7 7h15.2c3.9 0 7-3.1 7-7s-3.2-7-7-7zm-21 7c0-3.2 2.6-5.8 5.8-5.8h9.9l-3.1 11.6H7.4c-3.2 0-5.8-2.6-5.8-5.8z" style="fill-rule:evenodd;clip-rule:evenodd;fill:#06f"></path> <path d="M24.6 4c.2.2.2.6 0 .8L22.5 7l2.2 2.2c.2.2.2.6 0 .8-.2.2-.6.2-.8 0l-2.2-2.2-2.2 2.2c-.2.2-.6.2-.8 0-.2-.2-.2-.6 0-.8L20.8 7l-2.2-2.2c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0l2.2 2.2L23.8 4c.2-.2.6-.2.8 0z" style="fill:#fff"></path> <path d="M12.7 4.1c.2.2.3.6.1.8L8.6 9.8c-.1.1-.2.2-.3.2-.2.1-.5.1-.7-.1L5.4 7.7c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0L8 8.6l3.8-4.5c.2-.2.6-.2.9 0z" style="fill:#06f"></path> </svg> <span>Your Privacy Choices</span> </a> </div> <div class="flex-shrink-0"> <div class="dropdown has-caret-up"> <button class="dropdown-trigger button button-clear button-sm has-inner-focus theme-dropdown-trigger" aria-controls="theme-menu" aria-expanded="false" title="Theme" data-bi-name="theme"> <span class="icon"> <span class="docon docon-sun" aria-hidden="true"></span> </span> <span>Theme</span> <span class="icon expanded-indicator" aria-hidden="true"> <span class="docon docon-chevron-down-light"></span> </span> </button> <div class="dropdown-menu" id="theme-menu" role="menu"> <ul class="theme-selector padding-xxs" role="none"> <li class="theme display-block" role="menuitem"> <button class="button button-clear button-sm theme-control button-block justify-content-flex-start" data-theme-to="light"> <span class="theme-light margin-right-xxs"> <span class="theme-selector-icon border display-inline-block has-body-background" aria-hidden="true"> <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 14"> <rect width="22" height="14" class="has-fill-body-background" /> <rect x="5" y="5" width="12" height="4" class="has-fill-secondary" /> <rect x="5" y="2" width="2" height="1" class="has-fill-secondary" /> <rect x="8" y="2" width="2" height="1" class="has-fill-secondary" /> <rect x="11" y="2" width="3" height="1" class="has-fill-secondary" /> <rect x="1" y="1" width="2" height="2" class="has-fill-secondary" /> <rect x="5" y="10" width="7" height="2" rx="0.3" class="has-fill-primary" /> <rect x="19" y="1" width="2" height="2" rx="1" class="has-fill-secondary" /> </svg> </span> </span> <span>Light</span> </button> </li> <li class="theme display-block" role="menuitem"> <button class="button button-clear button-sm theme-control button-block justify-content-flex-start" data-theme-to="dark"> <span class="theme-dark margin-right-xxs"> <span class="border theme-selector-icon display-inline-block has-body-background" aria-hidden="true"> <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 14"> <rect width="22" height="14" class="has-fill-body-background" /> <rect x="5" y="5" width="12" height="4" class="has-fill-secondary" /> <rect x="5" y="2" width="2" height="1" class="has-fill-secondary" /> <rect x="8" y="2" width="2" height="1" class="has-fill-secondary" /> <rect x="11" y="2" width="3" height="1" class="has-fill-secondary" /> <rect x="1" y="1" width="2" height="2" class="has-fill-secondary" /> <rect x="5" y="10" width="7" height="2" rx="0.3" class="has-fill-primary" /> <rect x="19" y="1" width="2" height="2" rx="1" class="has-fill-secondary" /> </svg> </span> </span> <span>Dark</span> </button> </li> <li class="theme display-block" role="menuitem"> <button class="button button-clear button-sm theme-control button-block justify-content-flex-start" data-theme-to="high-contrast"> <span class="theme-high-contrast margin-right-xxs"> <span class="border theme-selector-icon display-inline-block has-body-background" aria-hidden="true"> <svg class="svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 14"> <rect width="22" height="14" class="has-fill-body-background" /> <rect x="5" y="5" width="12" height="4" class="has-fill-secondary" /> <rect x="5" y="2" width="2" height="1" class="has-fill-secondary" /> <rect x="8" y="2" width="2" height="1" class="has-fill-secondary" /> <rect x="11" y="2" width="3" height="1" class="has-fill-secondary" /> <rect x="1" y="1" width="2" height="2" class="has-fill-secondary" /> <rect x="5" y="10" width="7" height="2" rx="0.3" class="has-fill-primary" /> <rect x="19" y="1" width="2" height="2" rx="1" class="has-fill-secondary" /> </svg> </span> </span> <span>High contrast</span> </button> </li> </ul> </div> </div> </div> </div> <ul class="links" data-bi-name="footerlinks"> <li class="manage-cookies-holder" hidden></li><li><a class="external-link-indicator" data-mscc-ic="false" href="/en-us/previous-versions/" data-bi-name="archivelink">Previous Versions</a></li> <li><a class="external-link-indicator" data-mscc-ic="false" href="https://techcommunity.microsoft.com/t5/microsoft-learn-blog/bg-p/MicrosoftLearnBlog" data-bi-name="bloglink">Blog</a></li> <li><a class="external-link-indicator" data-mscc-ic="false" href="/en-us/contribute/" data-bi-name="contributorGuide">Contribute</a></li><li><a class="external-link-indicator" data-mscc-ic="false" href="https://go.microsoft.com/fwlink/?LinkId=521839" data-bi-name="privacy">Privacy</a></li><li><a class="external-link-indicator" data-mscc-ic="false" href="/en-us/legal/termsofuse" data-bi-name="termsofuse">Terms of Use</a></li><li><a class="external-link-indicator" data-mscc-ic="false" href="https://www.microsoft.com/legal/intellectualproperty/Trademarks/" data-bi-name="trademarks">Trademarks</a></li><li>&copy; Microsoft 2024</li> </ul> </footer> </section> <div id="action-panel" role="region" aria-label="Action Panel" class="action-panel has-default-focus" tabindex="-1"></div> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10