How to find expired certificates

May 31, 2009

Windows PowerShell  provides access to X509 certificate stores and digital certificates through the Certificate provider (more on providers). The following example shows how we can get a list of certificates from the CurrentUser Root store. Here’s a list of properties of the first certificate: PS > $certs = dir cert:\CurrentUser\Root PS > $certs | Format-List * PSPath : Microsoft.PowerShell.Security\Certificate::CurrentUser\Roo t\CDD4EEAE6000AC7F40C3802C171E30148030C072 PSParentPath : Microsoft.PowerShell.Security\Certificate::CurrentUser\Roo ...
6 comments

2009 Summer Scripting Games

May 17, 2009

Mark your calendars! The 2009 Summer Scripting Games will take place on June 15–26, 2009 and will be hosted by PowerShellCommunity.org and PoshCode.org. The Scripting Games are a chance for IT pros to practice and test their scripting skills during 10 events, using either Microsoft Windows PowerShell or Microsoft VBScript. The Scripting Games begin as a live event with contestants submitting entries in a beginning or advanced division that are judged and scored by the community. "We are looking forward to the Scripting Games and being part of the community in helping 1,000 or...
one comment

Upcoming Webcast: Exchange 2010 Management Tools (Level 300)

May 16, 2009

Exchange 2010 includes new capabilities that make the operation of your Exchange environment more efficient.  Learn how we’ve made the Exchange Management Console more powerful, extended the reach of PowerShell, and made it easier to delegate management tasks. You can register HERE.     Presenter: Evan Dodds, US-Exchange Shared PM, Microsoft Corporation. Start Date: Monday, June 08, 2009 1:00 PM Pacific Time (US & Canada)

Running PowerShell 1.0 and 2.0 on the same machine

May 12, 2009

Windows XP Mode (XPM) for Windows 7 makes it easy to install and run many of your Windows XP productivity applications directly from a Windows 7 based PC. It utilizes virtualization technology such as Windows Virtual PC to provide a Virtual Windows XP environment for Windows 7. Windows XP Mode provides a 32-bit Windows XP Professional Service Pack 3 (SP3) environment pre-loaded on a virtual hard disk. In this post I’ll demonstrate how to install, publish and launch PowerShell 1.0 side by side with PowerShell 2.0 which is already a part of Windows 7. First, you need...
6 comments

PowerShell Toolbar (updated)

Last year I blogged about the PowerShell Toolbar. Since than the toolbar was downloaded more than 850 times. I would like to thanks all the people who used it and still are, your comments have helped me a lot in improving it. Again, if you feel I missed something or someone, please leave a comment or send me an email through the contact section of this blog or through the toolbar itself. Here are the latest improvements and changes. You can download the toolbar HERE.  Search   When you click the little down arrow you’ll find a new search option ‘PowerShell...

Show or hide your desktop icons with PowerShell

May 11, 2009

I was reading through James' blog post and remembered that I wrote a script some time ago to show or hide desktop icons. The script requires PowerShell 2.0 and shows how you can access WIN32 APIs.#requires -Version 2.0 $signature = @"   public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);    public static extern bool ShowWindow(IntPtr hWnd,int nCmdShow); "@ $icons = Add-Type -MemberDefinition $signature -Name Win32Window `          -Namespace ScriptFanatic.WinAPI -passThru $hWnd=$icons::FindWindow("Progman","Program Manager") function Hide-DesktopIcons{$null = $icons::ShowWindow($hWnd,0) } function Show-DesktopIcons{$null = $icons::ShowWindow($hWnd,5) } How to use it Save the code in script file, say 'Set-DesktopIcons.ps1' and load it via...
one comment

How to send Twitter direct messages from PowerShell

May 10, 2009

This function sends a direct message (DM) from your Twitter account to another Twitter user, notice that you can only send a direct message to a person who follows you. function Send-DirectTweet($Recipient,$Message,$UserName,$Password){    $url="http://twitter.com/direct_messages/new.xml?user=$Recipient&text=$Message"    $request = ::Create($url)    $request.credentials= New-Object System.Net.NetworkCredential($UserName,$Password)    $request.method= "POST"    $request.contentType = "application/x-www-form-urlencoded"    $request.GetResponse().statusCode # return the status code of the request ...
3 comments