mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-12-22 14:01:31 -06:00
ab384029f1
* initialize Windev branch * Formatting * more Formatting * fix applications * init * remove timer * Compile Winutil * revert winutil.ps1 * revert winutil.ps1 * update Get Winutilvariables to use .where method --------- Co-authored-by: Marterich <Marterich@users.noreply.github.com>
31 lines
783 B
PowerShell
31 lines
783 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 {
|
|
<#I am here so errors don't get outputted for a couple variables that don't have the .GetType() attribute#>
|
|
}
|
|
}
|
|
return $output
|
|
}
|
|
return $keys
|
|
}
|