This blog has moved to http://ThePowerShellGuy.com
Greetings /\/\o\/\/
Fuction to see/Change members of Objects in a Gui.
(a bit as get-member does on the Commandline)
it is a great help exploring MSH for me
some examples of usage :
ov (gi test.txt) -> file properties
ov(new-object system.management.managementclass)<- you can change class from GUI so this is giving you a WMI browser. Look at the difference between the following commands !: (in the latter you don't see the methods, and MSH is taking the instance already) ov(new-object system.management.managementclass("win32_operatingsystem")) ov (get-wmiObject win32_operatingSystem) ov(gps[0]) -> info of first process
ov ($var) -> Info on variable.
ov(dir) -> dir in GUI
gr /\/\o\/\/
#Objectviewer.msh
# will show an Object in a PropertyGrid (propertywindow in Visual Studio)
# this is an easy way to look at MSH objects.
# you can read / write the object properties.
# and it has some nice editors for some properties
# eg. ov (gi test.txt)will let you change the date by a calendarview
# /\/\o\/\/ 2005
[void][System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms")
function ObjectViewer {
$form = new-object "System.Windows.Forms.Form"
$form.Size = new-object System.Drawing.Size @(600,600)
$PG = new-object "System.Windows.Forms.PropertyGrid"
$PG.Dock = [System.Windows.Forms.DockStyle]::Fill
$form.text = "$args"
$PG.selectedobject = $args[0].mshObject.baseobject
$form.Controls.Add($PG)
$form.topmost = $true
$form.showdialog()
}
set-Alias OV ObjectViewer