function Copy-NewRelicCustomInstrumentationFiles { <# .SYNOPSIS Copies the New Relic .NET Agent Custom Instrumentation Files to the NR Extensions Folder #> [CmdletBinding()] param( ) $logLead = (Get-LogLeadName); ## Get the custom path from the current folder -> NewRelicCustomInstrumentation $customInstrumentationPath = Join-Path $PSScriptRoot "NewRelicCustomInstrumentation" if (Test-Path $customInstrumentationPath) { $nrExtensionsPath = "C:\ProgramData\New Relic\.NET Agent\Extensions" Write-Output ("$logLead : Copying Custom Instrumentation Files from {0} to {1}" -f $customInstrumentationPath, $nrExtensionsPath) Get-ChildItem $customInstrumentationPath | Select-Object -ExpandProperty FullName | Copy-Item -Destination $nrExtensionsPath -Force } else { Write-Warning ("$logLead : Skipping copy of custom instrumentation files from {0}" -f $customInstrumentationPath) } }