New-AzGalleryInVMAccessControlProfileVersionConfig
Creates a local PSGalleryInVmAccessControlProfileVersion object.
Syntax
Default (Default)
New-AzGalleryInVMAccessControlProfileVersionConfig
-Name <String>
-Location <String>
-Mode <String>
-DefaultAccess <String>
-TargetLocation <String[]>
[-ExcludeFromLatest]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Examples
Example 1
New-AzGalleryInVMAccessControlProfileVersionConfig -Name "myProfileVersion" -Location "West US 2" -Mode "Audit" -DefaultAccess "Deny" -TargetLocation @("West US", "West US 2") -ExcludeFromLatest
Creates a local PSGalleryInVmAccessControlProfileVersion object with the specified parameters.
Example 2
$CPVersionConfig = New-AzGalleryInVMAccessControlProfileVersionConfig -Name "myProfileVersion" -Location "West US 2" -Mode "Audit" -DefaultAccess "Deny" -TargetLocation @("West US", "West US 2") `
| Add-AzGalleryInVMAccessControlProfileVersionRulesPrivilege -PrivilegeName "GoalState" -Path "/machine" -QueryParameter @{ comp = "goalstate" } `
| Add-AzGalleryInVMAccessControlProfileVersionRulesRole -RoleName "Provisioning" -Privilege @("GoalState") `
| Add-AzGalleryInVMAccessControlProfileVersionRulesIdentity -IdentityName "WinPA" -UserName "SYSTEM" -GroupName "Administrators" -ExePath "C:\Windows\System32\cscript.exe" -ProcessName "cscript" `
| Add-AzGalleryInVMAccessControlProfileVersionRulesRoleAssignment -Role "Provisioning" -Identity @("WinPA")
Creates a local PSGalleryInVmAccessControlProfileVersion object then add rules.
Parameters
-DefaultAccess
This property allows you to specify if the requests will be allowed to access the host endpoints.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ExcludeFromLatest
If set to true, Virtual Machines deployed from the latest version of the Resource Profile won't use this Profile version.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Location
The ___location of the Gallery In VM Access Control Profile Version.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Mode
This property allows you to specify whether the access control rules are in Audit mode, in Enforce mode or Disabled.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Name
The name of the Gallery In VM Access Control Profile Version.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: GalleryInVMAccessControlProfileVersionName
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-TargetLocation
The names of the target regions where the Resource Profile version is going to be replicated to. This property is updatable.
Parameter properties
Type: String [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs