From 2a7d22215fc524d523c90d6bb85e367266be3b40 Mon Sep 17 00:00:00 2001 From: dustin Date: Fri, 28 Jun 2019 13:49:36 -0400 Subject: [PATCH] Update Join-Object.ps1 Fixes issue #5 --- Join-Object.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Join-Object.ps1 b/Join-Object.ps1 index 8f052ff..b5b7069 100644 --- a/Join-Object.ps1 +++ b/Join-Object.ps1 @@ -341,7 +341,7 @@ Function Join-Object { Function Copy-Command([System.Management.Automation.CommandInfo]$Command, [String]$Name, [HashTable]$DefaultParameters) { Try { - $MetaData = [System.Management.Automation.CommandMetadata]::New($Command) + $MetaData = [System.Management.Automation.CommandMetadata] $Command $Value = [System.Management.Automation.ProxyCommand]::Create($MetaData) $Null = New-Item -Path Function:\ -Name "Script:$Name" -Value $Value -Force ForEach ($Key in $DefaultParameters.Keys) {$PSDefaultParameterValues["$Name`:$Key"] = $DefaultParameters.$Key}