@@ -124,13 +124,24 @@ Parameters of the `New-GuestConfigurationPolicy` cmdlet:
124
124
- ** ExcludeArcMachines** : Specifies that the Policy definition should exclude Arc machines. This
125
125
parameter is required if you are using a User Assigned Managed Identity to provide access to an
126
126
Azure Storage blob.
127
+ - ** UseSystemAssignedIdentity** : This is the option to use the system assigned identity for
128
+ downloading package from storage account container instead of using SaS URL.
129
+
130
+ You can't use this option with the ** ManagedIdentityResourceId** . The options are mutually
131
+ exclusive.
132
+
133
+ You can use this parameter without ** ExcludeArcMachines** option as the system assigned
134
+ identity is available for Arc machines.
127
135
128
136
> [ !IMPORTANT]
129
137
> Unlike Azure VMs, Arc-connected machines currently do not support User Assigned Managed
130
138
> Identities. As a result, the ` -ExcludeArcMachines ` flag is required to ensure the exclusion of
131
139
> those machines from the policy definition. For the Azure VM to download the assigned package and
132
140
> apply the policy, the Guest Configuration Agent must be version ` 1.29.82.0 ` or higher for Windows
133
141
> and version ` 1.26.76.0 ` or higher for Linux.
142
+ >
143
+ > For Arc-connected machines, you can also use System Assigned Managed Identities to download
144
+ > packages.
134
145
135
146
For more information about the ** Mode** parameter, see the page
136
147
[ How to configure remediation options for machine configuration] [ 02 ] .
@@ -191,6 +202,27 @@ New-GuestConfigurationPolicy @PolicyConfig3 -ExcludeArcMachines
191
202
For this scenario, you need to disable the ** Allow Blob anonymous access** setting and assign the
192
203
role ** Storage Blob Data Reader** on the storage account to the identity.
193
204
205
+ Create a policy definition that _ enforces_ a custom configuration package using a System-Assigned
206
+ Managed Identity:
207
+
208
+ ``` powershell
209
+ $PolicyConfig4 = @{
210
+ PolicyId = '_My GUID_'
211
+ ContentUri = $contentUri
212
+ DisplayName = 'My deployment policy'
213
+ Description = 'My deployment policy'
214
+ Path = './policies/deployIfNotExists.json'
215
+ Platform = 'Windows'
216
+ PolicyVersion = 1.0.0
217
+ Mode = 'ApplyAndAutoCorrect'
218
+ LocalContentPath = "C:\Local\Path\To\Package" # Required parameter for managed identity
219
+ }
220
+ New-GuestConfigurationPolicy @PolicyConfig4 -UseSystemAssignedIdentity
221
+ ```
222
+
223
+ For this scenario, you need to disable the ** Allow Blob anonymous access** setting and assign the
224
+ role ** Storage Blob Data Reader** on the storage account to the system identity.
225
+
194
226
> [ !NOTE]
195
227
> You can retrieve the resourceId of a managed identity using the ` Get-AzUserAssignedIdentity `
196
228
> PowerShell cmdlet.
0 commit comments