Welcome to MSDN Blogs Sign in | Join | Help

March 2007 - Posts

Find-Item that used to be DIR /S

Under CMD.EXE, I used DIR /S a lot. Under PowerShell, this would translate as gci -r –fi . So I added the following to my profile: Function Find-ItemWithFilter { param ([ string ] $filter = $ ( throw "You must specify a filter ( e.g. * .doc )")) Get-ChildItem
Posted by yvesdolc | 0 Comments

My PowerShell profile

Thought I would just share this new version: Function prompt { $windowsIdentity = [System.Security.Principal.WindowsIdentity]::GetCurrent() $windowsPrincipal = new-object 'System.Security.Principal.WindowsPrincipal' $windowsIdentity $windowTitle = "PowerShell
Posted by yvesdolc | 0 Comments
 
Page view tracker