CHUVASH.eu

CHunky Universe of Vigourous Astonishing SHarepoint :)

My PowerShell Profile

Screen Shot 2016-06-13 at 20.52.26

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 $profile

Update 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.

Advertisements

2 responses to “My PowerShell Profile

  1. Dennis Gaida 2016-06-13 at 16:27

    You should add the screenshot of how it will look like afterwards like on the Scripting Guy’s blog post.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Вула Чăвашла

VulaCV - Чăвашла вулаттаракан сайт

Discovering SharePoint

And going crazy doing it

Bram de Jager - Coder, Speaker, Author

Office 365, SharePoint and Azure

SharePoint Dragons

Nikander & Margriet on SharePoint

Paul J. Swider - RealActivity

RealActivity is a specialized healthcare services and solution advisory firm.

Mai Omar Desouki - Avid SharePointer

Egyptian & Vodafoner - Senior SharePoint Consultant

Cameron Dwyer | Office 365, SharePoint, Outlook, OnePlace Solutions

Office 365, SharePoint, OnePlace Solutions & Life's Other Little Wonders

paul.tavares

Me and My doings!

Share SharePoint Points !

By Mohit Vashishtha

Jimmy Janlén "Den Scrummande Konsulten"

Erfarenheter, synpunkter och raljerande om Scrum från Jimmy Janlén

Aryan Nava

| Blockchain | Serverless Architecture | Microservices Architecture | DevOps | AWS Lambda | Teraform |

SPJoel

SharePoint for everyone

SharePointRyan

Ryan Dennis is a SharePoint Solution Architect with a passion for SharePoint and PowerShell

SharePoint 2020

The Vision for a Future of Clarity

Aharoni in Unicode

Treacle tarts for great justice

... And All That JS

JavaScript, Web Apps and SharePoint

blksthl

Mostly what I know about SharePoint - CommunicoCuspis

%d bloggers like this: