diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c6b5a95b..65ba70e17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,49 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). --- +## [26.7.6.1] - 2026-07-06 + +### Changed + +- **`Invoke-OSDCloud` analytics instrumentation** (`OSD/Public/OSDCloud.ps1`) — Added deployment analytics event handling in the launch validation flow, including hashed device UUID generation for privacy-safe correlation and expanded event property collection for deployment telemetry. +- **`OSD.psd1`** — Bumped module version to `26.7.6.1` and updated generated-on date to `2026-07-06`. + +--- + +## [26.6.25.1] - 2026-06-25 + +### Added + +- **Operating system catalog retrieval functions** — Added `Get-MCTOperatingSystems` and `Get-MCTOperatingSystemsOSD` to improve catalog data retrieval workflows used by OSDCloud. + +### Changed + +- **Operating system retrieval refactor** — Renamed and reorganized internal retrieval functions (`Get-CoreOperatingSystems`, `Get-OSDCoreOperatingSystems`) and updated `Get-OSDCloudOperatingSystems` to use the newer flow while removing deprecated function paths. +- **`OSD.psd1`** — Updated exports for operating system retrieval function changes and bumped module version to `26.6.25.1`; updated generated-on date to `6/25/2026`. +- **Power and index function documentation** — Enhanced comment-based help for: + - `Get-PowerSettingSleepAfter` + - `Get-PowerSettingTurnMonitorOffAfter` + - `Get-OSDCloudOperatingSystemsIndexMap` + - `Get-OSDCloudOperatingSystemsIndexes` +- **Driver pack and cache content** — Added Panasonic driver pack catalog coverage and refreshed associated operating system catalog/cache artifacts. + +### Removed + +- **Legacy v2 driver pack docs and scripts** — Removed outdated `Get-OSDCatalogDriverPack` and `Get-OSDCatalogDriverPacks` documentation and v2 public functions. +- **Archived operating system cache artifacts** — Removed stale `cache/archive-operatingsystems/operatingsystems.json` and `cache/archive-operatingsystems/operatingsystems.xml`. + +--- + +## [26.6.23.1] - 2026-06-23 + +### Changed + +- **Windows 11 25H2 operating system catalogs** — Updated the published 25H2 media catalog to build `26200.8653` for release consumption. +- **`OSD.json`** — Refreshed Windows 11 25H2 release selections (x64 and ARM64) used by OSDCloud workflows. +- **`OSD.psd1`** — Bumped module version to `26.6.23.1`; updated generated-on date to `6/23/2026`. + +--- + ## [26.4.23.1] - 2026-04-23 ### Changed diff --git a/Docs/Get-FeatureUpdate.md b/Docs/Get-FeatureUpdate.md index 3aa6e08f9..320d42a48 100644 --- a/Docs/Get-FeatureUpdate.md +++ b/Docs/Get-FeatureUpdate.md @@ -47,7 +47,7 @@ Aliases: Name Required: False Position: Named -Default value: Windows 11 24H2 x64 +Default value: Windows 11 25H2 x64 Accept pipeline input: False Accept wildcard characters: False ``` @@ -79,7 +79,7 @@ Aliases: Build, OSBuild, ReleaseID Required: False Position: Named -Default value: 24H2 +Default value: 25H2 Accept pipeline input: False Accept wildcard characters: False ``` diff --git a/Docs/Get-HPTPMDetermine.md b/Docs/Get-HPTPMDetermine.md index ca1fce301..a4ea3f68c 100644 --- a/Docs/Get-HPTPMDetermine.md +++ b/Docs/Get-HPTPMDetermine.md @@ -8,35 +8,57 @@ schema: 2.0.0 # Get-HPTPMDetermine ## SYNOPSIS -{{ Fill in the Synopsis }} +Determines which HP TPM firmware update package is required for the current device. ## SYNTAX ``` -Get-HPTPMDetermine +Get-HPTPMDetermine [-ProgressAction ] [] ``` ## DESCRIPTION -{{ Fill in the Description }} +Queries the TPM via WMI (win32_tpm) to identify the manufacturer and firmware version. +For Infineon (IFX) TPMs, compares the firmware version against known vulnerable version +ranges and returns the appropriate HP softpaq package ID. +Returns 'SP87753' for firmware requiring an older update package, 'SP94937' for firmware +requiring the newer package, or $false if no update is needed or the TPM is not Infineon. ## EXAMPLES -### Example 1 -```powershell -PS C:\> {{ Add example code here }} +### EXAMPLE 1 +``` +$Package = Get-HPTPMDetermine +Returns 'SP87753', 'SP94937', or $false. ``` - -{{ Add example description here }} ## PARAMETERS -## INPUTS +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga -### None +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS ## OUTPUTS -### System.Object +### System.String +### Returns 'SP87753', 'SP94937', or $false. ## NOTES +Requires access to the root\cimv2\security\MicrosoftTPM WMI namespace. +Must be run with administrator privileges. ## RELATED LINKS diff --git a/Docs/Get-MsUpCat.md b/Docs/Get-MsUpCat.md index a3fa74419..f4daf5c2a 100644 --- a/Docs/Get-MsUpCat.md +++ b/Docs/Get-MsUpCat.md @@ -8,96 +8,319 @@ schema: 2.0.0 # Get-MsUpCat ## SYNOPSIS -Query catalog.update.micrsosoft.com for available updates. +{{ Fill in the Synopsis }} ## SYNTAX +### Search (Default) ``` -Get-MsUpCat [-Search] [[-SortBy] ] [-Descending] [-Strict] [-IncludeFileNames] [-AllPages] +Get-MsUpCat [-Architecture ] [-Descending] [-ExcludeFramework] [-FromDate ] + [-Format ] [-GetFramework] [-AllPages] [-IncludeDynamic] [-IncludeFileNames] [-IncludePreview] + [-LastDays ] [-MaxSize ] [-MinSize ] [-Properties ] [-Search] + [-SizeUnit ] [-SortBy ] [-Strict] [-ToDate ] [-UpdateType ] [-ProgressAction ] [] ``` +### OS +``` +Get-MsUpCat [-Architecture ] [-Descending] [-ExcludeFramework] [-FromDate ] + [-Format ] [-GetFramework] [-AllPages] [-IncludeDynamic] [-IncludeFileNames] [-IncludePreview] + [-LastDays ] [-MaxSize ] [-MinSize ] -OperatingSystem [-Properties ] + [-SizeUnit ] [-SortBy ] [-Strict] [-ToDate ] [-UpdateType ] + [-Version ] [-ProgressAction ] [] +``` + ## DESCRIPTION -Given that there is currently no public API available for the catalog.update.micrsosoft.com site, this -command makes HTTP requests to the site and parses the returned HTML for the required data. +{{ Fill in the Description }} ## EXAMPLES -### EXAMPLE 1 +### Example 1 +```powershell +PS C:\> {{ Add example code here }} ``` -Get-MSCatalogUpdate -Search "Cumulative for Windows Server, version 1903" + +{{ Add example description here }} + +## PARAMETERS + +### -AllPages +Search through all available pages + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False ``` -### EXAMPLE 2 +### -Architecture +Filter updates by architecture + +```yaml +Type: String +Parameter Sets: (All) +Aliases: +Accepted values: All, x64, x86, arm64 + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False ``` -Get-MSCatalogUpdate -Search "Cumulative for Windows Server, version 1903" -SortBy "Title" -Descending + +### -Descending +Sort in descending order + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False ``` -### EXAMPLE 3 +### -ExcludeFramework +Exclude .NET Framework updates + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False ``` -Get-MSCatalogUpdate -Search "Cumulative for Windows Server, version 1903" -Strict + +### -Format +Format for the results + +```yaml +Type: String +Parameter Sets: (All) +Aliases: +Accepted values: Default, CSV, JSON, XML + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False ``` -### EXAMPLE 4 +### -FromDate +Filter updates from this date + +```yaml +Type: DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False ``` -Get-MSCatalogUpdate -Search "Cumulative for Windows Server, version 1903" -IncludeFileNames + +### -GetFramework +Only show .NET Framework updates + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False ``` -### EXAMPLE 5 +### -IncludeDynamic +Include dynamic updates + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False ``` -Get-MSCatalogUpdate -Search "Cumulative for Windows Server, version 1903" -AllPages + +### -IncludeFileNames +Include file names in the results + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False ``` -## PARAMETERS +### -IncludePreview +Include preview updates -### -Search -Specify a string to search for. +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LastDays +Filter updates from the last N days + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaxSize +Filter updates with maximum size + +```yaml +Type: Double +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MinSize +Filter updates with minimum size + +```yaml +Type: Double +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OperatingSystem +Operating System to search updates for ```yaml Type: String +Parameter Sets: OS +Aliases: +Accepted values: Windows 11, Windows 10, Windows Server + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Properties +Select specific properties to display + +```yaml +Type: String[] Parameter Sets: (All) Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Search +Search query for Microsoft Update Catalog + +```yaml +Type: String +Parameter Sets: Search +Aliases: + Required: True -Position: 1 +Position: 0 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -SortBy -Specify a field to sort the results by. -The default sort is by LastUpdated and in descending order. +### -SizeUnit +Unit for size filtering (MB or GB) ```yaml Type: String Parameter Sets: (All) Aliases: +Accepted values: MB, GB Required: False -Position: 2 +Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Descending -Switch the sort order to descending. +### -SortBy +Sort results by specified field ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) Aliases: +Accepted values: Date, Size, Title, Classification, Product Required: False Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -Strict -Force a Search paramater with multiple words to be treated as a single string. +Use strict search with exact phrase matching ```yaml Type: SwitchParameter @@ -106,43 +329,53 @@ Aliases: Required: False Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -IncludeFileNames -Include the filenames for the files as they would be downloaded from catalog.update.micrsosoft.com. -This option will cause an extra web request for each update included in the results. -It is best to only -use this option with a very narrow search term. +### -ToDate +Filter updates until this date ```yaml -Type: SwitchParameter +Type: DateTime Parameter Sets: (All) Aliases: Required: False Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -AllPages -By default the Get-MSCatalogUpdate command returns the first page of results from catalog.update.micrsosoft.com, which is -limited to 25 updates. -If you specify this switch the command will instead return all pages of search results. -This can result in a significant increase in the number of HTTP requests to the catalog.update.micrsosoft.com endpoint. +### -UpdateType +Filter by update type ```yaml -Type: SwitchParameter +Type: String[] Parameter Sets: (All) Aliases: +Accepted values: Security Updates, Updates, Critical Updates, Feature Packs, Service Packs, Tools, Update Rollups, Cumulative Updates, Security Quality Updates, Driver Updates + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Version +OS Version/Release (e.g., 22H2, 21H2, 23H2) + +```yaml +Type: String +Parameter Sets: OS +Aliases: Required: False Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -167,8 +400,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### None + ## OUTPUTS +### System.Object ## NOTES ## RELATED LINKS diff --git a/Docs/Get-OSDCatalogDriverPack.md b/Docs/Get-OSDCatalogDriverPack.md deleted file mode 100644 index 5eba502ef..000000000 --- a/Docs/Get-OSDCatalogDriverPack.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -external help file: OSD-help.xml -Module Name: OSD -online version: https://github.com/OSDeploy/OSD/tree/master/Docs -schema: 2.0.0 ---- - -# Get-OSDCatalogDriverPack - -## SYNOPSIS -Gets the OSDCloud DriverPack for the current or specified computer model - -## SYNTAX - -``` -Get-OSDCatalogDriverPack [[-Product] ] [[-OSVersion] ] [[-OSReleaseID] ] - [-ProgressAction ] [] -``` - -## DESCRIPTION -Gets the OSDCloud DriverPack for the current or specified computer model - -## EXAMPLES - -### Example 1 -```powershell -PS C:\> {{ Add example code here }} -``` - -{{ Add example description here }} - -## PARAMETERS - -### -Product -Product is determined automatically by Get-MyComputerProduct - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 1 -Default value: (Get-MyComputerProduct) -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OSVersion -{{ Fill OSVersion Description }} - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OSReleaseID -{{ Fill OSReleaseID Description }} - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProgressAction -{{ Fill ProgressAction Description }} - -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: proga - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -## NOTES - -## RELATED LINKS - -[https://github.com/OSDeploy/OSD/tree/master/Docs](https://github.com/OSDeploy/OSD/tree/master/Docs) - diff --git a/Docs/Get-OSDCatalogDriverPacks.md b/Docs/Get-OSDCatalogDriverPacks.md deleted file mode 100644 index 218fafad2..000000000 --- a/Docs/Get-OSDCatalogDriverPacks.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -external help file: OSD-help.xml -Module Name: OSD -online version: https://github.com/OSDeploy/OSD/tree/master/Docs -schema: 2.0.0 ---- - -# Get-OSDCatalogDriverPacks - -## SYNOPSIS -Returns the DriverPacks used by OSDCloud - -## SYNTAX - -``` -Get-OSDCatalogDriverPacks [-ProgressAction ] [] -``` - -## DESCRIPTION -Returns the DriverPacks used by OSDCloud - -## EXAMPLES - -### Example 1 -```powershell -PS C:\> {{ Add example code here }} -``` - -{{ Add example description here }} - -## PARAMETERS - -### -ProgressAction -{{ Fill ProgressAction Description }} - -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: proga - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -## NOTES - -## RELATED LINKS - -[https://github.com/OSDeploy/OSD/tree/master/Docs](https://github.com/OSDeploy/OSD/tree/master/Docs) - diff --git a/Docs/Get-OSDCatalogOperatingSystems.md b/Docs/Get-OSDCatalogOperatingSystems.md deleted file mode 100644 index e2516f959..000000000 --- a/Docs/Get-OSDCatalogOperatingSystems.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -external help file: OSD-help.xml -Module Name: OSD -online version: https://github.com/OSDeploy/OSD/tree/master/Docs -schema: 2.0.0 ---- - -# Get-OSDCatalogOperatingSystems - -## SYNOPSIS -Returns the OSD Operating Systems Catalog - -## SYNTAX - -``` -Get-OSDCatalogOperatingSystems [-ProgressAction ] [] -``` - -## DESCRIPTION -Returns the OSD Operating Systems Catalog - -## EXAMPLES - -### Example 1 -```powershell -PS C:\> {{ Add example code here }} -``` - -{{ Add example description here }} - -## PARAMETERS - -### -ProgressAction -{{ Fill ProgressAction Description }} - -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: proga - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -## NOTES - -## RELATED LINKS - -[https://github.com/OSDeploy/OSD/tree/master/Docs](https://github.com/OSDeploy/OSD/tree/master/Docs) - diff --git a/Docs/Get-OSDCloudOperatingSystems.md b/Docs/Get-OSDCloudOperatingSystems.md index 958bc397b..42e671982 100644 --- a/Docs/Get-OSDCloudOperatingSystems.md +++ b/Docs/Get-OSDCloudOperatingSystems.md @@ -8,7 +8,7 @@ schema: 2.0.0 # Get-OSDCloudOperatingSystems ## SYNOPSIS -Returns the Operating Systems used by OSDCloud +Gets OSDCloud operating system entries for a specific architecture. ## SYNTAX @@ -17,21 +17,33 @@ Get-OSDCloudOperatingSystems [[-OSArch] ] [-ProgressAction {{ Add example code here }} +### EXAMPLE 1 +``` +Get-OSDCloudOperatingSystems +``` + +Returns x64 operating system entries. + +### EXAMPLE 2 +``` +Get-OSDCloudOperatingSystems -OSArch arm64 ``` -{{ Add example description here }} +Returns ARM64 operating system entries. ## PARAMETERS ### -OSArch -{{ Fill OSArch Description }} +Specifies the operating system architecture to return. + +Valid values: +- x64 +- arm64 ```yaml Type: String @@ -65,9 +77,16 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### None. You cannot pipe input to this function. ## OUTPUTS +### PSCustomObject +### One or more operating system entries returned by Get-OSDCoreOperatingSystems. ## NOTES 25.2.17 Removed unnecessary Default ParameterSet Name +26.6.24 Refined comment-based help text ## RELATED LINKS + +[https://github.com/OSDeploy/OSD/tree/master/Docs](https://github.com/OSDeploy/OSD/tree/master/Docs) + diff --git a/Docs/Get-OSDCloudOperatingSystemsIndexMap.md b/Docs/Get-OSDCloudOperatingSystemsIndexMap.md index 7298f5069..b4116001d 100644 --- a/Docs/Get-OSDCloudOperatingSystemsIndexMap.md +++ b/Docs/Get-OSDCloudOperatingSystemsIndexMap.md @@ -8,7 +8,7 @@ schema: 2.0.0 # Get-OSDCloudOperatingSystemsIndexMap ## SYNOPSIS -Returns the Operating System Indexes used by OSDCloud +Returns OSDCloud operating system index map entries by architecture. ## SYNTAX @@ -18,22 +18,30 @@ Get-OSDCloudOperatingSystemsIndexMap [-OSArch ] [-ProgressAction {{ Add example code here }} +### EXAMPLE 1 +``` +Get-OSDCloudOperatingSystemsIndexMap +``` + +Returns x64 index map entries from cache. + +### EXAMPLE 2 +``` +Get-OSDCloudOperatingSystemsIndexMap -OSArch ARM64 ``` -{{ Add example description here }} +Returns ARM64 index map entries from cache. ## PARAMETERS ### -OSArch -Specifies the OS architecture to filter results. -Valid values are 'x64' and 'ARM64'. +Specifies the operating system architecture. +Valid values are x64 and ARM64. ```yaml Type: String @@ -69,6 +77,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS +### PSCustomObject ## NOTES ## RELATED LINKS diff --git a/Docs/Get-OSDCloudOperatingSystemsIndexes.md b/Docs/Get-OSDCloudOperatingSystemsIndexes.md index b6dd1e412..e89fdfa5d 100644 --- a/Docs/Get-OSDCloudOperatingSystemsIndexes.md +++ b/Docs/Get-OSDCloudOperatingSystemsIndexes.md @@ -8,7 +8,7 @@ schema: 2.0.0 # Get-OSDCloudOperatingSystemsIndexes ## SYNOPSIS -Returns the Operating Systems used by OSDCloud +Returns OSDCloud operating system index entries by architecture. ## SYNTAX @@ -18,21 +18,30 @@ Get-OSDCloudOperatingSystemsIndexes [-OSArch ] [-ProgressAction {{ Add example code here }} +### EXAMPLE 1 +``` +Get-OSDCloudOperatingSystemsIndexes +``` + +Returns x64 operating system index entries from cache. + +### EXAMPLE 2 +``` +Get-OSDCloudOperatingSystemsIndexes -OSArch ARM64 ``` -{{ Add example description here }} +Returns ARM64 operating system index entries from cache. ## PARAMETERS ### -OSArch -{{ Fill OSArch Description }} +Specifies the operating system architecture. +Valid values are x64 and ARM64. ```yaml Type: String @@ -68,6 +77,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS +### PSCustomObject ## NOTES ## RELATED LINKS diff --git a/Docs/Get-PowerSettingTurnMonitorOffAfter.md b/Docs/Get-PowerSettingTurnMonitorOffAfter.md index de84320b0..7866e2110 100644 --- a/Docs/Get-PowerSettingTurnMonitorOffAfter.md +++ b/Docs/Get-PowerSettingTurnMonitorOffAfter.md @@ -8,35 +8,54 @@ schema: 2.0.0 # Get-PowerSettingTurnMonitorOffAfter ## SYNOPSIS -{{ Fill in the Synopsis }} +Gets the active power plan monitor-off timeout in minutes. ## SYNTAX ``` -Get-PowerSettingTurnMonitorOffAfter +Get-PowerSettingTurnMonitorOffAfter [-ProgressAction ] [] ``` ## DESCRIPTION -{{ Fill in the Description }} +Returns the "Turn off display after" timeout for the active power plan. +The function reads both AC (plugged in) and DC (battery) values from +power policy data in root\cimv2\power. ## EXAMPLES -### Example 1 -```powershell -PS C:\> {{ Add example code here }} +### EXAMPLE 1 +``` +Get-PowerSettingTurnMonitorOffAfter ``` -{{ Add example description here }} +Returns a PSCustomObject with AC and DC monitor-off timeout values +in minutes. ## PARAMETERS -## INPUTS +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga -### None +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS ## OUTPUTS -### System.Object +### PSCustomObject ## NOTES ## RELATED LINKS diff --git a/Docs/Get-WindowsAdkPaths.md b/Docs/Get-WindowsAdkPaths.md index fe3e92981..580401235 100644 --- a/Docs/Get-WindowsAdkPaths.md +++ b/Docs/Get-WindowsAdkPaths.md @@ -13,7 +13,7 @@ Retrieves the command paths of the Windows Assessment and Deployment Kit (ADK). ## SYNTAX ``` -Get-WindowsAdkPaths [[-Architecture] ] [[-WindowsAdkRoot] ] +Get-WindowsAdkPaths [[-Architecture] ] [[-WindowsAdkRoot] ] [-ProgressAction ] [] ``` @@ -51,8 +51,24 @@ Accept wildcard characters: False Path to the Windows ADK root directory. Typically 'C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit' + \[ValidateScript({ + if (!($_ | Test-Path)) { + throw 'Path does not exist' + } + if (!($_ | Test-Path -PathType Container)) { + throw 'Path must be a directory' + } + if (!(Test-Path "$_\Deployment Tools")) { + throw 'Path does not contain a Deployment Tools directory' + } + if (!(Test-Path "$_\Windows Preinstallation Environment")) { + throw 'Path does not contain a Windows Preinstallation Environment directory' + } + return $true + })\] + ```yaml -Type: FileInfo +Type: Object Parameter Sets: (All) Aliases: AdkRoot diff --git a/Docs/Install-ModuleHPCMSL.md b/Docs/Install-ModuleHPCMSL.md index 9fa5589e4..2f23ef26a 100644 --- a/Docs/Install-ModuleHPCMSL.md +++ b/Docs/Install-ModuleHPCMSL.md @@ -8,7 +8,7 @@ schema: 2.0.0 # Install-ModuleHPCMSL ## SYNOPSIS -{{ Fill in the Synopsis }} +Installs or updates the HP Client Management Script Library (HPCMSL) PowerShell module. ## SYNTAX @@ -17,16 +17,19 @@ Install-ModuleHPCMSL [-ProgressAction ] [] ``` ## DESCRIPTION -{{ Fill in the Description }} +Ensures the HPCMSL module (version 1.8.5) is installed and up to date from the PowerShell Gallery. +If PowerShellGet 2.2.5 or later is not present, it is installed first. +Compares the installed HPCMSL version against the Gallery version and installs if missing or outdated. +Supports both WinPE and full Windows environments. +After installation, the module is imported into the global scope. ## EXAMPLES -### Example 1 -```powershell -PS C:\> {{ Add example code here }} +### EXAMPLE 1 +``` +Install-ModuleHPCMSL +Installs or updates HPCMSL 1.8.5 for all users and imports it into the current session. ``` - -{{ Add example description here }} ## PARAMETERS @@ -50,11 +53,12 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### None - ## OUTPUTS -### System.Object ## NOTES +Requires internet access to reach the PowerShell Gallery. +Must be run with administrator privileges. +Uses the $WindowsPhase variable to detect WinPE vs. +full OS context. ## RELATED LINKS diff --git a/Docs/Invoke-HPTPMDowngrade.md b/Docs/Invoke-HPTPMDowngrade.md index 5793826ad..97ad787d3 100644 --- a/Docs/Invoke-HPTPMDowngrade.md +++ b/Docs/Invoke-HPTPMDowngrade.md @@ -8,7 +8,7 @@ schema: 2.0.0 # Invoke-HPTPMDowngrade ## SYNOPSIS -{{ Fill in the Synopsis }} +Downloads and applies the HP SP94937 softpaq to downgrade a TPM from 2.0 to 1.2. ## SYNTAX @@ -17,21 +17,24 @@ Invoke-HPTPMDowngrade [[-WorkingFolder] ] [-ProgressAction {{ Add example code here }} +### EXAMPLE 1 +``` +Invoke-HPTPMDowngrade +Downloads SP94937 to $env:TEMP\TPM and downgrades the Infineon TPM to spec 1.2. ``` - -{{ Add example description here }} ## PARAMETERS ### -WorkingFolder -{{ Fill WorkingFolder Description }} +The folder path where the softpaq EXE will be downloaded and extracted. +Defaults to $env:TEMP\TPM if not specified. ```yaml Type: Object @@ -39,7 +42,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 0 +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -65,11 +68,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### None - ## OUTPUTS -### System.Object ## NOTES +Requires HPCMSL and the HP BIOS WMI interface (Set-HPBIOSSetting). +Must be run with administrator privileges. +A system reboot is typically required after the firmware change takes effect. ## RELATED LINKS diff --git a/Docs/Invoke-HPTPMDownload.md b/Docs/Invoke-HPTPMDownload.md index 43f83ca91..b2cfc4457 100644 --- a/Docs/Invoke-HPTPMDownload.md +++ b/Docs/Invoke-HPTPMDownload.md @@ -8,7 +8,7 @@ schema: 2.0.0 # Invoke-HPTPMDownload ## SYNOPSIS -{{ Fill in the Synopsis }} +Downloads and extracts the required HP TPM firmware update softpaq using HPCMSL. ## SYNTAX @@ -17,21 +17,32 @@ Invoke-HPTPMDownload [[-WorkingFolder] ] [-ProgressAction {{ Add example code here }} +### EXAMPLE 1 +``` +Invoke-HPTPMDownload +Downloads and extracts the required TPM firmware softpaq to $env:TEMP\TPM. ``` -{{ Add example description here }} +### EXAMPLE 2 +``` +Invoke-HPTPMDownload -WorkingFolder 'C:\Temp\TPMWork' +Downloads and extracts the required TPM firmware softpaq to C:\Temp\TPMWork. +``` ## PARAMETERS ### -WorkingFolder -{{ Fill WorkingFolder Description }} +The folder path where the softpaq EXE will be downloaded and extracted. +Defaults to $env:TEMP\TPM if not specified. ```yaml Type: Object @@ -39,7 +50,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 0 +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -65,11 +76,12 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### None - ## OUTPUTS -### System.Object +### System.String +### Returns the path to the extracted firmware folder. ## NOTES +Requires internet access and the HPCMSL PowerShell module. +Must be run with administrator privileges. ## RELATED LINKS diff --git a/Docs/Invoke-HPTPMEXEDownload.md b/Docs/Invoke-HPTPMEXEDownload.md index 0143442f6..04ce46443 100644 --- a/Docs/Invoke-HPTPMEXEDownload.md +++ b/Docs/Invoke-HPTPMEXEDownload.md @@ -8,35 +8,58 @@ schema: 2.0.0 # Invoke-HPTPMEXEDownload ## SYNOPSIS -{{ Fill in the Synopsis }} +Downloads the required HP TPM firmware EXE to C:\OSDCloud\HP\TPM. ## SYNTAX ``` -Invoke-HPTPMEXEDownload +Invoke-HPTPMEXEDownload [-ProgressAction ] [] ``` ## DESCRIPTION -{{ Fill in the Description }} +Calls Get-HPTPMDetermine to identify the required softpaq, then downloads the firmware +EXE to C:\OSDCloud\HP\TPM. +If the file is already present on a connected OSDCloud USB +drive it is copied locally instead of being downloaded from the internet. +The destination +folder is cleared before each run. +Also disables Virtualization Technology (VTx) in the +BIOS via Set-HPBIOSSetting. ## EXAMPLES -### Example 1 -```powershell -PS C:\> {{ Add example code here }} +### EXAMPLE 1 +``` +Invoke-HPTPMEXEDownload +Determines the required TPM softpaq and downloads (or copies) it to C:\OSDCloud\HP\TPM. ``` - -{{ Add example description here }} ## PARAMETERS -## INPUTS +### -ProgressAction +{{ Fill ProgressAction Description }} -### None +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS ## OUTPUTS -### System.Object ## NOTES +Requires HPCMSL if the firmware file is not already available on an OSDCloud USB drive. +Must be run with administrator privileges. ## RELATED LINKS diff --git a/Docs/Invoke-HPTPMEXEInstall.md b/Docs/Invoke-HPTPMEXEInstall.md index 4832109f1..4219af6cf 100644 --- a/Docs/Invoke-HPTPMEXEInstall.md +++ b/Docs/Invoke-HPTPMEXEInstall.md @@ -8,7 +8,7 @@ schema: 2.0.0 # Invoke-HPTPMEXEInstall ## SYNOPSIS -{{ Fill in the Synopsis }} +Extracts and installs the HP TPM firmware update from C:\OSDCloud\HP\TPM. ## SYNTAX @@ -18,21 +18,31 @@ Invoke-HPTPMEXEInstall [[-path] ] [[-filename] ] [[-spec] {{ Add example code here }} +### EXAMPLE 1 +``` +Invoke-HPTPMEXEInstall +Installs the TPM firmware using default TPMConfig64 arguments. ``` -{{ Add example description here }} +### EXAMPLE 2 +``` +Invoke-HPTPMEXEInstall -spec '1.2' +Installs the TPM firmware targeting the 1.2 specification. +``` ## PARAMETERS -### -WorkingFolder -{{ Fill WorkingFolder Description }} +### -path +Reserved parameter. +Not currently used. ```yaml Type: Object @@ -40,14 +50,14 @@ Parameter Sets: (All) Aliases: Required: False -Position: 4 +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -filename -{{ Fill filename Description }} +Optional firmware binary filename passed to TPMConfig64 via the -f argument. ```yaml Type: Object @@ -55,14 +65,15 @@ Parameter Sets: (All) Aliases: Required: False -Position: 1 +Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -logsuffix -{{ Fill logsuffix Description }} +### -spec +Optional TPM specification version to target (e.g., '1.2' or '2.0'). +Passed to TPMConfig64 via the -a argument. ```yaml Type: Object @@ -76,8 +87,9 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -path -{{ Fill path Description }} +### -logsuffix +Reserved parameter. +Not currently used. ```yaml Type: Object @@ -85,14 +97,15 @@ Parameter Sets: (All) Aliases: Required: False -Position: 0 +Position: 4 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -spec -{{ Fill spec Description }} +### -WorkingFolder +Reserved parameter. +Not currently used. ```yaml Type: Object @@ -100,7 +113,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 2 +Position: 5 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -126,11 +139,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### None - ## OUTPUTS -### System.Object ## NOTES +Run Invoke-HPTPMEXEDownload first to stage the firmware file. +Must be run with administrator privileges. +Exit code 3010 indicates success with a required reboot. ## RELATED LINKS diff --git a/Docs/New-OSDCloudOSWimFile.md b/Docs/New-OSDCloudOSWimFile.md index 108b37dab..81b38d262 100644 --- a/Docs/New-OSDCloudOSWimFile.md +++ b/Docs/New-OSDCloudOSWimFile.md @@ -108,7 +108,7 @@ Accept wildcard characters: False Type: String Parameter Sets: Default Aliases: -Accepted values: Windows 11 24H2 x64, Windows 11 24H2 ARM64, Windows 11 23H2 x64, Windows 11 23H2 ARM64, Windows 11 22H2 x64, Windows 11 21H2 x64, Windows 10 22H2 x64, Windows 10 22H2 ARM64 +Accepted values: Windows 11 25H2 x64, Windows 11 25H2 ARM64, Windows 11 24H2 x64, Windows 11 24H2 ARM64, Windows 11 23H2 x64, Windows 11 23H2 ARM64, Windows 11 22H2 x64, Windows 11 21H2 x64, Windows 10 22H2 x64, Windows 10 22H2 ARM64 Required: False Position: Named diff --git a/Docs/Save-FeatureUpdate.md b/Docs/Save-FeatureUpdate.md index fdaa8fc3f..36e8b0c05 100644 --- a/Docs/Save-FeatureUpdate.md +++ b/Docs/Save-FeatureUpdate.md @@ -64,7 +64,7 @@ Aliases: Name Required: False Position: Named -Default value: Windows 11 24H2 x64 +Default value: Windows 11 25H2 x64 Accept pipeline input: False Accept wildcard characters: False ``` @@ -96,7 +96,7 @@ Aliases: Build, OSBuild, ReleaseID Required: False Position: Named -Default value: 24H2 +Default value: 25H2 Accept pipeline input: False Accept wildcard characters: False ``` diff --git a/Docs/Start-OSDCloud.md b/Docs/Start-OSDCloud.md index 89d902dd0..467e4698a 100644 --- a/Docs/Start-OSDCloud.md +++ b/Docs/Start-OSDCloud.md @@ -1,14 +1,14 @@ --- external help file: OSD-help.xml Module Name: OSD -online version: https://github.com/OSDeploy/OSD/tree/master/Docs +online version: https://www.osdeploy.com/ schema: 2.0.0 --- # Start-OSDCloud ## SYNOPSIS -Starts the OSDCloud Windows 10 or 11 Build Process from the OSD Module or a GitHub Repository +{{ Fill in the Synopsis }} ## SYNTAX @@ -16,26 +16,25 @@ Starts the OSDCloud Windows 10 or 11 Build Process from the OSD Module or a GitH ``` Start-OSDCloud [-Manufacturer ] [-Product ] [-Firmware] [-Restart] [-Shutdown] [-Screenshot] [-SkipAutopilot] [-SkipODT] [-ZTI] [-OSName ] [-OSEdition ] [-OSLanguage ] - [-OSActivation ] [-Preview] [-ProgressAction ] [] + [-OSActivation ] [-ProgressAction ] [] ``` ### Legacy ``` Start-OSDCloud [-Manufacturer ] [-Product ] [-Firmware] [-Restart] [-Shutdown] [-Screenshot] [-SkipAutopilot] [-SkipODT] [-ZTI] [-OSVersion ] [-OSBuild ] [-OSEdition ] - [-OSLanguage ] [-OSActivation ] [-Preview] [-ProgressAction ] - [] + [-OSLanguage ] [-OSActivation ] [-ProgressAction ] [] ``` ### CustomImage ``` Start-OSDCloud [-Manufacturer ] [-Product ] [-Firmware] [-Restart] [-Shutdown] [-Screenshot] - [-SkipAutopilot] [-SkipODT] [-ZTI] [-FindImageFile] [-ImageFileUrl ] [-OSImageIndex ] - [-Preview] [-ProgressAction ] [] + [-SkipAutopilot] [-SkipODT] [-ZTI] [-FindImageFile] [-ImageFileUrl ] [-OSImageIndex ] + [-ProgressAction ] [] ``` ## DESCRIPTION -Starts the OSDCloud Windows 10 or 11 Build Process from the OSD Module or a GitHub Repository +{{ Fill in the Description }} ## EXAMPLES @@ -48,137 +47,141 @@ PS C:\> {{ Add example code here }} ## PARAMETERS -### -Manufacturer -Automatically populated from Get-MyComputerManufacturer -Brief +### -FindImageFile +{{ Fill FindImageFile Description }} ```yaml -Type: String -Parameter Sets: (All) +Type: SwitchParameter +Parameter Sets: CustomImage Aliases: Required: False Position: Named -Default value: (Get-MyComputerManufacturer -Brief) +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Product -Automatically populated from Get-MyComputerProduct +### -Firmware +{{ Fill Firmware Description }} ```yaml -Type: String +Type: SwitchParameter Parameter Sets: (All) Aliases: Required: False Position: Named -Default value: (Get-MyComputerProduct) +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Firmware -$Global:StartOSDCloud.MSCatalogFirmware = $true +### -ImageFileUrl +{{ Fill ImageFileUrl Description }} ```yaml -Type: SwitchParameter -Parameter Sets: (All) +Type: String +Parameter Sets: CustomImage Aliases: Required: False Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Restart -Restart the computer after Invoke-OSDCloud to OOBE +### -Manufacturer +{{ Fill Manufacturer Description }} ```yaml -Type: SwitchParameter +Type: String Parameter Sets: (All) Aliases: Required: False Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Shutdown -Shutdown the computer after Invoke-OSDCloud +### -OSActivation +{{ Fill OSActivation Description }} ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: +Type: String +Parameter Sets: Default, Legacy +Aliases: License, OSLicense, Activation +Accepted values: Retail, Volume Required: False Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Screenshot -Captures screenshots during OSDCloud WinPE +### -OSBuild +{{ Fill OSBuild Description }} ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: +Type: String +Parameter Sets: Legacy +Aliases: Build +Accepted values: 25H2, 24H2, 23H2, 22H2 Required: False Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -SkipAutopilot -Skips the Autopilot Task routine +### -OSEdition +{{ Fill OSEdition Description }} ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: +Type: String +Parameter Sets: Default, Legacy +Aliases: Edition +Accepted values: Home, Home N, Home Single Language, Education, Education N, Enterprise, Enterprise N, Pro, Pro N Required: False Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -SkipODT -Skips the ODT Task routine +### -OSImageIndex +{{ Fill OSImageIndex Description }} ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: +Type: Int32 +Parameter Sets: CustomImage +Aliases: ImageIndex Required: False Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -ZTI -Skip prompting to wipe Disks +### -OSLanguage +{{ Fill OSLanguage Description }} ```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: +Type: String +Parameter Sets: Default, Legacy +Aliases: Culture, OSCulture +Accepted values: ar-sa, bg-bg, cs-cz, da-dk, de-de, el-gr, en-gb, en-us, es-es, es-mx, et-ee, fi-fi, fr-ca, fr-fr, he-il, hr-hr, hu-hu, it-it, ja-jp, ko-kr, lt-lt, lv-lv, nb-no, nl-nl, pl-pl, pt-br, pt-pt, ro-ro, ru-ru, sk-sk, sl-si, sr-latn-rs, sv-se, th-th, tr-tr, uk-ua, zh-cn, zh-tw Required: False Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -190,6 +193,7 @@ Accept wildcard characters: False Type: String Parameter Sets: Default Aliases: +Accepted values: Windows 11 25H2 x64, Windows 11 24H2 x64, Windows 11 23H2 x64, Windows 11 22H2 x64, Windows 10 22H2 x64 Required: False Position: Named @@ -199,12 +203,13 @@ Accept wildcard characters: False ``` ### -OSVersion -Operating System Version of the Windows installation +{{ Fill OSVersion Description }} ```yaml Type: String Parameter Sets: Legacy Aliases: +Accepted values: Windows 11, Windows 10 Required: False Position: Named @@ -213,14 +218,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -OSBuild -Operating System Build of the Windows installation -Alias = Build +### -Product +{{ Fill Product Description }} ```yaml Type: String -Parameter Sets: Legacy -Aliases: Build +Parameter Sets: (All) +Aliases: Required: False Position: Named @@ -229,14 +233,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -OSEdition -Operating System Edition of the Windows installation -Alias = Edition +### -Restart +{{ Fill Restart Description }} ```yaml -Type: String -Parameter Sets: Default, Legacy -Aliases: Edition +Type: SwitchParameter +Parameter Sets: (All) +Aliases: Required: False Position: Named @@ -245,14 +248,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -OSLanguage -Operating System Language of the Windows installation -Alias = Culture, OSCulture +### -Screenshot +{{ Fill Screenshot Description }} ```yaml -Type: String -Parameter Sets: Default, Legacy -Aliases: Culture, OSCulture +Type: SwitchParameter +Parameter Sets: (All) +Aliases: Required: False Position: Named @@ -261,13 +263,13 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -OSActivation -License of the Windows Operating System +### -Shutdown +{{ Fill Shutdown Description }} ```yaml -Type: String -Parameter Sets: Default, Legacy -Aliases: License, OSLicense, Activation +Type: SwitchParameter +Parameter Sets: (All) +Aliases: Required: False Position: Named @@ -276,27 +278,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -FindImageFile -Searches for the specified WIM file +### -SkipAutopilot +{{ Fill SkipAutopilot Description }} ```yaml Type: SwitchParameter -Parameter Sets: CustomImage +Parameter Sets: (All) Aliases: Required: False Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -ImageFileUrl -Downloads a WIM file specified by the URK +### -SkipODT +{{ Fill SkipODT Description }} ```yaml -Type: String -Parameter Sets: CustomImage +Type: SwitchParameter +Parameter Sets: (All) Aliases: Required: False @@ -306,23 +308,8 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -OSImageIndex -Images using the specified Image Index - -```yaml -Type: String -Parameter Sets: CustomImage -Aliases: ImageIndex - -Required: False -Position: Named -Default value: AUTO -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Preview -{{ Fill Preview Description }} +### -ZTI +{{ Fill ZTI Description }} ```yaml Type: SwitchParameter @@ -331,7 +318,7 @@ Aliases: Required: False Position: Named -Default value: False +Default value: None Accept pipeline input: False Accept wildcard characters: False ``` @@ -356,11 +343,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### None + ## OUTPUTS +### System.Object ## NOTES ## RELATED LINKS - -[https://github.com/OSDeploy/OSD/tree/master/Docs](https://github.com/OSDeploy/OSD/tree/master/Docs) - diff --git a/Docs/Start-OSDCloudCLI.md b/Docs/Start-OSDCloudCLI.md index 661795793..25eb9aad4 100644 --- a/Docs/Start-OSDCloudCLI.md +++ b/Docs/Start-OSDCloudCLI.md @@ -16,8 +16,7 @@ Starts the OSDCloud Windows 10 or 11 Build Process from the OSD Module or a GitH ``` Start-OSDCloudCLI [-ComputerManufacturer ] [-ComputerProduct ] [-Firmware] [-Restart] [-Shutdown] [-Screenshot] [-SkipAutopilot] [-ZTI] [-OSName ] [-OSEdition ] - [-OSLanguage ] [-OSActivation ] [-ProgressAction ] [-WhatIf] [-Confirm] - [] + [-OSLanguage ] [-OSActivation ] [-ProgressAction ] [] ``` ### Legacy @@ -25,14 +24,14 @@ Start-OSDCloudCLI [-ComputerManufacturer ] [-ComputerProduct ] [ Start-OSDCloudCLI [-ComputerManufacturer ] [-ComputerProduct ] [-Firmware] [-Restart] [-Shutdown] [-Screenshot] [-SkipAutopilot] [-ZTI] [-OSVersion ] [-OSReleaseID ] [-OSEdition ] [-OSLanguage ] [-OSActivation ] [-ProgressAction ] - [-WhatIf] [-Confirm] [] + [] ``` ### CustomImage ``` Start-OSDCloudCLI [-ComputerManufacturer ] [-ComputerProduct ] [-Firmware] [-Restart] [-Shutdown] [-Screenshot] [-SkipAutopilot] [-ZTI] [-FindImageFile] [-ImageFileUrl ] - [-OSImageIndex ] [-ProgressAction ] [-WhatIf] [-Confirm] [] + [-OSImageIndex ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -296,44 +295,13 @@ Accept wildcard characters: False Images using the specified Image Index ```yaml -Type: String +Type: Int32 Parameter Sets: CustomImage Aliases: ImageIndex Required: False Position: Named -Default value: AUTO -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None +Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` diff --git a/Docs/Test-DynamicValidateSet.md b/Docs/Test-DynamicValidateSet.md index 99b3330f1..286e90a79 100644 --- a/Docs/Test-DynamicValidateSet.md +++ b/Docs/Test-DynamicValidateSet.md @@ -37,7 +37,7 @@ PS C:\> {{ Add example code here }} Type: String Parameter Sets: (All) Aliases: -Accepted values: Windows 11 24H2 x64, Windows 11 23H2 x64, Windows 11 22H2 x64, Windows 11 21H2 x64, Windows 10 22H2 x64, Windows 10 21H2 x64, Windows 10 20H2 x64, Windows 10 1909 x64 +Accepted values: Windows 11 25H2 x64, Windows 11 24H2 x64, Windows 11 23H2 x64, Windows 11 22H2 x64, Windows 11 21H2 x64, Windows 10 22H2 x64, Windows 10 21H2 x64, Windows 10 20H2 x64, Windows 10 1909 x64 Required: True Position: 1 diff --git a/Docs/Test-HPTPMFromOSDCloudUSB.md b/Docs/Test-HPTPMFromOSDCloudUSB.md index 792996f11..651685386 100644 --- a/Docs/Test-HPTPMFromOSDCloudUSB.md +++ b/Docs/Test-HPTPMFromOSDCloudUSB.md @@ -8,7 +8,7 @@ schema: 2.0.0 # Test-HPTPMFromOSDCloudUSB ## SYNOPSIS -{{ Fill in the Synopsis }} +Tests whether HP TPM firmware packages exist on an OSDCloud USB drive. ## SYNTAX @@ -18,21 +18,31 @@ Test-HPTPMFromOSDCloudUSB [[-PackageID] ] [-TryToCopy] [-ProgressAction ``` ## DESCRIPTION -{{ Fill in the Description }} +Searches for HP TPM firmware softpaq files (SP87753 and/or SP94937) on a connected +OSDCloud USB volume. +If found, optionally copies them to C:\OSDCloud\HP for local use. +Returns $true if the requested package(s) are found, otherwise $false. ## EXAMPLES -### Example 1 -```powershell -PS C:\> {{ Add example code here }} +### EXAMPLE 1 +``` +Test-HPTPMFromOSDCloudUSB -PackageID SP94937 +Returns $true if SP94937.exe exists on the OSDCloud USB and copies it to C:\OSDCloud\HP. ``` -{{ Add example description here }} +### EXAMPLE 2 +``` +Test-HPTPMFromOSDCloudUSB +Returns $true only if both SP87753.exe and SP94937.exe exist on the OSDCloud USB. +``` ## PARAMETERS ### -PackageID -{{ Fill PackageID Description }} +The HP softpaq package ID to check for. +Valid values are 'SP87753' or 'SP94937'. +If not specified, both packages are checked. ```yaml Type: String @@ -40,14 +50,16 @@ Parameter Sets: (All) Aliases: Required: False -Position: 0 +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -TryToCopy -{{ Fill TryToCopy Description }} +Switch to indicate that found firmware files should be copied to C:\OSDCloud\HP. +Note: this parameter is currently unreachable due to early return statements when +a PackageID is specified. ```yaml Type: SwitchParameter @@ -56,7 +68,7 @@ Aliases: Required: False Position: Named -Default value: None +Default value: False Accept pipeline input: False Accept wildcard characters: False ``` @@ -81,11 +93,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### None - ## OUTPUTS -### System.Object +### System.Boolean ## NOTES ## RELATED LINKS diff --git a/OSD.psd1 b/OSD.psd1 index 04fcc10ca..cdaf98cf9 100644 --- a/OSD.psd1 +++ b/OSD.psd1 @@ -2,287 +2,199 @@ # Module manifest for module 'OSD' # # Generated by: David Segura -# -# Generated on: 4/23/2026 +# Generated on: 2026-07-06 # @{ - -# Script module or binary module file associated with this manifest. -RootModule = 'OSD.psm1' - -# Version number of this module. -ModuleVersion = '26.4.23.1' - -# Supported PSEditions -CompatiblePSEditions = 'Desktop' - -# ID used to uniquely identify this module -GUID = '9fe5b9b6-0224-4d87-9018-a8978529f6f5' - -# Author of this module -Author = 'David Segura' - -# Company or vendor of this module -CompanyName = 'David Segura' - -# Copyright statement for this module -Copyright = '(c) 2026 David Segura. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'OSD PowerShell Module for Windows Deployment' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '5.1' - -# Name of the Windows PowerShell host required by this module -# PowerShellHostName = '' - -# Minimum version of the Windows PowerShell host required by this module -# PowerShellHostVersion = '' - -# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. -# DotNetFrameworkVersion = '' - -# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. -# CLRVersion = '' - -# Processor architecture (None, X86, Amd64) required by this module -# ProcessorArchitecture = '' - -# Modules that must be imported into the global environment prior to importing this module -# RequiredModules = @() - -# Assemblies that must be loaded prior to importing this module -# RequiredAssemblies = @() - -# Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() - -# Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() - -# Format files (.ps1xml) to be loaded when importing this module -FormatsToProcess = '.\Format\MsUpCat.Format.ps1xml' - -# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess -# NestedModules = @() - -# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. -FunctionsToExport = 'Add-7Zip2BootImage', 'Add-OfflineServicingWindowsDriver', - 'Add-WindowsPackageSSU', 'Backup-DiskToFFU', 'Backup-MyBitLockerKeys', - 'Block-AdminUser', 'Block-ManufacturerNeLenovo', 'Block-NoCurl', - 'Block-NoInternet', 'Block-PowerShellVersionLt5', - 'Block-StandardUser', 'Block-WindowsReleaseIdLt1703', - 'Block-WindowsVersionNe10', 'Block-WinOS', 'Block-WinPE', - 'Clear-LocalDisk', 'Clear-USBDisk', 'Connect-OSDCloudAzure', - 'Connect-WinREWiFi', 'Connect-WinREWiFiByXMLProfile', - 'Convert-EsdToFolder', 'Convert-EsdToIso', 'Convert-EsdToWim', - 'Convert-FolderToIso', 'Convert-PNPDeviceIDtoGuid', - 'ConvertTo-PSKeyVaultSecret', 'Copy-IsoToUsb', - 'Copy-PSModuleToFolder', 'Copy-PSModuleToWim', - 'Copy-PSModuleToWindowsImage', 'Copy-WinREWIM', - 'Dismount-MyWindowsImage', 'Edit-AdkWinPEWIM', 'Edit-MyWindowsImage', - 'Edit-MyWinPE', 'Edit-OSDCloudWinPE', 'Enable-OSDCloudODT', - 'Enable-PEWimPSGallery', 'Enable-PEWindowsImagePSGallery', - 'Enable-SpecializeDriverPack', 'Expand-StagedDriverPack', - 'Expand-ZTIDriverPack', 'Export-OSDCertificatesAsReg', - 'Find-OSDCloudFile', 'Find-OSDCloudODTFile', - 'Find-OSDCloudOfflineFile', 'Find-OSDCloudOfflinePath', - 'Find-TextInFile', 'Find-TextInModule', 'Get-AzClipboard', - 'Get-AzOSDCloud', 'Get-AzOSDTechId', - 'Get-CimVideoControllerResolution', 'Get-CloudSecret', - 'Get-ComObjects', 'Get-ComObjMicrosoftUpdateAutoUpdate', - 'Get-ComObjMicrosoftUpdateInstaller', - 'Get-ComObjMicrosoftUpdateServiceManager', 'Get-DataDisk', - 'Get-DellApplicationCatalog', 'Get-DellBiosCatalog', - 'Get-DellDriverCatalog', 'Get-DellDriverPackCatalog', - 'Get-DellFirmwareCatalog', 'Get-DellSystemCatalog', - 'Get-DellWinPE10DriverPack', 'Get-DellWinPEDriverPack', - 'Get-DisplayAllScreens', 'Get-DisplayPrimaryBitmapSize', - 'Get-DisplayPrimaryMonitorSize', 'Get-DisplayPrimaryScaling', - 'Get-DisplayVirtualScreen', 'Get-DownLinks', 'Get-EnablementPackage', - 'Get-FeatureUpdate', 'Get-GithubRawContent', 'Get-GithubRawUrl', - 'Get-HPAccessoryCatalog', 'Get-HPBiosCatalog', - 'Get-HPDeviceFamilyPlatformDetails', 'Get-HPDriverCatalog', - 'Get-HPDriverPackCatalog', 'Get-HPDriverPackLatest', - 'Get-HPFirmwareCatalog', 'Get-HPIAJSONResult', - 'Get-HPIALatestVersion', 'Get-HPIAXMLResult', 'Get-HPOSSupport', - 'Get-HPPlatformCatalog', 'Get-HPSoftPaqItems', - 'Get-HPSoftpaqListLatest', 'Get-HPSoftwareCatalog', - 'Get-HPSystemCatalog', 'Get-HPTPMDetermine', 'Get-HPWinPEDriverPack', - 'Get-HyperVName', 'Get-IntelEthernetDriverPack', - 'Get-IntelGraphicsDriverPack', 'Get-IntelRadeonDriverPack', - 'Get-IntelWirelessDriverPack', 'Get-LenovoBiosCatalog', - 'Get-LenovoDriverPackCatalog', 'Get-LocalDisk', - 'Get-LocalDiskPartition', 'Get-LocalDiskVolume', - 'Get-SurfaceDriverPackCatalog', 'Get-MsUpCat', 'Get-MsUpCatUpdate', - 'Get-MyBiosSerialNumber', 'Get-MyBiosUpdate', 'Get-MyBiosVersion', - 'Get-MyBitLockerKeyProtectors', 'Get-MyComputerManufacturer', - 'Get-MyComputerModel', 'Get-MyComputerProduct', - 'Get-MyDefaultAUService', 'Get-MyDellBios', 'Get-MyDriverPack', - 'Get-MyWindowsCapability', 'Get-MyWindowsPackage', - 'Get-NativeMatchineImage', 'Get-OSD', 'Get-OSDClass', - 'Get-OSDCloudAzureResources', 'Get-OSDCloudDriverPack', - 'Get-OSDCloudDriverPacks', 'Get-OSDCloudOperatingSystems', - 'Get-OSDCloudOperatingSystemsIndexes', - 'Get-OSDCloudOperatingSystemsIndexMap', 'Get-OSDCloudOSNames', - 'Get-OSDCloudTemplate', 'Get-OSDCloudTemplateNames', - 'Get-OSDCloudVMDefaults', 'Get-OSDCloudVMSettings', - 'Get-OSDCloudWorkspace', 'Get-OSDDisk', 'Get-OSDGather', 'Get-OSDHelp', - 'Get-OSDMetrics', 'Get-OSDPad', 'Get-OSDPartition', 'Get-OSDPower', - 'Get-OSDVolume', 'Get-OSDWinEvent', 'Get-OSDWinPE', - 'Get-PowerSettingSleepAfter', 'Get-PowerSettingTurnMonitorOffAfter', - 'Get-PSCloudScript', 'Get-ReAgentXml', 'Get-RegCurrentVersion', - 'Get-ScreenPNG', 'Get-SessionsXml', 'Get-SetupCompleteOSDCloudUSB', - 'Get-SystemFirmwareDevice', 'Get-SystemFirmwareResource', - 'Get-SystemFirmwareUpdate', 'Get-TimeZoneFromIP', 'Get-USBDisk', - 'Get-USBPartition', 'Get-USBVolume', 'Get-WiFiActiveProfileSSID', - 'Get-WiFiProfileKey', 'Get-Win11Readiness', - 'Get-WindowsAdkInstallPath', 'Get-WindowsAdkInstallVersion', - 'Get-WindowsAdkPaths', 'Get-WindowsKitsInstallPath', - 'Get-WindowsOEMProductKey', 'Get-WindowsUpdateDriver', - 'Get-WindowsUpdateManifests', 'Get-WinREPartition', 'Get-WinREWiFi', - 'Get-WSUSXML', 'Import-MDTWinPECloudDriver', - 'Import-OSDCloudWinPEDriverMDT', 'Initialize-OSDCloudStartnet', - 'Initialize-OSDCloudStartnetUpdate', 'Install-AzOSDIacTools', - 'Install-BuildUpdatesFromOSCloudUSB', 'Install-HPIA', - 'Install-ModuleHPCMSL', 'Install-SystemFirmwareUpdate', - 'Invoke-AzOSDAzureConfig', 'Invoke-CloudSecret', 'Invoke-Exe', - 'Invoke-HPAnalyzer', 'Invoke-HPDriverUpdate', 'Invoke-HPIA', - 'Invoke-HPIAOfflineSync', 'Invoke-HPTPMDowngrade', - 'Invoke-HPTPMDownload', 'Invoke-HPTPMEXEDownload', - 'Invoke-HPTPMEXEInstall', 'Invoke-MSCatalogParseDate', - 'Invoke-oobeAddNetFX3', 'Invoke-oobeAddRSAT', - 'Invoke-oobeUpdateDrivers', 'Invoke-oobeUpdateWindows', - 'Invoke-OSDCloud', 'Invoke-OSDCloudDriverPackCM', - 'Invoke-OSDCloudDriverPackMDT', 'Invoke-OSDCloudDriverPackPPKG', - 'Invoke-OSDCloudIPU', 'Invoke-OSDInfo', 'Invoke-OSDSpecialize', - 'Invoke-OSDSpecializeDev', 'Invoke-SelectDataDisk', - 'Invoke-SelectFFUDisk', 'Invoke-SelectLocalDisk', - 'Invoke-SelectLocalVolume', 'Invoke-SelectOSDDisk', - 'Invoke-SelectOSDVolume', 'Invoke-SelectUSBDisk', - 'Invoke-SelectUSBVolume', 'Invoke-WebPSScript', - 'Mount-MyWindowsImage', 'New-AdkCopyPE', 'New-AdkISO', - 'New-BootableUSBDrive', 'New-CAB', 'New-CabDevelopment', - 'New-OSDCloudISO', 'New-OSDCloudOSWimFile', 'New-OSDCloudTemplate', - 'New-OSDCloudUSB', 'New-OSDCloudUSBSetupCompleteTemplate', - 'New-OSDCloudVM', 'New-OSDCloudWorkspace', - 'New-OSDCloudWorkSpaceSetupCompleteTemplate', 'New-OSDisk', - 'New-WindowsAdkISO', 'Remove-AppxOnline', 'Reset-OSDCloudVMSettings', - 'Resolve-MsUrl', 'Save-ClipboardImage', 'Save-EnablementPackage', - 'Save-FeatureUpdate', 'Save-MsUpCatDriver', 'Save-MsUpCatUpdate', - 'Save-MyBiosUpdate', 'Save-MyBitLockerExternalKey', - 'Save-MyBitLockerKeyPackage', 'Save-MyBitLockerRecoveryPassword', - 'Save-MyDellBios', 'Save-MyDellBiosFlash64W', 'Save-MyDriverPack', - 'Save-OSDDownload', 'Save-SystemFirmwareUpdate', 'Save-WebFile', - 'Save-WinPECloudDriver', 'Save-ZTIDriverPack', - 'Select-OSDCloudAutopilotJsonItem', 'Select-OSDCloudFileWim', - 'Select-OSDCloudImageIndex', 'Select-OSDCloudODTFile', - 'Set-AzClipboard', 'Set-BitlockerRegValuesXTS256', - 'Set-BootmgrTimeout', 'Set-ClipboardScreenshot', 'Set-CloudSecret', - 'Set-DisRes', 'Set-HPBIOSSetting', 'Set-HPTPMBIOSSettings', - 'Set-HyperVName', 'Set-LatestUpdatesASAPEnabled', - 'Set-OSDCloudTemplate', 'Set-OSDCloudUnattendAuditMode', - 'Set-OSDCloudUnattendAuditModeAutopilot', - 'Set-OSDCloudUnattendSpecialize', - 'Set-OSDCloudUnattendSpecializeDev', 'Set-OSDCloudVMSettings', - 'Set-OSDCloudWorkspace', 'Set-OSDxCloudUnattendSpecialize', - 'Set-PowerSettingSleepAfter', 'Set-PowerSettingTurnMonitorOffAfter', - 'Set-SetupCompleteBitlocker', 'Set-SetupCompleteCreateFinish', - 'Set-SetupCompleteCreateStart', 'Set-SetupCompleteDefenderUpdate', - 'Set-SetupCompleteHPAppend', 'Set-SetupCompleteHyperVName', - 'Set-SetupCompleteNetFX', 'Set-SetupCompleteOEMActivation', - 'Set-SetupCompleteOSDCloudCustom', 'Set-SetupCompleteOSDCloudUSB', - 'Set-SetupCompleteSetWiFi', 'Set-SetupCompleteStartWindowsUpdate', - 'Set-SetupCompleteStartWindowsUpdateDriver', - 'Set-SetupCompleteTimeZone', 'Set-TimeZoneFromIP', 'Set-WiFi', - 'Set-WimExecutionPolicy', 'Set-WindowsImageExecutionPolicy', - 'Set-WindowsOEMActivation', 'Set-WinREWiFi', 'Show-MsSettings', - 'Show-RegistryXML', 'Start-DiskImageGUI', 'Start-DISMFromOSDCloudUSB', - 'Start-EjectCD', 'Start-OOBEDeploy', 'Start-OSDCloud', - 'Start-OSDCloudAzure', 'Start-OSDCloudCLI', 'Start-OSDCloudGUI', - 'Start-OSDCloudGUIDev', 'Start-OSDCloudREAzure', - 'Start-OSDCloudToolbox', 'Start-OSDDiskPart', 'Start-OSDeployPad', - 'Start-OSDPad', 'Start-OSDPadCategories', 'Start-ScreenPNGProcess', - 'Start-WindowsUpdate', 'Start-WindowsUpdateDriver', 'Start-WinREWiFi', - 'Stop-ScreenPNGProcess', 'Test-DCUSupport', - 'Test-DISMFromOSDCloudUSB', 'Test-DynamicValidateSet', - 'Test-HPIASupport', 'Test-HPTPMFromOSDCloudUSB', 'Test-IsVM', - 'Test-MicrosoftUpdateCatalog', 'Test-WebConnection', - 'Test-WindowsImage', 'Test-WindowsImageMounted', - 'Test-WindowsImageMountPath', 'Test-WindowsPackageCAB', - 'Unblock-WindowsUpdate', 'Unlock-MyBitLockerExternalKey', - 'Update-DefenderStack', 'Update-IntelDriversCatalog', - 'Update-MyDellBios', 'Update-MyWindowsImage', 'Update-OSDCloudUSB', - 'Use-WinPEContent', 'Wait-WebConnection', 'Write-CMTraceLog', - 'Get-OSDCatalogDriverPack', 'Get-OSDCatalogDriverPacks', - 'Get-OSDCatalogOperatingSystems', 'Get-OSDModulePath', - 'Get-OSDModuleVersion', 'Get-OSDCachePath' - -# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. -CmdletsToExport = @() - -# Variables to export from this module -# VariablesToExport = @() - -# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. -AliasesToExport = 'Find-InOSDModule', 'Get-Partition.fixed', 'Mount-OSDWindowsImage', - 'Get-Volume.fixed', 'Get-Disk.fixed', 'Copy-ModuleToFolder', - 'Mount-WindowsImageOSD', 'Get-Partition.usb', - 'Dismount-WindowsImageOSD', 'New-Bootable.usb', 'Get-Disk.usb', - 'Get-Volume.usb', 'Get-AdkPaths', 'Edit-WindowsImageOSD', - 'Select-Disk.usb', 'Update-WindowsImageOSD', 'Get-OSDSessions', - 'Edit-ADKwinpe.wim', 'Clear-Disk.fixed', 'Update-OSDWindowsImage', - 'Get-Partition.osd', 'Get-Volume.osd', 'Select-Volume.usb', - 'Clear-Disk.usb', 'Get-Disk.osd' - -# DSC resources to export from this module -# DscResourcesToExport = @() - -# List of all modules packaged with this module -# ModuleList = @() - -# List of all files packaged with this module -# FileList = @() - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - - PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = 'osd','osdeploy','osdcloud' - - # A URL to the license for this module. - LicenseUri = 'https://github.com/OSDeploy/OSD/blob/master/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/OSDeploy/OSD' - - # A URL to an icon representing this module. - IconUri = 'https://raw.githubusercontent.com/OSDeploy/OSD/master/OSD.png' - - # ReleaseNotes of this module - ReleaseNotes = 'https://osd.osdeploy.com' - - # Prerelease string of this module - # Prerelease = '' - - # Flag to indicate whether the module requires explicit user acceptance for install/update/save - # RequireLicenseAcceptance = $false - - # External dependent modules of this module - # ExternalModuleDependencies = @() - - } # End of PSData hashtable - - } # End of PrivateData hashtable - -# HelpInfo URI of this module -# HelpInfoURI = '' - -# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. -# DefaultCommandPrefix = '' - + # --- Identity --- + RootModule = 'OSD.psm1' + ModuleVersion = '26.7.6.1' + CompatiblePSEditions = @('Core', 'Desktop') + GUID = '9fe5b9b6-0224-4d87-9018-a8978529f6f5' + + # --- Authoring --- + Author = 'David Segura' + CompanyName = 'Recast Software' + Copyright = '(c) 2026 Recast Software. All rights reserved.' + Description = 'Root module for OSD.' + + # --- Requirements --- + PowerShellVersion = '5.1' + + # --- Exports --- + FormatsToProcess = '.\Format\MsUpCat.Format.ps1xml' + FunctionsToExport = @( + 'Add-7Zip2BootImage', 'Add-OfflineServicingWindowsDriver', + 'Add-WindowsPackageSSU', 'Backup-DiskToFFU', 'Backup-MyBitLockerKeys', + 'Block-AdminUser', 'Block-ManufacturerNeLenovo', 'Block-NoCurl', + 'Block-NoInternet', 'Block-PowerShellVersionLt5', + 'Block-StandardUser', 'Block-WindowsReleaseIdLt1703', + 'Block-WindowsVersionNe10', 'Block-WinOS', 'Block-WinPE', + 'Clear-LocalDisk', 'Clear-USBDisk', 'Connect-OSDCloudAzure', + 'Connect-WinREWiFi', 'Connect-WinREWiFiByXMLProfile', + 'Convert-EsdToFolder', 'Convert-EsdToIso', 'Convert-EsdToWim', + 'Convert-FolderToIso', 'Convert-PNPDeviceIDtoGuid', + 'ConvertTo-PSKeyVaultSecret', 'Copy-IsoToUsb', + 'Copy-PSModuleToFolder', 'Copy-PSModuleToWim', + 'Copy-PSModuleToWindowsImage', 'Copy-WinREWIM', + 'Dismount-MyWindowsImage', 'Edit-AdkWinPEWIM', 'Edit-MyWindowsImage', + 'Edit-MyWinPE', 'Edit-OSDCloudWinPE', 'Enable-OSDCloudODT', + 'Enable-PEWimPSGallery', 'Enable-PEWindowsImagePSGallery', + 'Enable-SpecializeDriverPack', 'Expand-StagedDriverPack', + 'Expand-ZTIDriverPack', 'Export-OSDCertificatesAsReg', + 'Find-OSDCloudFile', 'Find-OSDCloudODTFile', + 'Find-OSDCloudOfflineFile', 'Find-OSDCloudOfflinePath', + 'Find-TextInFile', 'Find-TextInModule', 'Get-AzClipboard', + 'Get-AzOSDCloud', 'Get-AzOSDTechId', + 'Get-CimVideoControllerResolution', 'Get-CloudSecret', + 'Get-ComObjects', 'Get-ComObjMicrosoftUpdateAutoUpdate', + 'Get-ComObjMicrosoftUpdateInstaller', + 'Get-ComObjMicrosoftUpdateServiceManager', 'Get-DataDisk', + 'Get-DellApplicationCatalog', 'Get-DellBiosCatalog', + 'Get-DellDriverCatalog', 'Get-DellDriverPackCatalog', + 'Get-DellFirmwareCatalog', 'Get-DellSystemCatalog', + 'Get-DellWinPE10DriverPack', 'Get-DellWinPEDriverPack', + 'Get-DisplayAllScreens', 'Get-DisplayPrimaryBitmapSize', + 'Get-DisplayPrimaryMonitorSize', 'Get-DisplayPrimaryScaling', + 'Get-DisplayVirtualScreen', 'Get-DownLinks', 'Get-EnablementPackage', + 'Get-FeatureUpdate', 'Get-GithubRawContent', 'Get-GithubRawUrl', + 'Get-HPAccessoryCatalog', 'Get-HPBiosCatalog', + 'Get-HPDeviceFamilyPlatformDetails', 'Get-HPDriverCatalog', + 'Get-HPDriverPackCatalog', 'Get-HPDriverPackLatest', + 'Get-HPFirmwareCatalog', 'Get-HPIAJSONResult', + 'Get-HPIALatestVersion', 'Get-HPIAXMLResult', 'Get-HPOSSupport', + 'Get-HPPlatformCatalog', 'Get-HPSoftPaqItems', + 'Get-HPSoftpaqListLatest', 'Get-HPSoftwareCatalog', + 'Get-HPSystemCatalog', 'Get-HPTPMDetermine', 'Get-HPWinPEDriverPack', + 'Get-HyperVName', 'Get-IntelEthernetDriverPack', + 'Get-IntelGraphicsDriverPack', 'Get-IntelRadeonDriverPack', + 'Get-IntelWirelessDriverPack', 'Get-LenovoBiosCatalog', + 'Get-LenovoDriverPackCatalog', 'Get-LocalDisk', + 'Get-LocalDiskPartition', 'Get-LocalDiskVolume', + 'Get-SurfaceDriverPackCatalog', 'Get-MsUpCat', 'Get-MsUpCatUpdate', + 'Get-MyBiosSerialNumber', 'Get-MyBiosUpdate', 'Get-MyBiosVersion', + 'Get-MyBitLockerKeyProtectors', 'Get-MyComputerManufacturer', + 'Get-MyComputerModel', 'Get-MyComputerProduct', + 'Get-MyDefaultAUService', 'Get-MyDellBios', 'Get-MyDriverPack', + 'Get-MyWindowsCapability', 'Get-MyWindowsPackage', + 'Get-NativeMatchineImage', 'Get-OSD', 'Get-OSDClass', + 'Get-OSDCloudAzureResources', 'Get-OSDCloudDriverPack', + 'Get-OSDCloudDriverPacks', 'Get-OSDCloudOperatingSystems', + 'Get-OSDCloudOperatingSystemsIndexes', + 'Get-OSDCloudOperatingSystemsIndexMap', 'Get-OSDCloudOSNames', + 'Get-OSDCloudTemplate', 'Get-OSDCloudTemplateNames', + 'Get-OSDCloudVMDefaults', 'Get-OSDCloudVMSettings', + 'Get-OSDCloudWorkspace', 'Get-OSDDisk', 'Get-OSDGather', 'Get-OSDHelp', + 'Get-OSDMetrics', 'Get-OSDPad', 'Get-OSDPartition', 'Get-OSDPower', + 'Get-OSDVolume', 'Get-OSDWinEvent', 'Get-OSDWinPE', + 'Get-PowerSettingSleepAfter', 'Get-PowerSettingTurnMonitorOffAfter', + 'Get-PSCloudScript', 'Get-ReAgentXml', 'Get-RegCurrentVersion', + 'Get-ScreenPNG', 'Get-SessionsXml', 'Get-SetupCompleteOSDCloudUSB', + 'Get-SystemFirmwareDevice', 'Get-SystemFirmwareResource', + 'Get-SystemFirmwareUpdate', 'Get-TimeZoneFromIP', 'Get-USBDisk', + 'Get-USBPartition', 'Get-USBVolume', 'Get-WiFiActiveProfileSSID', + 'Get-WiFiProfileKey', 'Get-Win11Readiness', + 'Get-WindowsAdkInstallPath', 'Get-WindowsAdkInstallVersion', + 'Get-WindowsAdkPaths', 'Get-WindowsKitsInstallPath', + 'Get-WindowsOEMProductKey', 'Get-WindowsUpdateDriver', + 'Get-WindowsUpdateManifests', 'Get-WinREPartition', 'Get-WinREWiFi', + 'Get-WSUSXML', 'Import-MDTWinPECloudDriver', + 'Import-OSDCloudWinPEDriverMDT', 'Initialize-OSDCloudStartnet', + 'Initialize-OSDCloudStartnetUpdate', 'Install-AzOSDIacTools', + 'Install-BuildUpdatesFromOSCloudUSB', 'Install-HPIA', + 'Install-ModuleHPCMSL', 'Install-SystemFirmwareUpdate', + 'Invoke-AzOSDAzureConfig', 'Invoke-CloudSecret', 'Invoke-Exe', + 'Invoke-HPAnalyzer', 'Invoke-HPDriverUpdate', 'Invoke-HPIA', + 'Invoke-HPIAOfflineSync', 'Invoke-HPTPMDowngrade', + 'Invoke-HPTPMDownload', 'Invoke-HPTPMEXEDownload', + 'Invoke-HPTPMEXEInstall', 'Invoke-MSCatalogParseDate', + 'Invoke-oobeAddNetFX3', 'Invoke-oobeAddRSAT', + 'Invoke-oobeUpdateDrivers', 'Invoke-oobeUpdateWindows', + 'Invoke-OSDCloud', 'Invoke-OSDCloudDriverPackCM', + 'Invoke-OSDCloudDriverPackMDT', 'Invoke-OSDCloudDriverPackPPKG', + 'Invoke-OSDCloudIPU', 'Invoke-OSDInfo', 'Invoke-OSDSpecialize', + 'Invoke-OSDSpecializeDev', 'Invoke-SelectDataDisk', + 'Invoke-SelectFFUDisk', 'Invoke-SelectLocalDisk', + 'Invoke-SelectLocalVolume', 'Invoke-SelectOSDDisk', + 'Invoke-SelectOSDVolume', 'Invoke-SelectUSBDisk', + 'Invoke-SelectUSBVolume', 'Invoke-WebPSScript', + 'Mount-MyWindowsImage', 'New-AdkCopyPE', 'New-AdkISO', + 'New-BootableUSBDrive', 'New-CAB', 'New-CabDevelopment', + 'New-OSDCloudISO', 'New-OSDCloudOSWimFile', 'New-OSDCloudTemplate', + 'New-OSDCloudUSB', 'New-OSDCloudUSBSetupCompleteTemplate', + 'New-OSDCloudVM', 'New-OSDCloudWorkspace', + 'New-OSDCloudWorkSpaceSetupCompleteTemplate', 'New-OSDisk', + 'New-WindowsAdkISO', 'Remove-AppxOnline', 'Reset-OSDCloudVMSettings', + 'Resolve-MsUrl', 'Save-ClipboardImage', 'Save-EnablementPackage', + 'Save-FeatureUpdate', 'Save-MsUpCatDriver', 'Save-MsUpCatUpdate', + 'Save-MyBiosUpdate', 'Save-MyBitLockerExternalKey', + 'Save-MyBitLockerKeyPackage', 'Save-MyBitLockerRecoveryPassword', + 'Save-MyDellBios', 'Save-MyDellBiosFlash64W', 'Save-MyDriverPack', + 'Save-OSDDownload', 'Save-SystemFirmwareUpdate', 'Save-WebFile', + 'Save-WinPECloudDriver', 'Save-ZTIDriverPack', + 'Select-OSDCloudAutopilotJsonItem', 'Select-OSDCloudFileWim', + 'Select-OSDCloudImageIndex', 'Select-OSDCloudODTFile', + 'Set-AzClipboard', 'Set-BitlockerRegValuesXTS256', + 'Set-BootmgrTimeout', 'Set-ClipboardScreenshot', 'Set-CloudSecret', + 'Set-DisRes', 'Set-HPBIOSSetting', 'Set-HPTPMBIOSSettings', + 'Set-HyperVName', 'Set-LatestUpdatesASAPEnabled', + 'Set-OSDCloudTemplate', 'Set-OSDCloudUnattendAuditMode', + 'Set-OSDCloudUnattendAuditModeAutopilot', + 'Set-OSDCloudUnattendSpecialize', + 'Set-OSDCloudUnattendSpecializeDev', 'Set-OSDCloudVMSettings', + 'Set-OSDCloudWorkspace', 'Set-OSDxCloudUnattendSpecialize', + 'Set-PowerSettingSleepAfter', 'Set-PowerSettingTurnMonitorOffAfter', + 'Set-SetupCompleteBitlocker', 'Set-SetupCompleteCreateFinish', + 'Set-SetupCompleteCreateStart', 'Set-SetupCompleteDefenderUpdate', + 'Set-SetupCompleteHPAppend', 'Set-SetupCompleteHyperVName', + 'Set-SetupCompleteNetFX', 'Set-SetupCompleteOEMActivation', + 'Set-SetupCompleteOSDCloudCustom', 'Set-SetupCompleteOSDCloudUSB', + 'Set-SetupCompleteSetWiFi', 'Set-SetupCompleteStartWindowsUpdate', + 'Set-SetupCompleteStartWindowsUpdateDriver', + 'Set-SetupCompleteTimeZone', 'Set-TimeZoneFromIP', 'Set-WiFi', + 'Set-WimExecutionPolicy', 'Set-WindowsImageExecutionPolicy', + 'Set-WindowsOEMActivation', 'Set-WinREWiFi', 'Show-MsSettings', + 'Show-RegistryXML', 'Start-DiskImageGUI', 'Start-DISMFromOSDCloudUSB', + 'Start-EjectCD', 'Start-OOBEDeploy', 'Start-OSDCloud', + 'Start-OSDCloudAzure', 'Start-OSDCloudCLI', 'Start-OSDCloudGUI', + 'Start-OSDCloudGUIDev', 'Start-OSDCloudREAzure', + 'Start-OSDCloudToolbox', 'Start-OSDDiskPart', 'Start-OSDeployPad', + 'Start-OSDPad', 'Start-OSDPadCategories', 'Start-ScreenPNGProcess', + 'Start-WindowsUpdate', 'Start-WindowsUpdateDriver', 'Start-WinREWiFi', + 'Stop-ScreenPNGProcess', 'Test-DCUSupport', + 'Test-DISMFromOSDCloudUSB', 'Test-DynamicValidateSet', + 'Test-HPIASupport', 'Test-HPTPMFromOSDCloudUSB', 'Test-IsVM', + 'Test-MicrosoftUpdateCatalog', 'Test-WebConnection', + 'Test-WindowsImage', 'Test-WindowsImageMounted', + 'Test-WindowsImageMountPath', 'Test-WindowsPackageCAB', + 'Unblock-WindowsUpdate', 'Unlock-MyBitLockerExternalKey', + 'Update-DefenderStack', 'Update-IntelDriversCatalog', + 'Update-MyDellBios', 'Update-MyWindowsImage', 'Update-OSDCloudUSB', + 'Use-WinPEContent', 'Wait-WebConnection', 'Write-CMTraceLog', + 'Get-OSDModulePath', + 'Get-OSDModuleVersion', 'Get-OSDCachePath' + ) + CmdletsToExport = @() + VariablesToExport = @() + AliasesToExport = @( + 'Clear-Disk.fixed', 'Clear-Disk.usb', 'Copy-ModuleToFolder', + 'Dismount-WindowsImageOSD', 'Edit-ADKwinpe.wim', 'Edit-WindowsImageOSD', + 'Find-InOSDModule', 'Get-AdkPaths', 'Get-Disk.fixed', 'Get-Disk.osd', + 'Get-Disk.usb', 'Get-OSDSessions', 'Get-Partition.fixed', + 'Get-Partition.osd', 'Get-Partition.usb', 'Get-Volume.fixed', + 'Get-Volume.osd', 'Get-Volume.usb', 'Mount-OSDWindowsImage', + 'Mount-WindowsImageOSD', 'New-Bootable.usb', 'Select-Disk.usb', + 'Select-Volume.usb', 'Update-OSDWindowsImage', 'Update-WindowsImageOSD' + ) + + # --- Discovery --- + PrivateData = @{ + PSData = @{ + Tags = @('OSDeploy', 'OSDCloud', 'OSD', 'Recast', 'RecastSoftware') + LicenseUri = 'https://github.com/OSDeploy/OSD/blob/master/LICENSE' + ProjectUri = 'https://github.com/OSDeploy/OSD' + IconUri = 'https://raw.githubusercontent.com/OSDeploy/OSD/master/OSD.png' + ReleaseNotes = 'https://osd.osdeploy.com' + } + } } diff --git a/Private/operatingsystem/Get-CoreOperatingSystems.ps1 b/Private/operatingsystem/Get-CoreOperatingSystems.ps1 new file mode 100644 index 000000000..b38d58e06 --- /dev/null +++ b/Private/operatingsystem/Get-CoreOperatingSystems.ps1 @@ -0,0 +1,100 @@ +<#================================================================================= + Get-CoreOperatingSystems + ================================================================================ + - Returns XML content entries from core\operatingsystems as objects + ================================================================================ + .SYNOPSIS + Gets Microsoft catalog operating system entries from XML files. + + .DESCRIPTION + Enumerates all XML files under the module path core\operatingsystems, + parses each File node, and returns the node properties as + PowerShell objects. + + .EXAMPLE + PS C:\> Get-CoreOperatingSystems + Returns all operating system entries from the XML catalogs. + + .NOTES + Author: OSDeploy + Version: 1.0 +=================================================================================#> +function Get-CoreOperatingSystems { + [CmdletBinding()] + [OutputType([pscustomobject[]])] + param () + + $ErrorActionPreference = 'Stop' + $records = @() + + $srcRoot = Join-Path (Get-OSDModulePath) 'core\operatingsystems' + + foreach ($file in (Get-ChildItem -Path $srcRoot -Filter '*.xml' -Recurse -File | Sort-Object FullName)) { + Write-Verbose "[$(Get-Date -Format s)] [$($MyInvocation.MyCommand.Name)] Importing $($file.FullName)" + + $xml = [xml](Get-Content -Path $file.FullName -Raw) + $fileNodes = $xml.MCT.Catalogs.Catalog.PublishedMedia.Files.File + + if (-not $fileNodes) { + continue + } + + foreach ($node in ($fileNodes | Sort-Object FileName, LanguageCode, Edition)) { + $properties = [ordered]@{ + Sha1 = $null + Sha256 = $null + } + + $excludedProperties = @('Edition', 'Key', 'Architecture_Loc', 'ArchitectureLoc', 'Edition_Loc', 'EditionLoc', 'IsRetailOnly') + + foreach ($child in $node.ChildNodes) { + if ($child.NodeType -ne [System.Xml.XmlNodeType]::Element) { + continue + } + + $name = $child.LocalName + $value = $child.InnerText + + if ($name -match '^Sha1$') { + $name = 'Sha1' + } + elseif ($name -match '^Sha256$') { + $name = 'Sha256' + } + + if ($excludedProperties -contains $name) { + continue + } + + if ($properties.Contains($name)) { + if ($name -in @('Sha1', 'Sha256') -or [string]::IsNullOrWhiteSpace($properties[$name])) { + $properties[$name] = $value + } + else { + $suffix = 2 + while ($properties.Contains("$name$suffix")) { + $suffix++ + } + $properties["$name$suffix"] = $value + } + } + else { + $properties[$name] = $value + } + } + + $records += [pscustomobject]$properties + } + } + + $records = $records | + Group-Object -Property FilePath, FileName, LanguageCode, Architecture | + ForEach-Object { + $_.Group | + Sort-Object -Property @{ Expression = { [string]::IsNullOrWhiteSpace($_.Sha256) }; Ascending = $true }, @{ Expression = { [string]::IsNullOrWhiteSpace($_.Sha1) }; Ascending = $true } | + Select-Object -First 1 + } | + Sort-Object -Property FilePath, FileName, LanguageCode, Architecture + + return $records +} diff --git a/Private/operatingsystem/Get-OSDCoreOperatingSystems.ps1 b/Private/operatingsystem/Get-OSDCoreOperatingSystems.ps1 new file mode 100644 index 000000000..326f4dffd --- /dev/null +++ b/Private/operatingsystem/Get-OSDCoreOperatingSystems.ps1 @@ -0,0 +1,186 @@ +<#================================================================================= + Get-OSDCoreOperatingSystems + ================================================================================ + - Retrieves all operating system records from Microsoft catalogs + - Uses Get-CoreOperatingSystems records and extracts OS build, version, + architecture, language, and activation information + - Returns sorted array of operating system objects + ================================================================================ + .SYNOPSIS + Retrieves all operating system records from the OSDCloud catalog + + .DESCRIPTION + Imports operating system metadata from Get-CoreOperatingSystems, + then parses file names and catalog properties to extract OS build + numbers, versions, architecture, language codes, and download + information. + + .PARAMETER None + This function does not accept parameters. + + .EXAMPLE + PS C:\> Get-OSDCoreOperatingSystems + Returns all available operating system records + + .EXAMPLE + PS C:\> Get-OSDCoreOperatingSystems | Where-Object { $_.OSName -eq 'Windows 11' } + Returns only Windows 11 operating systems + + .EXAMPLE + PS C:\> Get-OSDCoreOperatingSystems | Group-Object OperatingSystem + Groups operating systems by major version + + .NOTES + Author: OSDeploy + Version: 1.0 + GitHub: https://github.com/OSDeploy + + .LINK + https://www.osdeploy.com/ +=================================================================================#> +function Get-OSDCoreOperatingSystems { + [CmdletBinding()] + [OutputType([pscustomobject[]])] + param () + $ErrorActionPreference = 'Stop' + $records = @() + + $mctRecords = Get-CoreOperatingSystems + + if (-not $mctRecords) { + return $records + } + + foreach ($node in ($mctRecords | Sort-Object FileName, LanguageCode, Architecture)) { + Write-Verbose "[$(Get-Date -Format s)] [$($MyInvocation.MyCommand.Name)] Processing $($node.FileName)" + + if ([string]::IsNullOrWhiteSpace($node.FileName) -or $node.FileName.Length -lt 5) { + continue + } + #================================================= + # OSBuild + # Get the OSBuild from the FileName + $OSBuild = $node.FileName.Substring(0, 5) + #================================================= + # OperatingSystem / OSName / OSVersion + # 19045 = Windows 10 22H2 + # 22000 = Windows 11 21H2 + # 22621 = Windows 11 22H2 + # 22631 = Windows 11 23H2 + # 26100 = Windows 11 24H2 + # 26200 = Windows 11 25H2 + # 28000 = Windows 11 26H1 + switch ($OSBuild) { + '19045' { $OSName = 'Windows 10'; $OSVersion = '22H2' } + '22000' { $OSName = 'Windows 11'; $OSVersion = '21H2' } + '22621' { $OSName = 'Windows 11'; $OSVersion = '22H2' } + '22631' { $OSName = 'Windows 11'; $OSVersion = '23H2' } + '26100' { $OSName = 'Windows 11'; $OSVersion = '24H2' } + '26200' { $OSName = 'Windows 11'; $OSVersion = '25H2' } + '28000' { $OSName = 'Windows 11'; $OSVersion = '26H1' } + default { continue } + } + #================================================= + # OSBuildVersion + # Combination of . + # Extract from FileName + #================================================= + $fileNameParts = $node.FileName -split '\.' + if ($fileNameParts.Count -lt 2) { + continue + } + $OSBuildVersion = "$($fileNameParts[0]).$($fileNameParts[1])" + #================================================= + # OSArchitecture + # Avoids confusion between x64 releases (amd64/arm64) + #================================================= + if ($node.Architecture -match 'x64') { + $OSArchitecture = 'x64' + } elseif ($node.Architecture -match 'arm64') { + $OSArchitecture = 'arm64' + } else { + $OSArchitecture = 'x86' + continue + } + #================================================= + # OSActivation + #================================================= + if ($node.FileName -match 'clientconsumer_ret') { + $OSActivation = 'Retail' + } + elseif ($node.FileName -match 'CLIENTBUSINESS_VOL') { + $OSActivation = 'Volume' + } + else { + $OSActivation = 'Unknown' + continue + } + #================================================= + # Win10 / Win11 + #================================================= + if ($OSName -eq 'Windows 10') { + $Win10 = $true + $Win11 = $false + } + elseif ($OSName -eq 'Windows 11') { + $Win10 = $false + $Win11 = $true + } + else { + $Win10 = $false + $Win11 = $false + } + #================================================= + # OSD Module Properties + #================================================= + # DisplayName should be in the format "Win11-25H2-amd64" + $DisplayName = "$OSName $OSVersion $OSArchitecture $($node.LanguageCode) $OSActivation $OSBuildVersion" + #================================================= + # ObjectProperties + #================================================= + <# + Status : + ReleaseDate : 2023-12-04 + Name : Windows 10 22H2 x64 ar-sa Retail 19045.3803 + Version : Windows 10 + ReleaseID : 22H2 + Architecture : x64 + Language : ar-sa + Activation : Retail + Build : 19045.3803 + FileName : 19045.3803.231204-0204.22h2_release_svc_refresh_CLIENTCONSUMER_RET_x64FRE_ar-sa.esd + ImageIndex : + ImageName : + Url : http://dl.delivery.mp.microsoft.com/filestreamingservice/files/39d366c6-bb66-4938-9a78-0670eda8304d/19045.3803.231204-0204.22h2_release_svc_refresh_CLIENTCONSUMER_RET_x64FRE_ar-sa.esd + SHA1 : 2119ef0efd432f98cdccdf525cd17fcceacef111 + UpdateID : + Win10 : True + Win11 : False + #> + + $records += [pscustomobject]@{ + Status = $null + ReleaseDate = $null + Name = $DisplayName + Version = $OSName + ReleaseID = $OSVersion + Architecture = $OSArchitecture + Language = $node.LanguageCode + Activation = $OSActivation + Build = $OSBuildVersion + FileName = $node.FileName + ImageIndex = $node.ImageIndex + ImageName = $node.ImageName + Url = $node.FilePath + SHA1 = $node.Sha1 + SHA256 = $node.Sha256 + UpdateID = $node.UpdateID + Win10 = $Win10 + Win11 = $Win11 + } + } + + $records = $records | Sort-Object -Property Url -Unique + $records = $records | Sort-Object -Property Name + return $records +} diff --git a/Projects/OSDCloudAzure/App.config b/Projects/OSDCloudAzure/App.config deleted file mode 100644 index 974fa98b0..000000000 --- a/Projects/OSDCloudAzure/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/Projects/OSDCloudDev/App.config b/Projects/OSDCloudDev/App.config deleted file mode 100644 index 4bfa00561..000000000 --- a/Projects/OSDCloudDev/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Projects/OSDCloudGUI/App.config b/Projects/OSDCloudGUI/App.config deleted file mode 100644 index 4bfa00561..000000000 --- a/Projects/OSDCloudGUI/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Projects/OSDCloudGUI/MainWindow.ps1 b/Projects/OSDCloudGUI/MainWindow.ps1 index a47fb53c5..2cc1888c0 100644 --- a/Projects/OSDCloudGUI/MainWindow.ps1 +++ b/Projects/OSDCloudGUI/MainWindow.ps1 @@ -7,20 +7,20 @@ $Global:MediaResources = Get-ChildItem -Path "$PSScriptRoot\Media" -ErrorAction # This class allows the synchronized hashtable to be available across threads, # but also passes a couple of methods along with it to do GUI things via the # object's dispatcher. -class SyncClass +class SyncClass { #Hashtable containing all forms/windows and controls - automatically created when newing up - [hashtable]$SyncHash = [hashtable]::Synchronized(@{}) - + [hashtable]$SyncHash = [hashtable]::Synchronized(@{}) + # method to close the window - pass window name - [void]CloseWindow($windowName){ - $this.SyncHash.$windowName.Dispatcher.Invoke([action]{$this.SyncHash.$windowName.Close()},"Normal") - } - - # method to update GUI - pass object name, property and value - [void]UpdateElement($object,$property,$value){ - $this.SyncHash.$object.Dispatcher.Invoke([action]{ $this.SyncHash.$object.$property = $value },"Normal") - } + [void]CloseWindow($windowName){ + $this.SyncHash.$windowName.Dispatcher.Invoke([action]{$this.SyncHash.$windowName.Close()},"Normal") + } + + # method to update GUI - pass object name, property and value + [void]UpdateElement($object,$property,$value){ + $this.SyncHash.$object.Dispatcher.Invoke([action]{ $this.SyncHash.$object.$property = $value },"Normal") + } } $Global:SyncClass = [SyncClass]::new() # create a new instance of this SyncClass to use. @@ -39,7 +39,7 @@ foreach($dll in $resources) { [System.Reflection.Assembly]::LoadFrom("$($dll.Ful $xp = '[^a-zA-Z_0-9]' # All characters that are not a-Z, 0-9, or _ $vx = @() # An array of XAML files loaded -foreach($x in $XAML) { +foreach($x in $XAML) { # Items from XAML that are known to cause issues # when PowerShell parses them. $xamlToRemove = @( @@ -51,10 +51,10 @@ foreach($x in $XAML) { $xaml = Get-Content $x.FullName # Load XAML $xaml = $xaml -replace "x:N",'N' # Rename x:Name to just Name (for consumption in variables later) foreach($xtr in $xamlToRemove){ $xaml = $xaml -replace $xtr } # Remove items from $xamlToRemove - + # Create a new variable to store the XAML as XML New-Variable -Name "xaml$(($x.BaseName) -replace $xp, '_')" -Value ($xaml -as [xml]) -Force - + # Add XAML to list of XAML documents processed $vx += "$(($x.BaseName) -replace $xp, '_')" } @@ -78,20 +78,20 @@ if($MediaResources.Count -gt 0){ $xml.DocumentElement.SetAttribute("xmlns:sys","clr-namespace:System;assembly=System") # if the document doesn't already have a "Window.Resources" create it - if($null -eq ($xml.DocumentElement.'Window.Resources')){ - $fragment = "" + if($null -eq ($xml.DocumentElement.'Window.Resources')){ + $fragment = "" $fragment += "" } - + # Add each StaticResource with the key of the base name and source to the full name foreach($sr in $MediaResources) { $srname = "$($sr.BaseName -replace $xp, '_')$($sr.Extension.Substring(1).ToUpper())" #convert name to basename + Uppercase Extension if($sr.Extension -in $imageFileTypes){ $fragment += "" } - if($sr.Extension -in $avFileTypes){ + if($sr.Extension -in $avFileTypes){ $uri = [System.Uri]::new($sr.FullName) - $fragment += "$uri" - } + $fragment += "$uri" + } } # if the document doesn't already have a "Window.Resources" close it @@ -181,7 +181,7 @@ foreach($x in $vx) ## Yo dawg... Runspace to clean up Runspaces ## Thank you Boe Prox / Stephen Owen #region RSCleanup -$Script:JobCleanup = [hashtable]::Synchronized(@{}) +$Script:JobCleanup = [hashtable]::Synchronized(@{}) $Script:Jobs = [system.collections.arraylist]::Synchronized((New-Object System.Collections.ArrayList)) #hashtable to store all these runspaces $jobCleanup.Flag = $True #cleanup jobs $newRunspace =[runspacefactory]::CreateRunspace() #create a new runspace for this job to cleanup jobs to live @@ -192,14 +192,14 @@ $newRunspace.SessionStateProxy.SetVariable("jobCleanup",$jobCleanup) #pass the j $newRunspace.SessionStateProxy.SetVariable("jobs",$jobs) #pass the jobs variable to the runspace $jobCleanup.PowerShell = [PowerShell]::Create().AddScript({ #Routine to handle completed runspaces - Do { - Foreach($runspace in $jobs) { + Do { + Foreach($runspace in $jobs) { If ($runspace.Runspace.isCompleted) { #if runspace is complete [void]$runspace.powershell.EndInvoke($runspace.Runspace) #then end the script $runspace.powershell.dispose() #dispose of the memory $runspace.Runspace = $null #additional garbage collection $runspace.powershell = $null #additional garbage collection - } + } } #Clean out unused runspace jobs $temphash = $jobs.clone() @@ -207,12 +207,12 @@ $jobCleanup.PowerShell = [PowerShell]::Create().AddScript({ $_.runspace -eq $Null } | ForEach { $jobs.remove($_) - } - Start-Sleep -Seconds 1 #lets not kill the processor here + } + Start-Sleep -Seconds 1 #lets not kill the processor here } while ($jobCleanup.Flag) }) $jobCleanup.PowerShell.Runspace = $newRunspace -$jobCleanup.Thread = $jobCleanup.PowerShell.BeginInvoke() +$jobCleanup.Thread = $jobCleanup.PowerShell.BeginInvoke() #endregion RSCleanup #This function creates a new runspace for a script block to execute @@ -222,9 +222,9 @@ $jobCleanup.Thread = $jobCleanup.PowerShell.BeginInvoke() function Start-BackgroundScriptBlock($scriptBlock){ $newRunspace =[runspacefactory]::CreateRunspace() $newRunspace.ApartmentState = "STA" - $newRunspace.ThreadOptions = "ReuseThread" + $newRunspace.ThreadOptions = "ReuseThread" $newRunspace.Open() - $newRunspace.SessionStateProxy.SetVariable("SyncClass",$SyncClass) + $newRunspace.SessionStateProxy.SetVariable("SyncClass",$SyncClass) $PowerShell = [PowerShell]::Create().AddScript($scriptBlock) $PowerShell.Runspace = $newRunspace $PowerShell.BeginInvoke() @@ -289,8 +289,8 @@ if ($Manufacturer -match "HP" -or $Manufacturer -match "Hewlett-Packard"){ if ($Manufacturer -match "Microsoft"){ if ($Model -eq "Virtual Machine"){ $HyperV = $true - } -} + } +} if ($HPEnterprise){ Install-ModuleHPCMSL @@ -301,18 +301,18 @@ if ($HPEnterprise){ catch { $BIOS = 'Skip' } - + $formMainWindowControlManufacturerFunction.Header = "HP Functions" $formMainWindowControlManufacturerFunction.Visibility = 'Visible' $formMainWindowControlOption_Name_1.Header = "HPIA Drivers - Adds approx 20 minutes" - $formMainWindowControlOption_Name_1.IsChecked = $Global:OSDCloudGUI.HPIADrivers + $formMainWindowControlOption_Name_1.IsChecked = $Global:OSDCloudGUI.HPIADrivers $formMainWindowControlOption_Name_2.Header = "HPIA Firmware - Adds approx 5 minutes" - $formMainWindowControlOption_Name_2.IsChecked = $Global:OSDCloudGUI.HPIAFirmware + $formMainWindowControlOption_Name_2.IsChecked = $Global:OSDCloudGUI.HPIAFirmware $formMainWindowControlOption_Name_3.Header = "HPIA Software - Adds approx 10 minutes" - $formMainWindowControlOption_Name_3.IsChecked = $Global:OSDCloudGUI.HPIASoftware + $formMainWindowControlOption_Name_3.IsChecked = $Global:OSDCloudGUI.HPIASoftware $formMainWindowControlOption_Name_4.Header = "HPIA All Options - Adds approx 25 minutes" - $formMainWindowControlOption_Name_4.IsChecked = $Global:OSDCloudGUI.HPIAALL + $formMainWindowControlOption_Name_4.IsChecked = $Global:OSDCloudGUI.HPIAALL if ($TPM -eq $false){ $formMainWindowControlOption_Name_5.Header = "HP TPM Firmware Already Current" $formMainWindowControlOption_Name_5.IsEnabled = $false @@ -320,7 +320,7 @@ if ($HPEnterprise){ else{ $formMainWindowControlOption_Name_5.Visibility = 'Visible' $formMainWindowControlOption_Name_5.Header = "HP Update TPM Firmware: $TPM" - $formMainWindowControlOption_Name_5.IsChecked = $Global:OSDCloudGUI.HPTPMUpdate + $formMainWindowControlOption_Name_5.IsChecked = $Global:OSDCloudGUI.HPTPMUpdate } if ($BIOS -eq $true){ $CurrentVer = Get-HPBIOSVersion @@ -332,7 +332,7 @@ if ($HPEnterprise){ $CurrentVer = Get-HPBIOSVersion $formMainWindowControlOption_Name_6.Visibility = 'Visible' $formMainWindowControlOption_Name_6.Header = "HP Update System Firmwware from $CurrentVer to $LatestVer" - $formMainWindowControlOption_Name_6.IsChecked = $Global:OSDCloudGUI.HPBIOSUpdate + $formMainWindowControlOption_Name_6.IsChecked = $Global:OSDCloudGUI.HPBIOSUpdate } elseif ($BIOS -eq "Skip"){ $formMainWindowControlOption_Name_6.Header = "Unable to Determine HP BIOS Info, Skipping Firmware Update" @@ -340,10 +340,10 @@ if ($HPEnterprise){ } else { $formMainWindowControlOption_Name_6.Header = "Unable to Determine HP BIOS Info" - $formMainWindowControlOption_Name_6.IsEnabled = $false + $formMainWindowControlOption_Name_6.IsEnabled = $false } # When HPIA All is selected, unselect Firmware & Software - + #If HPIA All is selected, deselect other options $formMainWindowControlOption_Name_4.add_Checked({$formMainWindowControlOption_Name_1.IsChecked = $false}) $formMainWindowControlOption_Name_4.add_Checked({$formMainWindowControlOption_Name_2.IsChecked = $false}) @@ -357,7 +357,7 @@ if ($HPEnterprise){ elseif ($HyperV){ $formMainWindowControlManufacturerFunction.Header = "HyperV Functions" - $formMainWindowControlManufacturerFunction.Visibility = 'Visible' + $formMainWindowControlManufacturerFunction.Visibility = 'Visible' $formMainWindowControlOption_Name_1.Header = "Set PC Name to HyperV VM Name" $formMainWindowControlOption_Name_1.IsChecked = $false $formMainWindowControlOption_Name_2.Header = "Eject CD ISO" @@ -371,22 +371,22 @@ else{ $formMainWindowControlManufacturerFunction.Visibility = 'Hidden' $formMainWindowControlManufacturerFunction.IsEnabled = $false $formMainWindowControlOption_Name_1.IsChecked = $false - #$formMainWindowControlOption_Name_1.IsEnabled = $false + #$formMainWindowControlOption_Name_1.IsEnabled = $false #$formMainWindowControlOption_Name_1.Visibility = "Hidden" $formMainWindowControlOption_Name_2.IsChecked = $false - #$formMainWindowControlOption_Name_2.IsEnabled = $false + #$formMainWindowControlOption_Name_2.IsEnabled = $false #$formMainWindowControlOption_Name_2.Visibility = "Hidden" $formMainWindowControlOption_Name_3.IsChecked = $false - #$formMainWindowControlOption_Name_3.IsEnabled = $false + #$formMainWindowControlOption_Name_3.IsEnabled = $false #$formMainWindowControlOption_Name_3.Visibility = "Hidden" $formMainWindowControlOption_Name_4.IsChecked = $false - #$formMainWindowControlOption_Name_4.IsEnabled = $false + #$formMainWindowControlOption_Name_4.IsEnabled = $false #$formMainWindowControlOption_Name_4.Visibility = "Hidden" $formMainWindowControlOption_Name_5.IsChecked = $false - #$formMainWindowControlOption_Name_5.IsEnabled = $false + #$formMainWindowControlOption_Name_5.IsEnabled = $false #$formMainWindowControlOption_Name_5.Visibility = "Hidden" $formMainWindowControlOption_Name_6.IsChecked = $false - #$formMainWindowControlOption_Name_6.IsEnabled = $false + #$formMainWindowControlOption_Name_6.IsEnabled = $false #$formMainWindowControlOption_Name_6.Visibility = "Hidden" } #> @@ -398,7 +398,6 @@ else{ #================================================ # Menu Options - Deployment Options #================================================ -$formMainWindowControlcaptureScreenshots.IsChecked = $Global:OSDCloudGUI.captureScreenshots $formMainWindowControlClearDiskConfirm.IsChecked = $Global:OSDCloudGUI.ClearDiskConfirm $formMainWindowControlrestartComputer.IsChecked = $Global:OSDCloudGUI.restartComputer #================================================ @@ -504,7 +503,7 @@ $CustomImageChildItem = @() [array]$CustomImageChildItem += Find-OSDCloudFile -Name '*.esd' -Path '\OSDCloud\OS\' [array]$CustomImageChildItem += Find-OSDCloudFile -Name '*install.swm' -Path '\OSDCloud\OS\' $CustomImageChildItem = $CustomImageChildItem | Sort-Object -Property Length -Unique | Sort-Object FullName | Where-Object {$_.Length -gt 2GB} - + if ($CustomImageChildItem) { $OSDCloudOperatingSystem = Get-OSDCloudOperatingSystems $CustomImageChildItem = $CustomImageChildItem | Where-Object {$_.Name -notin $OSDCloudOperatingSystem.FileName} @@ -529,8 +528,8 @@ if ($AutopilotJsonChildItem) { $formMainWindowControlAutopilotJsonCombobox.SelectedIndex = 1 } else { - $formMainWindowControlAutopilotJsonLabel.Visibility = "Collapsed" - $formMainWindowControlAutopilotJsonCombobox.Visibility = "Collapsed" + $formMainWindowControlAutopilotJsonLabel.Visibility = "Collapsed" + $formMainWindowControlAutopilotJsonCombobox.Visibility = "Collapsed" } #================================================ # OOBEDeployCombobox @@ -547,8 +546,8 @@ if ($OOBEDeployJsonChildItem) { $formMainWindowControlOOBEDeployCombobox.SelectedIndex = 1 } else { - $formMainWindowControlOOBEDeployLabel.Visibility = "Collapsed" - $formMainWindowControlOOBEDeployCombobox.Visibility = "Collapsed" + $formMainWindowControlOOBEDeployLabel.Visibility = "Collapsed" + $formMainWindowControlOOBEDeployCombobox.Visibility = "Collapsed" } #================================================ # AutopilotOOBECombobox @@ -565,8 +564,8 @@ if ($AutopilotOOBEJsonChildItem) { $formMainWindowControlAutopilotOOBECombobox.SelectedIndex = 1 } else { - $formMainWindowControlAutopilotOOBELabel.Visibility = "Collapsed" - $formMainWindowControlAutopilotOOBECombobox.Visibility = "Collapsed" + $formMainWindowControlAutopilotOOBELabel.Visibility = "Collapsed" + $formMainWindowControlAutopilotOOBECombobox.Visibility = "Collapsed" } #================================================ # OS Edition Combobox to ImageIndex @@ -715,12 +714,12 @@ $formMainWindowControlStartButton.add_Click({ if ($formMainWindowControlOSNameCombobox.SelectedValue -like 'Windows 1*') { $OSName = $formMainWindowControlOSNameCombobox.SelectedValue - + $OSDCloudOperatingSystem = Get-OSDCloudOperatingSystems | Where-Object {$_.Name -match $OSName} | Where-Object {$_.Activation -eq $OSActivation} | Where-Object {$_.Language -eq $OSLanguage} $OSBuild = $OSDCloudOperatingSystem.Build $OSReleaseID = $OSDCloudOperatingSystem.ReleaseID $OSVersion = $OSDCloudOperatingSystem.Version - + $ImageFileName = $OSDCloudOperatingSystem.FileName $ImageFileUrl = $OSDCloudOperatingSystem.Url @@ -785,7 +784,6 @@ $formMainWindowControlStartButton.add_Click({ OSNameValues = [array]$Global:OSDCloudGUI.OSNameValues OSReleaseIDValues = [array]$Global:OSDCloudGUI.OSReleaseIDValues OSVersionValues = [array]$Global:OSDCloudGUI.OSVersionValues - captureScreenshots = [System.Boolean]$formMainWindowControlScreenshotCapture.IsChecked ClearDiskConfirm = [System.Boolean]$formMainWindowControlClearDiskConfirm.IsChecked restartComputer = [System.Boolean]$formMainWindowControlRestartComputer.IsChecked updateDiskDrivers = [System.Boolean]$formMainWindowControlupdateDiskDrivers.IsChecked @@ -853,18 +851,6 @@ $formMainWindowControlStartButton.add_Click({ #$Global:InvokeOSDCloud.ClearDiskConfirm = $false } #> - #----------------------------------------- - # Manufacturer Enhancements - END - #----------------------------------------- - if ($formMainWindowControlScreenshotCapture.IsChecked) { - $Params = @{ - Screenshot = $true - } - #Start-OSDCloud @Params - } - else { - #Start-OSDCloud - } #================================================= # Invoke-OSDCloud.ps1 #================================================= @@ -880,7 +866,7 @@ $formMainWindowControlStartButton.add_Click({ #================================================ # Customizations #================================================ -[string]$ModuleVersion = Get-Module -Name OSD | Sort-Object -Property Version | Select-Object -ExpandProperty Version -Last 1 +[System.String]$ModuleVersion = Get-OSDModuleVersion $formMainWindow.Title = "OSDCloudGUI $ModuleVersion on $($Global:OSDCloudGUI.ComputerManufacturer) $($Global:OSDCloudGUI.ComputerModel) product $($Global:OSDCloudGUI.ComputerProduct)" #================================================ # Branding @@ -917,4 +903,4 @@ Hide-PowershellWindow ########################## $jobCleanup.Flag = $false #Stop Cleaning Jobs $jobCleanup.PowerShell.Runspace.Close() #Close the runspace -$jobCleanup.PowerShell.Dispose() #Remove the runspace from memory \ No newline at end of file +$jobCleanup.PowerShell.Dispose() #Remove the runspace from memory diff --git a/Projects/OSDCloudGUI/MainWindow.xaml b/Projects/OSDCloudGUI/MainWindow.xaml index e2d8e6f73..e0d488567 100644 --- a/Projects/OSDCloudGUI/MainWindow.xaml +++ b/Projects/OSDCloudGUI/MainWindow.xaml @@ -125,9 +125,6 @@ - @@ -336,7 +333,7 @@ FontSize="16" Margin="5" Padding="2" - SelectedIndex="1" > + SelectedIndex="0" > @@ -443,7 +440,7 @@ Stroke="Gainsboro" StrokeThickness="1" Stretch="Uniform"> - +