if (!(Test-Path $profile)) {new-item -path $profile -type file -Force} notepad $profile List of Profile files http://msdn.microsoft.com/en-us/library/bb613488(VS.85).aspx
http://www.computerperformance.co.uk/powershell/powershell_profile_ps1.htm %userprofile%\My Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 Prompthttp://huddledmasses.org/powershell-power-user-tips-a-better-prompt/
If launching PowerCLI connect to vcenterhttp://www.wooditwork.com/2010/08/11/pimping-your-powershell-profile/ # VMware vSphere PowerCLI if (Get-PSSnapin -Name "VMware.VimAutomation.Core" -ErrorAction SilentlyContinue) { Write-Host "Connecting to VCenter" -ForegroundColor Green Connect-VIServer vcenterserver } Change Background if run as admin%windir%\system32\WindowsPowerShell\v1.0\Microsoft.PowerShell_profile.ps1 http://www.interact-sw.co.uk/iangblog/2007/02/09/pshdetectelevation
|
Powershell >