AdvReg.psm1
# Copyright: (c) 2021, Jordan Borean (@jborean93) <jborean93@gmail.com> # MIT License (see LICENSE or https://opensource.org/licenses/MIT) $importModule = Get-Command -Name Import-Module -Module Microsoft.PowerShell.Core if (-not ('AdvReg.Commands.RemoveRegLinkCommand' -as [type])) { $framework = if ($PSVersionTable.PSVersion.Major -eq 5) { 'net472' } else { 'netcoreapp3.1' } &$importModule ([IO.Path]::Combine($PSScriptRoot, 'bin', $framework, 'AdvReg.dll')) -ErrorAction Stop } else { &$importModule -Force -Assembly ([AdvReg.Commands.RemoveRegLinkCommand].Assembly) } |