O'Reilly logo

Windows PowerShell™ 3.0 Step by Step by Ed Wilson

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

Creating a profile: step-by-step exercises

In this exercise, you’ll use the New-Item cmdlet to create a new Windows PowerShell profile. You’ll also use the Get-ExecutionPolicy cmdlet to ensure script execution is enabled on your local system. You’ll also create a function to edit your Windows PowerShell profile. In the next exercise, you’ll add additional functionality to the profile.

Creating a basic Windows PowerShell profile

  1. Start the Windows PowerShell console.

  2. Use the Test-Path cmdlet to determine if a Windows PowerShell console profile exists. This command appears here:

    Test-Path $PROFILE
  3. If a profile exists, make a backup copy of the profile by using the Copy-Item cmdlet. The command appearing here copies the profile to the profileBackup.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