Options

PowerShell Tab completion

I'm currently studying for the 70-648 exam and I'd like to learn to do many tasks in PowerShell.
One thing that really frustrates me is Tab completion. Sometimes it works, sometimes it doesn't.
For example, I can type something like
Add-ADGroupMember -Identity "PowerShell Experts" -Me, then press Tab and the Members parameter will auto-complete.

The same cannot be said about the following command:
New-ADGroup -Path "OU=Groups,DC=Contoso,DC=com" -nam

When I press Tab, nothing happens.

Also, is there a way to auto-complete parameters of a command? For example, I'd like to know what group scopes are available to me when I create a new group, but it doesn't work that way. Of course, I could use "Get-Help New-ADGroup" or simply memorize whatever I need, but what if I'm in the middle of typing some complex command?
Sign In or Register to comment.