mirror of
https://github.com/benclaussen/NetboxPS.git
synced 2025-12-13 01:42:28 +00:00
Update deploy.ps1
This commit is contained in:
parent
5b7f0c658b
commit
44dc6c86a2
1 changed files with 5 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue