From the course: Learning PowerShell for Windows Server Administration

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Working with PowerShell profiles

Working with PowerShell profiles

From the course: Learning PowerShell for Windows Server Administration

Start my 1-month free trial

Working with PowerShell profiles

- [Instructor] Previous segments have shown how functions and aliases can be created to customize the PowerShell experience. Aliases are used to allow us to type the command we know rather that the cmdlet that Microsoft built and functions allow us to define parameters of cmdlet and create mini scripts that can act as our own custom commands. Both aliases and functions, when created in the command shell will only last for the current session. If you want them to be persistent, you need to add them to a special script, that will run every time you launch PowerShell. That script is called a profile. Here we are, back on the server where we've already configured the execution policy. What we need to do now is create a path where our profile script will be stored. Profiles in Windows PowerShell are saved in a different location from PowerShell core profiles, but they behave exactly the same. You can check to see if a profile is currently being used by running the cmdlet Test-Path and then…

Contents