Thursday, April 22, 2010

Digicert - Utility for Managing SSL Certs

Most of the readers of this blog will have used and possibly setup SSL on a web site. If you really, really know what you are doing and do it all the time, managing digital certs is relatively straigtforward. But for over-worked admins who DON'T do this daily, dealing with things like intermediate CAs, keys, etc, etc is just a mind-bending experience. It's also easy to make mistakes (for example, adding a root CA cert to your personal vs computer store).

Digicert, who sell digital certificates, have created a new and free certificate management utility. This utility provides a number of useful features including:

  • See all the SSL certificates installed on a server.
  • View details for all certificates.
  • Import and Export certificates either as a backupo or to copy/move certs between servers.
  • Test a certificate

You can download this utility from Digicert’s site for free – and you run it on the server you wish to test. Here’s what the UI looks like:

image

If you are using services that require digital certs, such as Communications Server (aka OCS), then this tool may well be very useful in helping to resolve certificate issues on your OCS/CS systems.

Wednesday, April 21, 2010

PowerShell Cmdlets Search via Bing

Microsoft this week released a new feature in the Bing search engine – a visual search of PowerShell Cmdlets. This is part of the Visual Search feature of Bing which allows you to search using visual images, versus just text. When you fire up the Visual Search , you will now see a “Visual Search” link.  You can then click through to see the PowerShell Cmdlets. Sadly, this is available currently only in the “en-us’ version of Bing, but it looks like this:

image

 

Along the left, you can see a number of categories (Top 12 Cmdlets, WMI Cmdlets, etc) as well as some ways to narrow down your search. I especially like the ‘Introduced in Version’ and ‘Remoting Uses’  As you can see in the above graphic, when you click on a cmdlet, you get more help information along the right, including basic cmdlet information and several links to more detailed help documentation. Although you can’t see it from the graphic above, this page seems to be generated by using WPF, so you get some pretty neat effects when you click on the left hand pane of this page!

Th PowerShell Cmdlets search feature is available on the US version of Bing only. Unlike Google, there seems no way to invoke country specific versions of Bing. You get what Bing works out to be your local variant. But with a little hacking, you can indeed get to the above page. The rather unfriendly URL is: http://www.bing.com/visualsearch?mkt=en-us&g=powershell_cmdlets&FORM=SGEWEB&qpvt=powershell#remoting=1&r=1. Alternatively, you can start at the Bing US home page and drill down from there (http://www.bing.com/visualsearch?mkt=en-us).

There will also be more cmdlets documented this way. I have no idea what the time table is, either for wider disbribution of this pretty cool feature, or when we’ll see more cmdlets being documented.

Technorati Tags: ,

Saturday, April 17, 2010

PowerShell Profile Files

PowerShell defines some special script files, called Profiles, that you can use to customise and configure a PowerShell Session, whether you are using Powershell.exe, PoweShellISE.exe or a customised version (e.g. Exchange Management Console). The neat thing about the profile is that it runs, at start-up of every PowerShell host, in dot sourced mode. Thus functions and variables defined in the profile persist in your shell.

For each PowerShell Host, you have up to four potential profiles:

  • AllUsersAllHosts
    • C:\Windows\System32\WindowsPowerShell\v1.0\profile.ps1
  • AllUsersCurrentHost
    • C:\Windows\System32\WindowsPowerShell\v1.0\Microsoft.PowerShellISE_profile.ps1 (PowerShellISE.exe), or
    • C:\Windows\System32\WindowsPowerShell\v1.0\Microsoft.PowerShell_profile.ps1 (PowerShell.exe)
  • CurrentUserAllHosts
    • C:\Users\<username>\Documents\WindowsPowerShell\profile.ps1
  • CurrentUserCurrentHost
    • C:\Users\tfl\Documents\WindowsPowerShell\Microsoft.PowerShellISE_profile.ps1 (PowerShellISE.,exe), or
    • C:\Users\tfl\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 (PowerShell.exe).

For both the CurrentHost files – these will vary depending on which host the script is run. Above shows the profile files for both PowerShell and PowerShell ISE. The profile files (obviously one each of the four!) run in the order noted above. This means the admin could, for example define some functions in the AllUsersAllHosts that you can override in your CurrentUser profiles.

As it turns out, there’s a very PowerShell one-liner you can run to return your host’s profile files (and can even tell you if the file exists!) This one-liner looks like this:

$profile | gm *Host* | % { $_.Name } | % { $p = @{}; $p.Name = $_ ;$p.Path = $profile.$_; $p.Exists= (Test-Path $profile.$_); New-Object PSObject -Property $p } | Format-Table –AutoSize

I’ve posted a similar script over on my PowerShell Scripts blog. The script I’ve posted on the PowerShell Scripts blog contains a Format-List (to look a bit better on the blog. You might prefer the Format-Table in the one-liner above.

 

Technorati Tags: ,