With a little side of applesauce...

Monday, January 29, 2007

Microsoft Powershell RC1 coolness

Though I have my reservations about the overall acceptance of the Powershell as shell replacement, (mostly because of the shift to treating everything as objects), I have found two very cool things so far:

1. I can create aliases for commands, (I’m not sure how yet, but the built-ins make it easy when coming from BASH).

2. I can browse the registry from the command line… (How cool is that!? This is the actual finding that led to this blog entry).

PS HKLM:\SYSTEM> cd HKLM:\SOFTWARE
PS HKLM:\SOFTWARE> ls
Hive: Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE
SKC VC Name Property
— — —- ——–
4 0 ActiveState {}
6 0 Adaptec {}
3 0 Adobe {}
1 0 Alps {}
1 0 Apple Computer, Inc. {}
4 0 ATI Technologies {}
1 0 Blunck Software {}
1 0 Bogosoft {}
1 0 BreakPoint {}
5 0 Broadcom {}
1 0 BVRP Software {}
1 0 BVRP Software, Inc {}
1 1 C07ft5Y {(default)}

Now, if I can just figure out how to make “cd” take me back to %HOME%… :P

1 comment:

jsnover said...

> Now, if I can just figure out how to make “cd” take me back to %HOME%

The special character for the HOME directory is ~
so what you want is:
PS> CD ~

Jeffrey Snover [MSFT]
Windows PowerShell/MMC Architect
Visit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShell
Visit the Windows PowerShell ScriptCenter at: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx