Skip to content

Instantly share code, notes, and snippets.

@ChrisTruncer
Last active May 25, 2017 20:11
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ChrisTruncer/f3fe3f04b9fdd1310507363f8bdad8be to your computer and use it in GitHub Desktop.
Save ChrisTruncer/f3fe3f04b9fdd1310507363f8bdad8be to your computer and use it in GitHub Desktop.
Listing of Writable String type WMI Properties
# 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