Monthly Archives: September 2008

PowerShell in Practice

Chapter 5 – user accounts (local and AD) is now available on MEAP – http://www.manning.com/siddaway/   Share this post :   Technorati Tags: PowerShell   Advertisements

Posted in Powershell | Leave a comment

W2KSG: Service Pack

Continuing our look at Operating Systems – what about Service Pack information Listing 8.8 Get-WmiObject -Class Win32_OperatingSystem | Format-List ServicePackMajorVersion, ServicePackMinorVersion In this one I’m using Format-List to perform the selection as well as the display.  We could make it … Continue reading

Posted in PowerShell and WMI | Leave a comment

W2KSG: Operating System

The other area we have to dig into when inventorying systems is the OS.  WMI has a class just for this PS> Get-WmiObject -Class Win32_OperatingSystem SystemDirectory : C:Windowssystem32Organization    :BuildNumber     : 6001RegisteredUser  : adminSerialNumber    : 55041-037-8508545-71489Version         : 6.0.6001 This doesn’t give … Continue reading

Posted in PowerShell and WMI | Leave a comment

W2KSG: Inventory Hardware

Most of the hardware connected to your system has a matching WMI class – cd, sound, keyboard, network adapter, printers and usb for example.  To find the appropriate WMI classes use Get-WmiObject -List *networkadapter Or similar If you want to … Continue reading

Posted in PowerShell and WMI | Leave a comment

W2KSG: BIOS Information

Previously we looked at retrieving computer system information using WMI.  We looked at the BIOS information in passing.  There is a lot more information held in the BIOS Listing 8.2 Get-WmiObject -Class Win32_Bios | Select -Property BuildNumber, CurrentLanguage, InstallableLanguages, Manufacturer, … Continue reading

Posted in PowerShell and WMI | Leave a comment

W2KSG: Retrieving System Information

I am going to jump on a bit in the Scripting Guide and skip to chapter 8 – Computer Assets.  (Chapter 7 is working with AD which we will return to later). Chapter 8 uses WMI to work with your … Continue reading

Posted in PowerShell and WMI | Leave a comment

PowerShell reading SQL Server logs

Thanks to Dmitry – http://dmitrysotnikov.wordpress.com/2008/09/26/more-sql-cmdlets/ –  and Jacob – http://mspowershell.blogspot.com/2008/09/read-transactionlog-of-sql-server-from.html – for pointing out the PowerShell cmdlets in Quest’s SQL Lite Speed.  You can read the transaction log!! Download a trial version from http://www.quest.com/litespeed-for-sql-server/   Share this post :   … Continue reading

Posted in PowerShell and SQL Server | Leave a comment