Skip to content

Commit ba8a972

Browse files
author
PSAppDeployToolkit Action Workflow
committed
Commit of document changes from PSAppDeployToolkit/PSAppDeployToolkit@42c8e0a
1 parent 9be05a8 commit ba8a972

1 file changed

Lines changed: 46 additions & 14 deletions

File tree

‎docs/reference/functions/New-ADTTemplate.mdx‎

Lines changed: 46 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Creates a new folder containing a template front end and module folder, ready to
1414
```powershell
1515
New-ADTTemplate [[-Destination] <String>] [[-Name] <String>] [[-Version] <Int32>] [[-LauncherName] <String>]
1616
[[-ExcludeContent] <String[]>] [[-SessionProperties] <IDictionary>] [[-Config] <IDictionary>]
17-
[[-PreInstallScriptBlock] <ScriptBlock>] [[-InstallScriptBlock] <ScriptBlock>]
17+
[[-Strings] <IDictionary>] [[-PreInstallScriptBlock] <ScriptBlock>] [[-InstallScriptBlock] <ScriptBlock>]
1818
[[-PostInstallScriptBlock] <ScriptBlock>] [[-PreUninstallScriptBlock] <ScriptBlock>]
1919
[[-UninstallScriptBlock] <ScriptBlock>] [[-PostUninstallScriptBlock] <ScriptBlock>]
2020
[[-PreRepairScriptBlock] <ScriptBlock>] [[-RepairScriptBlock] <ScriptBlock>]
@@ -87,6 +87,14 @@ Creates a new v4 template with custom icons copied to Assets, with config.psd1 u
8787

8888
### EXAMPLE 8
8989

90+
```powershell
91+
New-ADTTemplate -Destination 'C:\Temp' -Strings @{ en = @{ BalloonTip = @{ Start = @{ Install = 'Contoso App installation started.' } } }; fr = @{ BalloonTip = @{ Start = @{ Install = 'Contoso App : installation en cours.' } } } }
92+
```
93+
94+
Creates a new v4 template with the English and French balloon tip text for the start of an installation overridden.
95+
96+
### EXAMPLE 9
97+
9098
```powershell
9199
New-ADTTemplate -Destination 'C:\Temp' -SessionProperties @{ AppVendor = 'Contoso'; AppName = 'MyApp'; AppVersion = '6.7' } -Files 'C:\Installers\Setup.msi' -InstallScriptBlock { Start-ADTMsiProcess -Action Install -FilePath 'Setup.msi' } -UninstallScriptBlock { Start-ADTMsiProcess -Action Uninstall -FilePath 'Setup.msi' }
92100
```
@@ -167,7 +175,7 @@ Accept wildcard characters: False
167175
Specifies one or more optional content categories to omit from the generated template.
168176
Valid values are Assets, Config, Extensions, Files, Module, Strings and SupportFiles.
169177
All content is included by default.
170-
You cannot exclude Files, SupportFiles or Config if specifying those items as separate parameters.
178+
You cannot exclude Files, SupportFiles, Config or Strings if specifying those items as separate parameters.
171179
You can exclude Assets while specifying -Assets to omit the default assets.
172180
Excluding Module omits the bundled PSAppDeployToolkit module for deployments that provide it externally.
173181
@@ -221,6 +229,30 @@ Accept pipeline input: False
221229
Accept wildcard characters: False
222230
```
223231
232+
### -Strings
233+
234+
A dictionary of language codes to key-value pairs to override or add to the generated strings.psd1 files.
235+
Each top-level key must be a language code (e.g.
236+
en, fr, pt-BR), where en targets Strings\strings.psd1 and every other language targets Strings&lt;language&gt;\strings.psd1.
237+
A language that the module does not ship is created from a copy of the English string table with the supplied values applied on top.
238+
The value for each language must mirror the string table's nested hashtable layout (e.g.
239+
@\{ en = @\{ BalloonTip = @\{ Start = @\{ Install = 'Install has started.' \} \} \} \}).
240+
Language codes and keys are matched case-insensitively; specifying the same language or key more than once with differing case is an error.
241+
Existing keys are overridden in place.
242+
New keys that do not exist in the default string table are appended at the end of the relevant hashtable level.
243+
244+
```yaml
245+
Type: IDictionary
246+
Parameter Sets: (All)
247+
Aliases:
248+
249+
Required: False
250+
Position: 8
251+
Default value: None
252+
Accept pipeline input: False
253+
Accept wildcard characters: False
254+
```
255+
224256
### -PreInstallScriptBlock
225257
226258
A ScriptBlock whose content will replace the Pre-Install phase of the Install-ADTDeployment function in the generated Invoke-AppDeployToolkit.ps1.
@@ -232,7 +264,7 @@ Parameter Sets: (All)
232264
Aliases:
233265

234266
Required: False
235-
Position: 8
267+
Position: 9
236268
Default value: None
237269
Accept pipeline input: False
238270
Accept wildcard characters: False
@@ -249,7 +281,7 @@ Parameter Sets: (All)
249281
Aliases:
250282

251283
Required: False
252-
Position: 9
284+
Position: 10
253285
Default value: None
254286
Accept pipeline input: False
255287
Accept wildcard characters: False
@@ -266,7 +298,7 @@ Parameter Sets: (All)
266298
Aliases:
267299

268300
Required: False
269-
Position: 10
301+
Position: 11
270302
Default value: None
271303
Accept pipeline input: False
272304
Accept wildcard characters: False
@@ -283,7 +315,7 @@ Parameter Sets: (All)
283315
Aliases:
284316

285317
Required: False
286-
Position: 11
318+
Position: 12
287319
Default value: None
288320
Accept pipeline input: False
289321
Accept wildcard characters: False
@@ -300,7 +332,7 @@ Parameter Sets: (All)
300332
Aliases:
301333

302334
Required: False
303-
Position: 12
335+
Position: 13
304336
Default value: None
305337
Accept pipeline input: False
306338
Accept wildcard characters: False
@@ -317,7 +349,7 @@ Parameter Sets: (All)
317349
Aliases:
318350

319351
Required: False
320-
Position: 13
352+
Position: 14
321353
Default value: None
322354
Accept pipeline input: False
323355
Accept wildcard characters: False
@@ -334,7 +366,7 @@ Parameter Sets: (All)
334366
Aliases:
335367

336368
Required: False
337-
Position: 14
369+
Position: 15
338370
Default value: None
339371
Accept pipeline input: False
340372
Accept wildcard characters: False
@@ -351,7 +383,7 @@ Parameter Sets: (All)
351383
Aliases:
352384

353385
Required: False
354-
Position: 15
386+
Position: 16
355387
Default value: None
356388
Accept pipeline input: False
357389
Accept wildcard characters: False
@@ -368,7 +400,7 @@ Parameter Sets: (All)
368400
Aliases:
369401

370402
Required: False
371-
Position: 16
403+
Position: 17
372404
Default value: None
373405
Accept pipeline input: False
374406
Accept wildcard characters: False
@@ -386,7 +418,7 @@ Parameter Sets: (All)
386418
Aliases:
387419

388420
Required: False
389-
Position: 17
421+
Position: 18
390422
Default value: None
391423
Accept pipeline input: False
392424
Accept wildcard characters: True
@@ -403,7 +435,7 @@ Parameter Sets: (All)
403435
Aliases:
404436

405437
Required: False
406-
Position: 18
438+
Position: 19
407439
Default value: None
408440
Accept pipeline input: False
409441
Accept wildcard characters: True
@@ -420,7 +452,7 @@ Parameter Sets: (All)
420452
Aliases:
421453

422454
Required: False
423-
Position: 19
455+
Position: 20
424456
Default value: None
425457
Accept pipeline input: False
426458
Accept wildcard characters: True

0 commit comments

Comments
 (0)