New-BluGenieCommand
New-BluGenieCommand
SYNOPSIS
SYNTAX
New-BluGenieCommand [[-Name] <String>] [[-BoundParameters] <Object>] [[-Walkthrough]] [<CommonParameters>]DESCRIPTION
EXAMPLES
EXAMPLE 1
$Source = "$ScriptDirectory\Tools\SysinternalsSuite"$Destination = "C:\Source"
$Container = $true
$Recurse = $false
$Force = $false
$ArrParamList = [PSCustomObject]@{
'Path' = $Source
'Destination' = $Destination
'Filter' = $Filter
'Container' = $Container
'Include' = $Include
'Exclude' = $Exclude
'Recurse' = $Recurse
'Force' = $Force
}
New-BluGenieCommand -Name 'Copy-Item' -BoundParameters $ArrParamList -ErrorAction SilentlyContinue
$NewCommand.Invoke()
This will dynamically build out the Copy-Item string from the variables defined (normally $PSBoundParameters from the parent script)
and invoke the command.PARAMETERS
Name
BoundParameters
Walkthrough
CommonParameters
Last updated