-
-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy path2025-09-20-use-get-verb-to-see-approved-verbs.ps1
More file actions
30 lines (28 loc) 路 2.01 KB
/
Copy path2025-09-20-use-get-verb-to-see-approved-verbs.ps1
File metadata and controls
30 lines (28 loc) 路 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
$tip = [tiPS.PowerShellTip]::new()
$tip.CreatedDate = [DateTime]::Parse('2025-09-20')
$tip.Title = 'Use Get-Verb to see approved verbs'
$tip.TipText = @'
Use the Get-Verb cmdlet to see a list of all approved verbs in PowerShell. This is useful when creating your own functions or cmdlets, as using approved verbs helps ensure consistency and discoverability. You know right away what a function does simply by the verb it uses.
Get-Verb is also great for learning about new verbs you may not have known about, including the typical alias abbreviations.
'@
$tip.Example = @'
# List all approved verbs and their descriptions.
Get-Verb
'@
$tip.Urls = @(
'https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-verb'
'https://learn.microsoft.com/en-us/powershell/scripting/developer/cmdlet/approved-verbs-for-windows-powershell-commands'
)
$tip.Category = [tiPS.TipCategory]::NativeCmdlet # Community, Editor, Module, NativeCmdlet, Performance, Security, Syntax, Terminal, or Other.
$tip.Author = 'Daniel Schroeder (deadlydog)' # Optional. Get credit for your tip. e.g. 'Daniel Schroeder (deadlydog)'.
#$tip.ExpiryDate = [DateTime]::Parse('2024-10-30') # Optional. If the tip is not relevant after a certain date, set the expiration date. e.g. Announcing a conference or event.
# Category meanings:
# Community: Social events and community resources. e.g. PowerShell Summit, podcasts, etc.
# Editor: Editor tips and extensions. e.g. VS Code, ISE, etc.
# Module: Modules and module tips. e.g. PSScriptAnalyzer, Pester, etc.
# NativeCmdlet: Native cmdlet tips. e.g. Get-Process, Get-ChildItem, Get-Content, etc.
# Performance: Tips to improve runtime performance. e.g. foreach vs ForEach-Object, ForEach-Object -Parallel, etc.
# Security: Security tips. e.g. ExecutionPolicy, Constrained Language Mode, passwords, etc.
# Syntax: Syntax tips. e.g. splatting, pipeline, keywords, etc.
# Terminal: Terminal shortcuts and tips. e.g. PSReadLine, Windows Terminal, ConEmu, etc.
# Other: Tips that don't fit into any of the other categories.