Welcome to MSDN Blogs Sign in | Join | Help

Tip of the Day

Exchange 2007 has implemented a Get-Tip cmdlet which emits a tip of the day.  Flaphead has written a small script which gets them all and has published them on: http://blog.flaphead.dns2go.com/archive/2006/08/17/3514.aspx

There are a number of general tips along with the Exchange tips.  Here is an example:

Tip of the day #29:
Tab completion reduces the number of keystrokes that are required to complete a cmdlet. Just press the TAB key to complete the cmdlet you are typing. Tab completion kicks in whenever there is hyphen (-) in the input. For example:

 Get-Send<tab>

should complete to Get-SendConnector. You can even use regular expressions, such as:

 Get-U*P*<tab>

Pressing the TAB key when you enter this command cycles through all cmdlets that  match the expression, such as the Unified Messaging Mailbox policy cmdlets.

Jeffrey Snover [MSFT]
Windows PowerShell/Aspen 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

Published Thursday, August 31, 2006 2:03 PM by PowerShellTeam

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# random question

hey guys,

i was so pumped about being able to use powershell, but i'm trying to do some simple stuff and it doesn't work...i'm using the latest bits.

Problem:
I have a set of files with the extension .uf2 in a directory.  They are mixed with other files and i only want the uf2 files

I tried:

ls *.uf2 -R

result: nothing

When I tried:

ls *.txt -R (there are txt files too)

I get results.

wtf?


Friday, September 01, 2006 4:47 PM by arjun

# re: Tip of the Day

hello,arjun

may be you should try "ls *.uf2 -R -force".

I mean your *.uf2 files may have "hide" attribute.so you should add "-force" parameter.
Saturday, September 02, 2006 3:24 AM by 1

# re: Tip of the Day

Arjun
Try this:

ls . *.uf2 -R

(Notice the first ".").  When you specify -Recurse - the first positional parameter is the LIST OF DIRECTORIES to recurse and second positional parameter is the FILTER you want.

Thus you could do:

ls dir1,dir2,dir2 *.uf2 -R

Jeffrey Snover [MSFT]
Windows PowerShell/Aspen 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
Saturday, September 02, 2006 1:53 PM by PowerShellTeam

# re: Tip of the Day

I am looking for any reference (code sample) of creating an ASP or ASPX page to envoke a powershell command or script.  Comming up blank.

Any pointers?
Tuesday, September 26, 2006 12:51 AM by Erik Ashby

# re: Tip of the Day

Powershell seems to reject some cmd shell command shortcuts.

For example, if I type cd\temp from the .cmd command prompt, it changes to the \temp directory.

From powershell, the command is rejected unless I add a space character between cd and the target directory.

Also, from the CMD command prompt, I can launch a file's associated program by typing the filename. For example, I can type c:\x.txt and Windows will open c:\x.txt in notepad.  Powershell doesn't support this.  

Tuesday, November 14, 2006 5:56 PM by Ron

Leave a Comment

(required) 
required 
(required) 
 
Page view tracker