1
1
---
2
2
title : How to create Guest Configuration policies
3
- description : Learn how to create an Azure Policy Guest Configuration policy for Windows or Linux VMs.
4
- ms.date : 09/20 /2019
3
+ description : Learn how to create an Azure Policy Guest Configuration policy for Windows or Linux VMs with Azure PowerShell .
4
+ ms.date : 11/21 /2019
5
5
ms.topic : conceptual
6
6
---
7
7
# How to create Guest Configuration policies
@@ -12,9 +12,9 @@ create the configuration for auditing of the Azure machines. The DSC configurati
12
12
condition that the machine should be in. If the evaluation of the configuration fails, the Policy
13
13
effect ** auditIfNotExists** is triggered and the machine is considered ** non-compliant** .
14
14
15
- [ Azure Policy Guest Configuration] ( /azure/governance/policy/concepts/guest-configuration )
16
- can only be used to audit settings inside machines. Remediation
17
- of settings inside machines isn't yet available.
15
+ [ Azure Policy Guest Configuration] ( /azure/governance/policy/concepts/guest-configuration ) can only
16
+ be used to audit settings inside machines. Remediation of settings inside machines isn't yet
17
+ available.
18
18
19
19
Use the following actions to create your own configuration for validating the state of an Azure
20
20
machine.
@@ -26,14 +26,17 @@ machine.
26
26
27
27
To create a Guest Configuration policy, the resource module must be added. This resource module can
28
28
be used with locally installed PowerShell, with [ Azure Cloud Shell] ( https://shell.azure.com ) , or
29
- with the [ Azure PowerShell Docker image] ( https://hub.docker.com/rsdk-powershell/ ) .
29
+ with the
30
+ [ Azure PowerShell Core Docker image] ( https://hub.docker.com/r/azuresdk/azure-powershell-core ) .
30
31
31
32
### Base requirements
32
33
33
34
The Guest Configuration resource module requires the following software:
34
35
35
- - PowerShell. If it isn't yet installed, follow [ these instructions] ( /powershell/scripting/install/installing-powershell ) .
36
- - Azure PowerShell 1.5.0 or higher. If it isn't yet installed, follow [ these instructions] ( /powershell/azure/install-az-ps ) .
36
+ - PowerShell. If it isn't yet installed, follow
37
+ [ these instructions] ( /powershell/scripting/install/installing-powershell ) .
38
+ - Azure PowerShell 1.5.0 or higher. If it isn't yet installed, follow
39
+ [ these instructions] ( /powershell/azure/install-az-ps ) .
37
40
38
41
### Install the module
39
42
@@ -209,8 +212,9 @@ Parameters of the `New-GuestConfigurationPackage` cmdlet:
209
212
210
213
The completed package must be stored in a location that is accessible by the managed virtual
211
214
machines. Examples include GitHub repositories, an Azure Repo, or Azure storage. If you prefer to
212
- not make the package public, you can include a [ SAS token] ( ../../../storage/common/storage-dotnet-shared-access-signature-part-1.md )
213
- in the URL. You could also implement
215
+ not make the package public, you can include a
216
+ [ SAS token] ( ../../../storage/common/storage-dotnet-shared-access-signature-part-1.md ) in the URL.
217
+ You could also implement
214
218
[ service endpoint] ( ../../../storage/common/storage-network-security.md#grant-access-from-a-virtual-network )
215
219
for machines in a private network, although this configuration applies only to accessing the package
216
220
and not communicating with the service.
@@ -335,7 +339,8 @@ files.
335
339
336
340
If you would like to use this command to scaffold a custom policy project, you can make changes to
337
341
these files. An example would be modifying the 'If' section to evaluate whether a specific Tag is
338
- present for machines. For details on creating policies, see [ Programmatically create policies] ( ./programmatically-create.md ) .
342
+ present for machines. For details on creating policies, see
343
+ [ Programmatically create policies] ( ./programmatically-create.md ) .
339
344
340
345
### Using parameters in custom Guest Configuration policies
341
346
0 commit comments