Chapter 5 – user accounts (local and AD) is now available on MEAP – http://www.manning.com/siddaway/ Share this post : Technorati Tags: PowerShell
Archive for September, 2008
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 simpler if we used the -property parameter on get-wmiobject but that also displays the WMI […]
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:\Windows\system32Organization :BuildNumber : 6001RegisteredUser : adminSerialNumber : 55041-037-8508545-71489Version : 6.0.6001 This doesn’t give us everything we might wish for. The default formatter is a play here in that […]
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 investigate the pointing devices try Listing 8.4 Get-WmiObject -Class Win32_PointingDevice | Select HardwareType, NumberofButtons, Status, […]
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, Name, PrimaryBIOS, ReleaseDate, SerialNumber, SMBIOSBIOSVersion, SMBIOSMajorVersion, SMBIOSMinorVersion, SMBIOSPresent, Status, Version, BiosCharacteristics Using the Win32_Bios class […]
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 computer systems. In these examples we are working with the local machine but we can […]
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 : Technorati Tags: PowerShell,SQL Server
WMI has a class Win32_Directory for working with folders on a machine. We can use this class to find all folders created this month. Listing 6.22 $d = "’" + (Get-WmiObject -Class Win32_Directory -Filter "name=’c:\\’").ConvertFromdateTime([datetime]"09/01/2008") + "’"Get-WmiObject -Class Win32_Directory -Filter "CreationDate > $d" | Select Name, CreationDate We start by creating a date in WMI […]
The WMI section of the scripting guide gives a very simple method of determining the time zone on your machine Listing 6.20 Get-WmiObject Win32_TimeZone | Format-List Bias : 0SettingID : Caption : (GMT) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London Bias returns the offset from GMT and the caption returns the time zone. Information […]
Sapien are running a poll – http://blog.sapien.com/index.php/2008/09/23/powershell-production-poll/ – asking if you are using PowerShell in production. It may be a self selecting group that is answering but the results are interesting and pleasing Share this post : Technorati Tags: PowerShell
Categories
- .NET
- Active Directory
- Architecture
- Azure
- Bash
- BITS
- Books
- CDXML
- CIM
- Cloud
- COM
- Containers
- Deep Dive
- Desired State Configuration
- DevOps
- DHCP
- DNS
- DSC
- European Summit
- Events
- Exchange
- File System
- Firewall
- General
- General IT Matters
- Hyper-V
- IIS
- Infrastructure
- IT Community
- IT Security
- Learning PowerShell
- Linux
- Math
- Microsoft
- Modules
- Nano Server
- Networking
- Office 2010
- Office 2013
- Open Source
- Opinion
- Outlook
- Philosophy
- PowerShell
- PowerShell 7
- PowerShell and .NET
- PowerShell and Active Directory
- PowerShell and CIM
- PowerShell and Exchange 2007
- PowerShell and IIS
- PowerShell and SQL Server
- PowerShell and WMI
- PowerShell Basics
- PowerShell original
- PowerShell Summit
- PowerShell User Group
- PowerShell User Group 2
- PowerShell v2
- PowerShell V3
- PowerShell v4
- PowerShell v5
- PowerShell v6
- PowerShell.org
- PowerShellGet
- PowerShellV2
- PSAM
- Rant
- Registry
- Scripting
- Scripting Games
- Scripting Games 2104
- Security
- SQL Server
- Storage
- Strings
- Summit
- Technology
- Uncategorized
- Virtualization
- Windows 10
- Windows 2012 R2
- Windows 7
- Windows 8
- Windows 8 Server
- Windows 8.1
- Windows Server
- Windows server 1709
- Windows Server 2008
- Windows Server 2008 R2
- Windows Server 2012
- Windows Server 2012 R2
- Windows Server 2016
- Windows Server 2019
- WMFv5
- WPF
- WSUS