Skip to content

Commit fe3324a

Browse files
authored
Adding missing resource provider, fixing code
The resource provider "Microsoft.ManagedIdentity" is missing in the Register features section. The user identity would failed if not registered. The section Assign permissions for the identity to distribute the images will failed with the message "access to path /myRoleImageCreation.json is denied". Changing the variable $myRoleImageCreationPath = "$env:TEMP\myRoleImageCreation.json" to $myRoleImageCreationPath = "myRoleImageCreation.json" Step 4 in the section Create an image will fail with message "a parameter cannot be found that matches parameter name CustomizerName". Changin the parameter "CustomizerName = 'downloadBuildArtifacts' " to "Name = 'downloadBuildArtifacts' "
1 parent ff79eab commit fe3324a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

articles/virtual-machines/windows/image-builder-powershell.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,10 @@ If you haven't already done so, register the following resource providers to use
4545
- Microsoft.Storage
4646
- Microsoft.Network
4747
- Microsoft.VirtualMachineImages
48+
- Microsoft.ManagedIdentity
4849

4950
```azurepowershell-interactive
50-
Get-AzResourceProvider -ProviderNamespace Microsoft.Compute, Microsoft.KeyVault, Microsoft.Storage, Microsoft.VirtualMachineImages, Microsoft.Network |
51+
Get-AzResourceProvider -ProviderNamespace Microsoft.Compute, Microsoft.KeyVault, Microsoft.Storage, Microsoft.VirtualMachineImages, Microsoft.Network, Microsoft.ManagedIdentity |
5152
Where-Object RegistrationState -ne Registered |
5253
Register-AzResourceProvider
5354
```
@@ -119,7 +120,7 @@ Grant Azure image builder permissions to create images in the specified resource
119120

120121
```azurepowershell-interactive
121122
$myRoleImageCreationUrl = 'https://raw.githubusercontent.com/azure/azvmimagebuilder/master/solutions/12_Creating_AIB_Security_Roles/aibRoleImageCreation.json'
122-
$myRoleImageCreationPath = "$env:TEMP\myRoleImageCreation.json"
123+
$myRoleImageCreationPath = "myRoleImageCreation.json"
123124
124125
Invoke-WebRequest -Uri $myRoleImageCreationUrl -OutFile $myRoleImageCreationPath -UseBasicParsing
125126
@@ -224,7 +225,7 @@ Grant Azure image builder permissions to create images in the specified resource
224225
```azurepowershell-interactive
225226
$ImgCustomParams02 = @{
226227
FileCustomizer = $true
227-
CustomizerName = 'downloadBuildArtifacts'
228+
Name = 'downloadBuildArtifacts'
228229
Destination = 'c:\\buildArtifacts\\index.html'
229230
SourceUri = 'https://raw.githubusercontent.com/azure/azvmimagebuilder/master/quickquickstarts/exampleArtifacts/buildArtifacts/index.html'
230231
}

0 commit comments

Comments
 (0)