I'm wondering if there's a way to create an alias that quickly executes the following:
Invoke-Item C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe
I haven't been able to come up with a better way to launch??
Make this file:
C:\\Users\\<yourusername>\\Documents\\WindowsPowerShell\\Microsoft.Powershell_Profile.ps1
Put the following code in it:
Function Start-Powershell { Start-Process powershell.exe }
Open a new Powershell window.
Type Start-Powershell
You can name 'Start-Powershell' (name of the Function) whatever you like. This is your new "Alias" which works in your user environment and with auto-completion.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.