Bearbeiten

Freigeben über


New-AzLabServicesLab

Operation to create a lab resource.

Syntax

New-AzLabServicesLab
   -Name <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String>]
   -Location <String>
   [-AdditionalCapabilityInstallGpuDriver <EnableState>]
   [-AdminUserPassword <SecureString>]
   [-AdminUserUsername <String>]
   [-AutoShutdownProfileDisconnectDelay <TimeSpan>]
   [-AutoShutdownProfileIdleDelay <TimeSpan>]
   [-AutoShutdownProfileNoConnectDelay <TimeSpan>]
   [-AutoShutdownProfileShutdownOnDisconnect <EnableState>]
   [-AutoShutdownProfileShutdownOnIdle <ShutdownOnIdleMode>]
   [-AutoShutdownProfileShutdownWhenNotConnected <EnableState>]
   [-ConnectionProfileClientRdpAccess <ConnectionType>]
   [-ConnectionProfileClientSshAccess <ConnectionType>]
   [-ConnectionProfileWebRdpAccess <ConnectionType>]
   [-ConnectionProfileWebSshAccess <ConnectionType>]
   [-Description <String>]
   [-ImageReferenceId <String>]
   [-ImageReferenceOffer <String>]
   [-ImageReferencePublisher <String>]
   [-ImageReferenceSku <String>]
   [-ImageReferenceVersion <String>]
   [-LabPlanId <String>]
   [-NetworkProfileLoadBalancerId <String>]
   [-NetworkProfilePublicIPId <String>]
   [-NetworkProfileSubnetId <String>]
   [-NonAdminUserPassword <SecureString>]
   [-NonAdminUserUsername <String>]
   [-RosterProfileActiveDirectoryGroupId <String>]
   [-RosterProfileLmsInstance <String>]
   [-RosterProfileLtiClientId <String>]
   [-RosterProfileLtiContextId <String>]
   [-RosterProfileLtiRosterEndpoint <String>]
   [-SecurityProfileOpenAccess <EnableState>]
   [-SkuCapacity <Int32>]
   [-SkuFamily <String>]
   [-SkuName <String>]
   [-SkuSize <String>]
   [-SkuTier <SkuTier>]
   [-Tag <Hashtable>]
   [-Title <String>]
   [-VirtualMachineProfileCreateOption <CreateOption>]
   [-VirtualMachineProfileUsageQuota <TimeSpan>]
   [-VirtualMachineProfileUseSharedPassword <EnableState>]
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Operation to create a lab resource.

Examples

Example 1: Create a new lab.

New-AzLabServicesLab `
        -Name "NewLab" `
        -ResourceGroupName $ENV:ResourceGroupName `
        -Location $ENV:Location `
        -AdditionalCapabilityInstallGpuDriver Disabled `
        -AdminUserPassword "PlaceholderPassword" `
        -AdminUserUsername "PlaceholderAccountName" `
        -AutoShutdownProfileShutdownOnDisconnect Disabled `
        -AutoShutdownProfileShutdownOnIdle None `
        -AutoShutdownProfileShutdownWhenNotConnected Disabled `
        -ConnectionProfileClientRdpAccess Public `
        -ConnectionProfileClientSshAccess None `
        -ConnectionProfileWebRdpAccess None `
        -ConnectionProfileWebSshAccess None `
        -Description "New lab description" `
        -ImageReferenceOffer "Windows-10" `
        -ImageReferencePublisher "MicrosoftWindowsDesktop" `
        -ImageReferenceSku "20h2-pro" `
        -ImageReferenceVersion "latest" `
        -SecurityProfileOpenAccess Disabled `
        -SkuCapacity 3 `
        -SkuName "Standard" `
        -Title $ENV:NewLabName `
        -VirtualMachineProfileCreateOption "TemplateVM" `
        -VirtualMachineProfileUseSharedPassword Enabled

Location Name
-------- ----
westus2  NewLab

Creates a new Lab.

Parameters

-AdditionalCapabilityInstallGpuDriver

Flag to pre-install dedicated GPU drivers.

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

-AdminUserPassword

The password for the user. This is required for the TemplateVM createOption.

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

-AdminUserUsername

The username to use when signing in to lab VMs.

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

-AsJob

Run the command as a job

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

-AutoShutdownProfileDisconnectDelay

The amount of time a VM will stay running after a user disconnects if this behavior is enabled.

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

-AutoShutdownProfileIdleDelay

The amount of time a VM will idle before it is shutdown if this behavior is enabled.

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

-AutoShutdownProfileNoConnectDelay

The amount of time a VM will stay running before it is shutdown if no connection is made and this behavior is enabled.

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

-AutoShutdownProfileShutdownOnDisconnect

Whether shutdown on disconnect is enabled

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

-AutoShutdownProfileShutdownOnIdle

Whether a VM will get shutdown when it has idled for a period of time.

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

-AutoShutdownProfileShutdownWhenNotConnected

Whether a VM will get shutdown when it hasn't been connected to after a period of time.

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ConnectionProfileClientRdpAccess

The enabled access level for Client Access over RDP.

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

-ConnectionProfileClientSshAccess

The enabled access level for Client Access over SSH.

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

-ConnectionProfileWebRdpAccess

The enabled access level for Web Access over RDP.

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

-ConnectionProfileWebSshAccess

The enabled access level for Web Access over SSH.

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

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Description

The description of the lab.

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

-ImageReferenceId

Image resource ID

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

-ImageReferenceOffer

The image offer if applicable.

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

-ImageReferencePublisher

The image publisher

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

-ImageReferenceSku

The image SKU

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

-ImageReferenceVersion

The image version specified on creation.

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

-LabPlanId

The ID of the lab plan. Used during resource creation to provide defaults and acts as a permission container when creating a lab via labs.azure.com. Setting a labPlanId on an existing lab provides organization..

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

-Location

The geo-location where the resource lives

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Name

The name of the lab that uniquely identifies it within containing lab account. Used in resource URIs.

Type:String
Aliases:LabName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-NetworkProfileLoadBalancerId

The external load balancer resource id

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

-NetworkProfilePublicIPId

The external public IP resource id

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

-NetworkProfileSubnetId

The external subnet resource id

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

-NonAdminUserPassword

The password for the user. This is required for the TemplateVM createOption.

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

-NonAdminUserUsername

The username to use when signing in to lab VMs.

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

-NoWait

Run the command asynchronously

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

-ResourceGroupName

The name of the resource group. The name is case insensitive.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-RosterProfileActiveDirectoryGroupId

The AAD group ID which this lab roster is populated from. Having this set enables AAD sync mode.

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

-RosterProfileLmsInstance

The base URI identifying the lms instance.

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

-RosterProfileLtiClientId

The unique id of the azure lab services tool in the lms.

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

-RosterProfileLtiContextId

The unique context identifier for the lab in the lms.

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

-RosterProfileLtiRosterEndpoint

The uri of the names and roles service endpoint on the lms for the class attached to this lab.

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

-SecurityProfileOpenAccess

Whether any user or only specified users can register to a lab.

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

-SkuCapacity

If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.

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

-SkuFamily

If the service has different generations of hardware, for the same SKU, then that can be captured here.

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

-SkuName

The name of the SKU. Ex - P3. It is typically a letter+number code

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

-SkuSize

The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code.

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

-SkuTier

This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.

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

-SubscriptionId

The ID of the target subscription.

Type:String
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Tag

Resource tags.

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

-Title

The title of the lab.

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

-VirtualMachineProfileCreateOption

Indicates what lab virtual machines are created from.

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

-VirtualMachineProfileUsageQuota

The initial quota alloted to each lab user. Must be a time span between 0 and 9999 hours.

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

-VirtualMachineProfileUseSharedPassword

Enabling this option will use the same password for all user VMs.

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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

ILab