Skip to content

Commit 9d0c0d6

Browse files
Merge pull request #251823 from ericd-mst-github/erd-aib-template-updates
added runAsSystem parameter explanation
2 parents 0afe9ca + 36e5990 commit 9d0c0d6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

articles/virtual-machines/linux/image-builder-json.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to create a Bicep file or ARM template JSON template to u
44
author: kof-f
55
ms.author: kofiforson
66
ms.reviewer: erd
7-
ms.date: 07/17/2023
7+
ms.date: 09/18/2023
88
ms.topic: reference
99
ms.service: virtual-machines
1010
ms.subservice: image-builder
@@ -575,14 +575,16 @@ The `PowerShell` customizer supports running PowerShell scripts and inline comma
575575
"name": "<name>",
576576
"scriptUri": "<path to script>",
577577
"runElevated": <true false>,
578+
"runAsSystem": <true false>,
578579
"sha256Checksum": "<sha256 checksum>"
579580
},
580581
{
581582
"type": "PowerShell",
582583
"name": "<name>",
583584
"inline": "<PowerShell syntax to run>",
584585
"validExitCodes": [<exit code>],
585-
"runElevated": <true or false>
586+
"runElevated": <true or false>,
587+
"runAsSystem": <true or false>
586588
}
587589
]
588590
```
@@ -596,6 +598,7 @@ customize: [
596598
name: '<name>'
597599
scriptUri: '<path to script>'
598600
runElevated: <true false>
601+
runAsSystem: <true false>
599602
sha256Checksum: '<sha256 checksum>'
600603
}
601604
{
@@ -604,6 +607,7 @@ customize: [
604607
inline: '<PowerShell syntax to run>'
605608
validExitCodes: [<exit code>]
606609
runElevated: <true or false>
610+
runAsSystem: <true or false>
607611
}
608612
]
609613
```
@@ -617,6 +621,7 @@ Customize properties:
617621
- **inline** – Inline commands to be run, separated by commas.
618622
- **validExitCodes** – Optional, valid codes that can be returned from the script/inline command. The property avoids reported failure of the script/inline command.
619623
- **runElevated** – Optional, boolean, support for running commands and scripts with elevated permissions.
624+
- **runAsSystem** - Optional, boolean, determines whether the PowerShell script should be run as the System user.
620625
- **sha256Checksum** - generate the SHA256 checksum of the file locally, update the checksum value to lowercase, and Image Builder will validate the checksum during the deployment of the image template.
621626

622627
To generate the sha256Checksum, use the [Get-FileHash](/powershell/module/microsoft.powershell.utility/get-filehash) cmdlet in PowerShell.

0 commit comments

Comments
 (0)