Dela via


Get-AzureVMDscExtension

Hämtar inställningarna för DSC-tillägget på en virtuell dator.

Kommentar

De cmdletar som refereras i den här dokumentationen är till för att hantera äldre Azure-resurser som använder Service Management-API:er. Se Az PowerShell-modulen för cmdletar för att hantera Azure Resource Manager-resurser.

Syntax

Get-AzureVMDscExtension
   -VM <IPersistentVM>
   [-Profile <AzureSMProfile>]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [<CommonParameters>]

Description

Cmdleten Get-AzureVMDscExtension hämtar inställningarna för DSC-tillägget på en virtuell dator.

Exempel

Exempel 1: Hämta inställningen för DSC-tillägget på en virtuell dator

PS C:\> Get-AzureVMDscExtension -VM $VMModulesUrl
https://myaccount.blob.core.contoso.net/windows-powershell-dsc/MyConfiguration.ps1.zipConfigurationFunction : MyConfiguration.ps1\MyConfigurationProperties            : {ServerName}ExtensionName         : DSCPublisher             : Microsoft.PowershellVersion               : 1.*PrivateConfiguration  :PublicConfiguration   : {"ModulesUrl": "https://myaccount.blob.core.contoso.net/windows-powershell-dsc/MyConfiguration.ps1.zip","ConfigurationFunction": "MyConfiguration.ps1\\MyConfiguration","Properties": {"ServerName": "C:\\MyDirectory"}}ReferenceName         : DSCState                 : EnableRoleName              : my-vm

Det här kommandot hämtar inställningarna för DSC-tillägget på en virtuell dator.

Parametrar

-InformationAction

Anger hur den här cmdleten svarar på en informationshändelse.

De godtagbara värdena för den här parametern är:

  • Fortsätt
  • Ignorera
  • Fråga
  • TystKontinuera
  • Stoppa
  • Suspend
Type:ActionPreference
Aliases:infa
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InformationVariable

Anger en informationsvariabel.

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

-Profile

Anger den Azure-profil som den här cmdleten läser från. Om du inte anger någon profil läser den här cmdleten från den lokala standardprofilen.

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

-VM

Anger objektet för den beständiga virtuella datorn.

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

Utdata

Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.VirtualMachineDscExtensionContext