Microsoft.PowerShell_profile.ps1

<# $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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值