Set-AzDiskSecurityProfile
Ange SecurityProfile på hanterad disk
Anteckning
Det här är den tidigare versionen av vår dokumentation. Se den senaste versionen för uppdaterad information.
Syntax
Set-AzDiskSecurityProfile
[-Disk] <PSDisk>
[-SecurityType <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Ange SecurityProfile på hanterad disk
Exempel
Exempel 1
$diskconfig = New-AzDiskConfig -DiskSizeGB 10 -AccountType PremiumLRS -OsType Windows -CreateOption FromImage;
$image = '/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Microsoft.Compute/images/TestImage123';
$diskconfig = Set-AzDiskImageReference -Disk $diskconfig -Id $image -Lun 0;
$diskconfig = Set-AzDiskSecurityProfile -Disk $diskconfig -SecurityType "TrustedLaunch";
New-AzDisk -ResourceGroupName 'ResourceGroup01' -DiskName 'Disk01' -Disk $diskconfig;
#$disk.Properties.SecurityProfile.SecurityType == "TrustedLaunch";
Kunder kan ange SecurityType för hanterade diskar.
Parametrar
-DefaultProfile
Autentiseringsuppgifter, konto, klientorganisation och prenumeration som används för kommunikation med Azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
-Disk
Disksäkerhetsprofil
| Type: | PSDisk |
| Aliases: | DiskSecurityProfile |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
-SecurityType
Säkerhetstyp för disk
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |