From 44dc6c86a219704c876393d61f7a469a07e31d1b Mon Sep 17 00:00:00 2001 From: Ben Claussen Date: Fri, 24 Feb 2023 11:46:06 -0500 Subject: [PATCH] Update deploy.ps1 --- deploy.ps1 | 5 +++++ 1 file changed, 5 insertions(+) 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 }