My PowerShell Profile
Anatoly Mironov
It has been a while I last worked with PowerShell. I had my custom profile where I had my own prompt and some other customizations. Now I cannot find it anymore. I’ll start with the new one and I am saving it on my blog, so it will be easier to find in future:
Function Prompt {
$PromptData="PS $($executionContext.SessionState.Path.CurrentLocation)$('>' * ($nestedPromptLevel + 1)) "
$host.ui.RawUI.WindowTitle=$PromptData +'-'+(Get-Date).tostring()
# .Link
# http://go.microsoft.com/fwlink/?LinkID=225750
# .ExternalHelp System.Management.Automation.dll-help.xml
}The prompt function comes from the scripting guy blog. To customize your profile, just open it in a text editor (in my case: code)
code $profileUpdate 2018-04-10 You can also include these lines:
$path1 = "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\"
$path2 = "15"
Add-Type -Path "$path1\$path2\ISAPI\Microsoft.SharePoint.Client.dll"
Add-Type -Path "$path1\$path2\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"VS Code Now we can run VS Code to create ps1 scripts and run selections as we did it in PowerShell ISE.
comments from wordpress
Dennis Gaida — 2016-06-01
You should add the screenshot of how it will look like afterwards like on the Scripting Guy’s blog post.
Anatoly Mironov — 2016-06-01
Thanks, will do that.
