generated from deadlydog/Template.NewGitRepo
-
-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Labels
automation-new-tip-issue-do-not-useUsed by automation to create PRs from New PowerShell Tip issuesUsed by automation to create PRs from New PowerShell Tip issues
Description
Tip Title
Capture superfluous parameters passed to your function(s)
Tip Text
Capture any parsed parameter to prevent a function from bombing out when being passed unknown / misspelled variables.
Comes in handy when parsing the $PSBoundParameters from a calling script with just a subset of parameters that are appropriate / needed by your (custom) function.
Example Code (optional)
[CmdletBinding()]
param(
[Parameter(DontShow, ValueFromRemainingArguments)]$Superfluous
)
Write-Verbose -Message "Ignoring superfluous params: $($Superfluous -join ' ')"
Category
Syntax
URL 1 (optional)
https://github.com/ChristelVDH/SyncAD2AAD/blob/main/ConnectTo-Graph.ps1
URL 2 (optional)
URL 3 (optional)
Author (optional)
Christel VdH
Expiry Date (optional)
No response
Git Display Name and GitHub Email (optional)
Christel VdH [email protected]
Metadata
Metadata
Assignees
Labels
automation-new-tip-issue-do-not-useUsed by automation to create PRs from New PowerShell Tip issuesUsed by automation to create PRs from New PowerShell Tip issues