Display: Cloud | List
Most Popular Tags
Results (70 total) All > powershell (x) > code (x) > wmi (x)
Sample 1 - Recoded in PowerShell (SWbemDateTime object (Windows))
<#.SYNOPSIS This script gets/displays the Sysgtem Uptime after converting it from WEBM time/date format .DESCRIPTION This script creates an instance of a SWbemDateTime object, gets the OS intall date and converts the date to a more useful format.NOTES File Name : Get-OSInstallDate.ps1 Author : Thomas Lee - tfl@psp.co.uk Requires : PowerShell Version 2.0.LINK T
Last modified by Thomas Lee on 10/11/2011 9:14:24 PM
Tags:  code  powershell  wmi
Sample Event Handler Using PowerShell (Receiving a WMI Event (Windows))
<#.SYNOPSIS This script registers for a WMI event.DESCRIPTION This script used PowerShell to register for then display an event. This script is a re-write on an MSDN Sample..NOTES File Name : Register-Event1.ps1 Author : Thomas Lee - tfl@psp.co.uk Requires : PowerShell Version 2.0.LINK This script posted to: http://www.pshscripts.blogspot.com MSDN sample po
Last modified by Thomas Lee on 10/7/2011 8:14:02 AM
Tags:  code  event  powershell  wmi
Rename Computer using WMI - Sample in PowerShell (WMI Tasks: Accounts and Domains (Windows))
<#.SYNOPSIS This script renames a computer using WMI..DESCRIPTION This script uses the Rename method from Win32_OperatingSystem WMI class. This is sample 5 from http://msdn.microsoft.com/en-us/library/aa394586.NOTES File Name : Set-ComputerName.ps1 Author : Thomas Lee - tfl@psp.co.uk Requires : PowerShell Version 2.0.LINK This script posted to: http://www.
Last modified by Thomas Lee on 9/25/2011 7:03:57 PM
Remove a registry Key - Using PowerShell (WMI Tasks: Registry (Windows))
<#.SYNOPSIS This script creates removes registry key using WMI..DESCRIPTION This script uses WMI to get remove registry key. THis script deletes the key and everything below it in the registry - use carefully!.NOTES File Name : Remove-WmiRegistryKey.ps1 Author : Thomas Lee - tfl@psp.co.uk Requires : PowerShell Version 2.0.LINK This script posted to: http:/
Last modified by Thomas Lee on 9/9/2011 10:40:06 AM
<#.SYNOPSIS This script Gets and displays a registry binary value using WMI..DESCRIPTION This script uses WMI to get, then display a binary registry Value. This is a re-write of a VB Sample Script..NOTES File Name : Set-WmiRegistryBinaryValue.ps1 Author : Thomas Lee - tfl@psp.co.uk Requires : PowerShell Version 2.0.LINK This script posted to: http://www.
Last modified by Thomas Lee on 9/8/2011 11:49:07 PM
<#.SYNOPSIS This script sets a registry binary value using WMI..DESCRIPTION This script uses WMI to set a binary registry Value. This is a re-write of a VB Sample Script..NOTES File Name : Set-WmiRegistryBinaryValue.ps1 Author : Thomas Lee - tfl@psp.co.uk Requires : PowerShell Version 2.0.LINK This script posted to: http://www.pshscripts.blogspot.com
Last modified by Thomas Lee on 9/8/2011 11:36:40 PM
<#.SYNOPSIS This script creates a new registry Value using WMI..DESCRIPTION This script uses WMI to get create a new registry Value. This is a re-write of a VB Sample Script.NOTES File Name : New-RegistryKey.ps1 Author : Thomas Lee - tfl@psp.co.uk Requires : PowerShell Version 2.0.LINK This script posted to: http://www.pshscripts.blogspot.com MSDN sample po
Last modified by Thomas Lee on 9/8/2011 11:05:28 PM
Tags:  code  powershell  stdregprov  wmi
How to retrieve all namespaces in PowerShell (__Namespace class (Windows))
get-wmiobject __namespace -namespace 'root' -list -recurse | format-table __namespace
Last modified by Thomas Lee on 10/10/2010 10:29:08 AM
Tags:  __namespace  code  powershell  wmi
Sample Script - Using PowerShell (__Namespace class (Windows))
Further to Radjin's post, I recently wrote a similar script. See:http://gallery.technet.microsoft.com/ScriptCenter/en-us/890ff802-9db2-4d25-aa13-4a2b22fe5db3 or http://pshscripts.blogspot.com/2010/10/get-wminamespaceps1.htmlMy script tidies up the list (sorting it by namespace name) and formats using a hash table for a nicer column heading.
Last modified by Thomas Lee on 10/10/2010 10:28:47 AM
Powershell example (GetSummaryInformation method of the Msvm_VirtualSystemManagementService class)
function Get-VirtualSystemManagementService { return gwmi -class "Msvm_VirtualSystemManagementService" -namespace "root\virtualization"}function Get-VirtualMachine([string] $Name=""){ $query = "select * from Msvm_ComputerSystem where ElementName='" + $Name + "'" return gwmi -namespace "root\virtualization" -query $query}function Get-VirtualMachineSettingData([string] $Name=""){ $vi
Last modified by Thomas Lee on 9/20/2010 12:10:35 PM
Tags:  code  hyperv  powershell  wmi
Page view tracker