O'Reilly logo

Pro Windows PowerShell by Hristo Deshev

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

11.2. User Profile Scripts

Looking at the nice ways to modify a shell session and set up the perfectly styled and configured window, we naturally wish for a way to save those settings and apply them for every console session. We can do that by saving the configuration code in our profile script, a script placed in a location that's known to the shell and that gets executed every time the shell starts. PowerShell offers several options to choose from when saving configuration scripts. According to our needs, we have to pick a different location or a different profile script. The options are explained in the following sections.

11.2.1. Settings for All Users and All Shells

Settings for all shells typically are placed in files named profile.ps1 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required