- Getting Started with PowerShell
- Michael Shepard
- 254字
- 2021-07-16 20:28:21
The scripter's secret weapon – tab completion
Although Get-Command
is a great way to find cmdlets, the truth is that the PowerShell cmdlet names are very predictable. In fact, they're so predictable that after you've been using PowerShell for a while you won't probably turn to Get-Command
very often. After you've found the noun or the set of nouns that you're working with, the powerful tab completion found in both the PowerShell console and the ISE will allow you to enter just a part of the command and press tab to cycle through the list of commands that match what you have entered. For instance, in keeping with our examples dealing with services, you could enter *-Service
at the command line and press tab. You would first see Get-Service, followed by the rest of the items in the previous screenshot as you hit tab. Tab completion is a huge benefit for your scripting productivity for several reasons, such as:
- You get the suggestions where you need them
- The suggestions are all valid command names
- The suggestions are consistently capitalized
In addition to being able to complete the command names, tab completion also gives suggestions for parameter names, property, and method names, and in PowerShell 3.0 and above, it gives the parameter values. The combination of tab completion improvements and IntelliSense in the ISE is so impressive that I recommend that people upgrade their development workstation to at least PowerShell 3.0, even if they are developing PowerShell code that will run in a 2.0 environment.
- Learning Cython Programming(Second Edition)
- Kibana Essentials
- 營銷數據科學:用R和Python進行預測分析的建模技術
- Building a Recommendation Engine with Scala
- Internet of Things with Intel Galileo
- Expert Data Visualization
- 大模型RAG實戰:RAG原理、應用與系統構建
- Python數據結構與算法(視頻教學版)
- Express Web Application Development
- Natural Language Processing with Java and LingPipe Cookbook
- QGIS Python Programming Cookbook(Second Edition)
- Python Data Science Cookbook
- Mudbox 2013 Cookbook
- 深入淺出Python數據分析
- Mastering Object:Oriented Python(Second Edition)