@@ -201,13 +201,12 @@ Test-GuestConfigurationPackage `
201
201
-Path ./AuditFilePathExists.zip
202
202
```
203
203
204
- > [ !NOTE]
205
- > The cmdlet also supports input from the PowerShell pipeline. Pipe the output of
206
- > ` New-GuestConfigurationPackage ` cmdlet to the ` Test-GuestConfigurationPackage ` cmdlet.
207
- >
208
- > ``` azurepowershell-interactive
209
- > New-GuestConfigurationPackage -Name AuditFilePathExists -Configuration ./Config/AuditFilePathExists.mof -ChefProfilePath './' | Test-GuestConfigurationPackage
210
- > ```
204
+ The cmdlet also supports input from the PowerShell pipeline. Pipe the output of
205
+ ` New-GuestConfigurationPackage ` cmdlet to the ` Test-GuestConfigurationPackage ` cmdlet.
206
+
207
+ ``` azurepowershell-interactive
208
+ New-GuestConfigurationPackage -Name AuditFilePathExists -Configuration ./Config/AuditFilePathExists.mof -ChefProfilePath './' | Test-GuestConfigurationPackage
209
+ ```
211
210
212
211
The next step is to publish the file to blob storage. The script below contains a function you can use to automate this task. The commands used in the ` publish ` function require the ` Az.Storage ` module.
213
212
@@ -310,18 +309,17 @@ Publish-GuestConfigurationPolicy `
310
309
-Path '.\policyDefinitions'
311
310
```
312
311
313
- > [ !NOTE]
314
- > The ` Publish-GuestConfigurationPolicy ` cmdlet accepts the path from the PowerShell pipeline. This
315
- > feature means you can create the policy files and publish them in a single set of piped commands.
316
- >
317
- > ``` azurepowershell-interactive
318
- > New-GuestConfigurationPolicy `
319
- > -ContentUri 'https://storageaccountname.blob.core.windows.net/packages/AuditFilePathExists.zip?st=2019-07-01T00%3A00%3A00Z&se=2024-07-01T00%3A00%3A00Z&sp=rl&sv=2018-03-28&sr=b&sig=JdUf4nOCo8fvuflOoX%2FnGo4sXqVfP5BYXHzTl3%2BovJo%3D' `
320
- > -DisplayName 'Audit Linux file path.' `
321
- > -Description 'Audit that a file path exists on a Linux machine.' `
322
- > -Path './policies' `
323
- > | Publish-GuestConfigurationPolicy
324
- > ```
312
+ The ` Publish-GuestConfigurationPolicy ` cmdlet accepts the path from the PowerShell pipeline. This
313
+ feature means you can create the policy files and publish them in a single set of piped commands.
314
+
315
+ ``` azurepowershell-interactive
316
+ New-GuestConfigurationPolicy `
317
+ -ContentUri 'https://storageaccountname.blob.core.windows.net/packages/AuditFilePathExists.zip?st=2019-07-01T00%3A00%3A00Z&se=2024-07-01T00%3A00%3A00Z&sp=rl&sv=2018-03-28&sr=b&sig=JdUf4nOCo8fvuflOoX%2FnGo4sXqVfP5BYXHzTl3%2BovJo%3D' `
318
+ -DisplayName 'Audit Linux file path.' `
319
+ -Description 'Audit that a file path exists on a Linux machine.' `
320
+ -Path './policies' `
321
+ | Publish-GuestConfigurationPolicy
322
+ ```
325
323
326
324
With the policy created in Azure, the last step is to assign the
327
325
initiative. See how to assign the initiative with [ Portal] ( ../assign-policy-portal.md ) , [ Azure CLI] ( ../assign-policy-azurecli.md ) ,
0 commit comments