<# $PSVersionTable.PSVersion 6.2.0
.$profile # reload profile
Set-ExecutionPolicy RemoteSigned -Scope LocalMachine # Permits profiles (.ps1)
$PROFILE | Format-List * -Force
$PROFILE.CurrentUserAllHosts
$Env:userprofile
C:\Users\xxx
$profile
C:\Users\xxx\Documents\PowerShell\Microsoft.PowerShell_profile.ps1
#>
##########################################
function prompt
{
# $un = [Regex]::Match($CurrentUser.Name,"SOLIDWORKS\\+(.*)").Groups[1].Value
# $hn = [Net.DNS]::GetHostName()
# $host.ui.rawui.WindowTitle = $un + "@" + $hn #+ " Line: " + $host.UI.RawUI.CursorPosition.Y
# Write-Host($un + "@" + $hn + " ") -foregroundcolor Green -nonewline; Write-Host ($(get-location)) -foregroundcolor Yellow -nonewline
# Write-Host(">") -nonewline -foregroundcolor Green
$host.ui.rawui.WindowTitle = "$(Get-Location)"
# (Get-Date).ToLongTimeString()
# (Get-Date -UFormat %m%d_%H:%M:%S)
Write-Host ("PS " + $( get-location) + "[" + (Get-Date -UFormat %H:%M:%S) + "]" + ">") -foregroundcolor Green -nonewline -backgroundcolor Black
return " "
}
#{
{
{ Appearance configuration Begin
$console = $host.UI.RawUI
$console.ForegroundColor = "White"
$console.BackgroundColor = "Black"
$buffer = $console.BufferSize
$buffer.Width = 130
$buffer.Height = 9999
$console.BufferSize = $buffer
$size = $console.WindowSize
$size.Width = 160
$size.Height = 36
$console.WindowSize = $size
# $colors = $host.PrivateData
# $colors.VerboseForegroundColor = "white"
# $colors.VerboseBa
Microsoft.PowerShell_profile.ps1
最新推荐文章于 2025-04-10 23:10:38 发布