Monthly Archives: April 2009

How many bytes?

I was playing around with PowerShell and started thinking about the kb, mb etc values and I realised I didn’t know what they really looked like.  1kb is 1024 but it gets very hazy after that. So how could I … Continue reading

Posted in PowerShell V2 | Leave a comment

Creating a process

I’ve looked at creating a process before – using [WMIClass].   With CTP3 we have a few more options   Start-Process -Filepath notepad.exe   Invoke-WMIMethod -Class Win32_process -Name Create -ArgumentList notepad.exe   Set-WMIinstance -Class Win32_process -Arguments @{Path=c:windowssystem32notepad.exe}   The first … Continue reading

Posted in PowerShell and WMI | 2 Comments

PowerShell verbs

If you haven’t seen the post on PowerShell standard verbs from the PowerShell team it is worth reading –   If you have an idea for a new verb – make sure you make it known

Posted in PowerShell V2 | Leave a comment

PowerShell remoting options

One of the big pieces of functionality in PowerShell v2 is the ability to directly administer remote machines.  A number of cmdlets get a computername parameter for working directly. The main push for remoting is through the *-PSsession cmdlets Enter-PSSessionExit-PSSessionExport-PSSessionGet-PSSessionImport-PSSessionNew-PSSessionRemove-PSSession … Continue reading

Posted in PowerShell V2 | Leave a comment

Too ambitious?

Been looking at Exchange 2010.  It installed OK on Windows 2008 R2 Beta and seemed to run OK.  I have come across a few issues: Exchange Management Console doesn’t start properly and doesn’t run properly The new Remote PowerShell functionality … Continue reading

Posted in Powershell | 3 Comments

AD attributes

I had a question come through as a private message regarding how to extract a particular attribute for user objects. The script wasn’t working because the label name in AD Users and Computers didn’t match the attribute name. This is … Continue reading

Posted in PowerShell and Active Directory | 1 Comment


Sorting is a fairly common activity in PowerShell.  One scenario I don’t see very often is a requirement to sort in two different directions.  I have a list of users and their last logon dates – I want to sort … Continue reading

Posted in Powershell | 1 Comment