
function Update-GetPC {

    $GetPCSourcePath = "\\int.samhealth.net\files\TEAM\SHSISDesktopSolutions\Powershell\Get-PC_Update_2023\Prod\Get-PC\"
    $desinationPath = ($env:PSModulePath -split ';')[0] + "\Get-PC"

    Write-Host "Updating Get-PC..."
    Robocopy.exe $GetPCSourcePath $desinationPath /mir | Out-Null

    if($LASTEXITCODE -gt 7){
        Write-Warning 'An error has occured during update. Please restart powershell and try again'
    }
    else{
        Write-Host 'Update Complete: Please Restart Powershell' -ForegroundColor Green
    }
    
}