Tip of the Day

Tip of the Day

  • Comments 5

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

Leave a Comment
  • Please add 5 and 5 and type the answer here:
  • Post
  • 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?


  • 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.
  • 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
  • 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?
  • 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.  

Page 1 of 1 (5 items)