-
-
Save ChrisTruncer/f3fe3f04b9fdd1310507363f8bdad8be to your computer and use it in GitHub Desktop.
Listing of Writable String type WMI Properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Code based off of - http://www.powershellmagazine.com/2012/09/06/pstip-get-all-writeable-properties-of-a-wmi-class/ | |
$Classes = Get-WMIObject -List | |
$Classes | ForEach-Object { | |
$className = $_.Name | |
$_.Properties | ForEach-Object { | |
foreach ($qualifier in $_.Qualifiers) { | |
if (($qualifier.Name -eq "Write") -and ($_.Type -eq "String")) { | |
$className, $_.Name | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment