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
Start the Windows PowerShell console.
Use the Test-Path cmdlet to determine if a Windows PowerShell console profile exists. This command appears here:
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 ...