function Start-TunerPSConfig {
        Configure PSGallery and PSGet defaults
        Adds PSGallery as trusted repository. Insures PSGet is latest version
    .PARAMETER MinimumVersion
        Minimum allowed version of PSGet (default is '2.0.3')
        Start-TunerPSConfig -MinimumVersion "2.0.4"

    [CmdletBinding(SupportsShouldProcess = $True)]
        [parameter(Mandatory = $False, HelpMessage = "Minimum PSGet version")]
        [string] $MinimumVersion = "2.0.3"
    try {
        if (!(Test-AdminContext)) {
            throw "This function requires running PowerShell in Administrator context"
        Write-Verbose "making sure psgallery is a trusted repository"
        if (!(Get-PSRepository -Name "PSGallery" -ErrorAction SilentlyContinue)) {
            Write-Verbose "setting psgallery as trusted"
            Set-PSRepository -Name PSGallery -InstallationPolicy Trusted -ErrorAction Stop
        } elseif ((Get-PSRepository -Name "PSGallery").InstallationPolicy -ne 'Trusted') {
            Set-PSRepository -Name PSGallery -InstallationPolicy Trusted -ErrorAction Stop
        } else {
            Write-Verbose "psgallery is already trusted"
        Write-Verbose "verifying powershellget module version"
        $psget = ((Get-Module PowershellGet).Version -join '.')
        if ([version]$psget -lt [version]$MinimumVersion) {
            Write-Verbose "updating powershellGet module"
            Install-Module PowerShellGet -AllowClobber -Force
        } else {
            Write-Verbose "PowershellGet module is already at $MinimumVersion"
    } catch {
        Write-Error $_.Exception.Message