TestRunner.ps1

$VerbosePreference = "Continue"
Install-Module D365BCDownloadHelper
Import-Module D365BCDownloadHelper
Update-Module D365BCDownloadHelper
#Remove-Module SetupD365Environment
Remove-Module D365BCDownloadHelper
Get-Module
#Uninstall-Module -Name SetupD365Environment
#Get-Module -ListAvailable
#$VerbosePreference = "Continue"
Get-BusinessCentralDownloadUrl -Version 14 -CumulativeUpdate CU03 -Language DE -Verbose
return
#$env:PSModulePath
$env:PSModulePath
"C:\Users\simon\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files\Intel\;F:\Repositories\PowerShell-Stuff\PowerShell-Stuff;F:\Repositories\PowerShell-Stuff\PowerShell-Stuff\Modules;C:\Users\simon\.vscode\extensions\ms-vscode.powershell-2019.5.0\modules"
"C:\Users\simon\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files\Intel\;F:\Repositories\PowerShell-Stuff\PowerShell-Stuff;F:\Repositories\PowerShell-Stuff\PowerShell-Stuff\Modules;C:\Users\simon\.vscode\extensions\ms-vscode.powershell-2019.5.0\modules"
"C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files\Intel\;F:\Repositories\PowerShell-Stuff\PowerShell-Stuff;F:\Repositories\PowerShell-Stuff\PowerShell-Stuff\Modules;C:\Users\simon\.vscode\extensions\ms-vscode.powershell-2019.5.0\modules"
$CurrentValueMachine = [Environment]::GetEnvironmentVariable("PSModulePath", "Machine")
$CurrentValueUser = [Environment]::GetEnvironmentVariable("PSModulePath", "User")
$CurrentValueMachine
$CurrentValueUser
$NewValue = $CurrentValue.Replace(";F:\Repositories\PowerShell-Stuff\PowerShell-Stuff\Modules;","")
[Environment]::SetEnvironmentVariable("PSModulePath", "C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files\Intel\", "Machine")
$CurrentValue
$NewValue

$PSVersionTable

$env:PSModulePath = $env:PSModulePath -replace "$([System.IO.Path]::PathSeparator)F:\\Repositories\\PowerShell-Stuff\\PowerShell-Stuff\\Modules"

$PROFILE

Get-Command -Module D365BCDownloadHelper