mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2026-08-09 17:41:14 +10:00
* Clean up analyzer warnings * Align analyzer warning cleanup policy * Run PSScriptAnalyzer directly in unittests workflow * Bind lazy-rendered buttons to click handlers * Remove WinUtil performance tracing * Fix Win11 ISO creator temp directory reuse
31 lines
686 B
PowerShell
31 lines
686 B
PowerShell
function Get-WinUtilVariables {
|
|
|
|
<#
|
|
.SYNOPSIS
|
|
Gets every form object of the provided type
|
|
|
|
.OUTPUTS
|
|
List containing every object that matches the provided type
|
|
#>
|
|
param (
|
|
[Parameter()]
|
|
[string[]]$Type
|
|
)
|
|
$keys = ($sync.keys).where{ $_ -like "WPF*" }
|
|
if ($Type) {
|
|
$output = $keys | ForEach-Object {
|
|
try {
|
|
$objType = $sync["$psitem"].GetType().Name
|
|
if ($Type -contains $objType) {
|
|
Write-Output $psitem
|
|
}
|
|
}
|
|
catch {
|
|
$null = $_
|
|
}
|
|
}
|
|
return $output
|
|
}
|
|
return $keys
|
|
}
|