Clones a dictionary keeping only the specified keys.
Split-Keys.ps1 [[-Keys] <String[]>] -Dictionary <IDictionary> [-SkipNullValues]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
@{ A = 1; B = 2; C = 3 } |Split-Keys.ps1 B C D
Name Value —- —– B 2 C 3
$PSBoundParameters |Split-Keys.ps1 From To Cc Bcc Subject -SkipNullValues |Send-MailMessage
Sends an email using selected params declared by the calling script with values.
List of keys to include in the new dictionary.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The source dictionary to copy key-value pairs from.
Type: IDictionary
Parameter Sets: (All)
Aliases: Hashtable
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
When present, indicates that key-value pairs with a null value should not be included.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: NoNulls
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Only string keys are supported.
https://msdn.microsoft.com/library/System.Collections.IDictionary.aspx