PSProfile.ps1

# References:
# 1. Below are the list of predefined vars that can be used:
# - $PSScriptRoot [System defined] The folder path for current scipt file, NOT the caller script to call this function

# Note: MyProfile module only support for x64. So the MyProfile module may not exist for current session.
if ($Env:PROCESSOR_ARCHITECTURE -ne 'AMD64') { return }

# Invoke PSProfile for all MyProfiles in current scope based on load order
$orignalColorHostMinWriteLevel = $Global:ColorHostMinWriteLevel
$Global:ColorHostMinWriteLevel = 'Error'
try { Invoke-MyProfile -PSProfile } catch {}
$Global:ColorHostMinWriteLevel = $orignalColorHostMinWriteLevel