@@ -73,15 +73,15 @@ returns `$false`. Otherwise, it returns `$true`.
7373### Example 2: Test the path of a profile
7474
7575``` powershell
76- Test-Path -Path $profile
76+ Test-Path -Path $PROFILE
7777```
7878
7979``` Output
8080False
8181```
8282
8383``` powershell
84- Test-Path -Path $profile -IsValid
84+ Test-Path -Path $PROFILE -IsValid
8585```
8686
8787``` Output
@@ -92,7 +92,7 @@ These commands test the path of the PowerShell profile.
9292
9393The first command determines whether all elements in the path exist. The second command determines
9494whether the syntax of the path is correct. In this case, the path is ` $false ` , but the syntax is
95- correct ` $true ` . These commands use ` $profile ` , the automatic variable that points to the location
95+ correct ` $true ` . These commands use ` $PROFILE ` , the automatic variable that points to the location
9696for the profile, even if the profile doesn't exist.
9797
9898For more information about automatic variables, see
@@ -123,14 +123,14 @@ In this case, because the directory contains only .dwg files, the result is `$fa
123123### Example 4: Check for a file
124124
125125``` powershell
126- Test-Path -Path $profile -PathType leaf
126+ Test-Path -Path $PROFILE -PathType leaf
127127```
128128
129129``` Output
130130True
131131```
132132
133- This command checks whether the path stored in the ` $profile ` variable leads to a file. In this
133+ This command checks whether the path stored in the ` $PROFILE ` variable leads to a file. In this
134134case, because the PowerShell profile is a ` .ps1 ` file, the cmdlet returns ` $true ` .
135135
136136### Example 5: Check paths in the Registry
@@ -169,7 +169,7 @@ file on the computer is newer than `July 13, 2009`.
169169The NewerThan parameter works only in file system drives.
170170
171171``` powershell
172- Test-Path $pshome \PowerShell.exe -NewerThan "July 13, 2009"
172+ Test-Path $PSHOME \PowerShell.exe -NewerThan "July 13, 2009"
173173```
174174
175175``` Output
0 commit comments