Month: November 2010

WMI Timer Events in PowerShell using Win32_LocalTime

This is not a part of the WQL series I am doing. I happend to take a look at the WMI timer events while providing feedback to an upcoming (cool) PowerEvents module by Trevor (@pcgeek86). BTW, this module will be released on November 30th. So, watch out for the annoncement. Coming to the subject of this post, in WMI, there are 3 types of events possible. They are Timer events, Intrinsic events, and extrinsic events. My WQL series will soon cover intrinsic and extrensic events. Very few people have written about WMI timer events in the past but this particular post on The SysAdmins blog discusses good amount of details. In today’s post, I am going to write about WMI timer events in PowerShell and how to use Register-WMIEvent cmdlet to create a temporary consumer to consume these events. In general, WMI timer events are generated by WMI infrastructure at a point in time. In the good old days of Windows 2000, we had to capture these by creating an instance of classes derived from the __TimerInstruction class. Also, there are two types of …

SharePoint Saturday India online – PowerShell for SharePoint 2010 administrators – Slides, Q & A

I spoke at SharePoint Saturday India Online event and the topic was “PowerShell for SharePoint 2010 Administrators”. It was originally scheduled to happen at 14.45 PM IST but we had move it to 11.00 AM IST as one of the speakers did not join us. This was my first webcast kinda event and felt a bit weird for not being able to see my audience. This session was meant to be a very quick introduction to PowerShell for SharePoint 2010 administrators and I hope I did a good job at that. Update: Recording of the SPS India sessions will be available at http://alpesh.blip.tv/posts?view=archive&nsfw=dc Here are the slides I used for this session There were a few questions towards the end and we could not take the questions online. So, here you go. Q: Is Get-Help similar to <ScriptName> -Help? Where in the cmdlet we can define the help text? A: No. There is no such thing like <ScriptName> -Help. You can either use Get-Help or just Help. You can include comment based help in your scripts. …

WMI Query Language (WQL) – Event Queries: Introduction

These posts in the form of an ebook now available Here are the links to all articles in this series of posts on WQL. 1. WMI query language – An introduction 2. WMI query language – Keywords and Operators 3. WMI query language – Data Queries: SELECT, FROM, and WHERE 4. WMI query language – Data Queries: Associators Of 5. WMI query language – Data Queries: References Of 6. WMI query language – Event Queries: Introduction (this post) 7. WMI query language – Event Queries: Syntax 8. WMI query language – Event Queries: Intrinsic Events 9. WMI query language – Event Queries: Extrinsic Events 10. WMI query language – Schema queries In this post, I will write a bit about basics of WMI events and how Register-WMIEvent cmdlet can be used. To start with, here is an excerpt from Microsoft Scripting guide that introduces WMI events: Just as there is a WMI class that represents each type of system resource that can be managed using WMI, there is a WMI class that represents each type of WMI …

WMI Query Language (WQL) – Data Queries: References Of

These posts in the form of an ebook now available Here are the links to all articles in this series of posts on WQL. 1. WMI query language – An introduction 2. WMI query language – Keywords and Operators 3. WMI query language – Data Queries: SELECT, FROM, and WHERE 4. WMI query language – Data Queries: Associators Of 5. WMI query language – Data Queries: References Of (this post) 6. WMI query language – Event Queries: Introduction 7. WMI query language – Event Queries: Syntax 8. WMI query language – Event Queries: Intrinsic Events 9. WMI query language – Event Queries: Extrinsic Events 10. WMI query language – Schema queries Per MSDN documentation, the REFERENCES OF statement Retrieves all association instances that refer to a particular source instance. The REFERENCES OF statement is similar to the ASSOCIATORS OF statement in its syntax. However, rather than retrieving endpoint instances, it retrieves the intervening association instances. That is very cryptic for beginners like you and me. So, let us look at an example to understand this. If …

Book review: PowerShell for Microsoft SharePoint 2010 Administrators

Microsoft SharePoint 2010 includes 500+ PowerShell cmdlets to manage the SharePoint products and features. It could be quite intimidating to even think about so many cmdlets and figuring out where to start. This is where this new book by Niklas Goude and Mattias Karlsson comes handy. This is probably the only book available on this topic and I don’t think anything else is in development on the same lines as this book. @Ngoude was kind enough to send a copy of this book. Rating 10/10 Recommendation A must read, task-based guide to using PowerShell for SharePoint 2010 Administration Coming to what is there in the book, this book is divided in to 3 parts. Part 1 gives an introduction to SharePoint 2010, what is new in SharePoint 2010 and then talks about different tools/interfaces available to manage a SharePoint 2010 deployment. Part 2 is where PowerShell for SharePoint gets an introduction. It won’t simply dive in to SharePoint 2010 cmdlets. Instead, the authors take us through some basics of PowerShell scripting and then introduce the …