- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to get supported parameters of the cmdlet in PowerShell?
To know which parameters are supported by cmdlets, Get-Command retrieves the properties of the command. For example, We need to find the Get-Process parameters so the Get-Command will retrieve the command information and Full List will provide you the properties.
Get-Command Get-Process | fl
Once you run the command, it shows the ParameterSets property and they are the parameters supported by cmdlets.
PS C:\> (Get-Command Get-Process).ParameterSets |ft -AutoSize Name IsDefault Parameters ---- --------- ---------- Name True {Name, ComputerName, Module, FileVersionInfo..} NameWithUserName False {Name, IncludeUserName, Verbose, Debug...} IdWithUserName False {Id, IncludeUserName, Verbose, Debug...} Id False {Id, ComputerName, Module, FileVersionInfo...} InputObjectWithUserName False {InputObject, IncludeUserName, Verbose, Debug…} InputObject False {InputObject, ComputerName, Module, FileVersionInfo...}
The above Name properties are the supported parameters.
Advertisements