diff --git a/deploy.ps1 b/deploy.ps1 index c272fd9..720065f 100644 --- a/deploy.ps1 +++ b/deploy.ps1 @@ -155,7 +155,12 @@ Copy-Item -Path $ConcatenatedFilePath -Destination $PSM1OutputPath -Force Write-Host "Deployment complete" -ForegroundColor Green if ($ResetCurrentEnvironment) { Write-Warning "Running commands to reset current environment" + if (Get-Module 'NetboxPS') { + Remove-Module NetboxPS -Force + } + Write-Host " Reimporting module" Import-Module $PSM1OutputPath, $PSD1OutputPath -Force -ErrorAction Stop + Write-Host "Reset complete" -ForegroundColor Green }