Skip to content

Commit c1f69bb

Browse files
Rev version to 1.0.3
Update Readme
1 parent c672e76 commit c1f69bb

3 files changed

Lines changed: 64 additions & 2 deletions

File tree

README.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,3 +271,64 @@ PARAMETERS
271271
PS C:\>Convert-WIM2VHDX -Path c:\windowsServer.vhdx -WimPath d:\Source\install.wim -index 3
272272
-Size 40GB -force
273273
```
274+
275+
```
276+
NAME
277+
New-UnattendXml
278+
279+
SYNOPSIS
280+
Create a new basic Unattend.xml
281+
282+
283+
SYNTAX
284+
New-UnattendXml [-AdminPassword] <String> [-Path <String>] [-LogonCount <Int32>] [-ScriptPath <String>]
285+
[-TimeZone <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
286+
287+
288+
DESCRIPTION
289+
Creates a new Unattend.xml and sets the admin password, Skips any prompts, logs in a set number of times
290+
(default 0) and starts a powershell script (default c:\pstemp\firstrun.ps1).
291+
If no Path is provided a the file will be created in a temp folder and the path returned.
292+
293+
294+
PARAMETERS
295+
-AdminPassword <String>
296+
The password to have unattnd.xml set the local Administrator to
297+
298+
-Path <String>
299+
Output Path
300+
301+
-LogonCount <Int32>
302+
Number of times that the local Administrator account should automaticaly login (default 1)
303+
304+
-ScriptPath <String>
305+
Script to run on autologin (default: %SystemDrive%\PSTemp\FirstRun.ps1 )
306+
307+
-TimeZone <String>
308+
set new machine to this timezone (default Central Standard Time)
309+
310+
-WhatIf [<SwitchParameter>]
311+
312+
-Confirm [<SwitchParameter>]
313+
314+
<CommonParameters>
315+
This cmdlet supports the common parameters: Verbose, Debug,
316+
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
317+
OutBuffer, PipelineVariable, and OutVariable. For more information, see
318+
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
319+
320+
-------------------------- EXAMPLE 1 --------------------------
321+
322+
PS C:\>New-UnattendXml -AdminPassword 'P@ssword' -logonCount 1
323+
324+
325+
326+
327+
328+
329+
-------------------------- EXAMPLE 2 --------------------------
330+
331+
PS C:\>New-UnattendXml -Path c:\temp\Unattent.xml -AdminPassword 'P@ssword' -logonCount 100 -ScriptPath
332+
c:\pstemp\firstrun.ps1
333+
```
334+

WindowsImageTools/WindowsImageTools.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
RootModule = '.\WindowsImageTools.psm1'
1313

1414
# Version number of this module.
15-
ModuleVersion = '1.0.2'
15+
ModuleVersion = '1.0.3'
1616

1717
# ID used to uniquely identify this module
1818
GUID = '6210674e-8cfa-4f61-a2fb-c54fd7ffcba1'
@@ -66,7 +66,7 @@ Description = 'Tools for creating bootable virtual disks from an ISO or WIM'
6666
# NestedModules = @()
6767

6868
# Functions to export from this module
69-
FunctionsToExport = '*VHD*'
69+
FunctionsToExport = '*VHD*', 'New-UnattendXml'
7070

7171
# Cmdlets to export from this module
7272
CmdletsToExport = '*'

WindowsImageTools/WindowsImageTools.psm1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ if (-not ($VHDCmdlets))
2727
. $PSScriptRoot\Functions\Convert-Wim2VHD.ps1
2828
. $PSScriptRoot\Functions\Initialize-VHDPartition.ps1
2929
. $PSScriptRoot\Functions\Set-VHDPartition.ps1
30+
. $PSScriptRoot\Functions\New-Unattend.ps1

0 commit comments

Comments
 (0)