Skip to content

Commit 2bf78ee

Browse files
committed
Revert changes to ps101
1 parent 9821baa commit 2bf78ee

File tree

5 files changed

+21
-21
lines changed

5 files changed

+21
-21
lines changed

reference/docs-conceptual/learn/ps101/02-help-system.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ first position (position zero) when used positionally.
391391
function help and script help articles.
392392
393393
To get help for a script that isn't located in a path that's listed in
394-
the `$Env:PATH` environment variable, type the script's path and file
394+
the `$env:Path` environment variable, type the script's path and file
395395
name.
396396
397397
If you enter the exact name of a help article, `Get-Help` displays the

reference/docs-conceptual/learn/ps101/04-pipelines.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,14 +604,14 @@ use the saved data as input for another command.
604604

605605
```powershell
606606
'Background Intelligent Transfer Service', 'Windows Time' |
607-
Out-File -FilePath $Env:TEMP\services.txt
607+
Out-File -FilePath $env:TEMP\services.txt
608608
```
609609

610610
You can use parentheses to pass the output of one command as input for a parameter to another
611611
command.
612612

613613
```powershell
614-
Stop-Service -DisplayName (Get-Content -Path $Env:TEMP\services.txt)
614+
Stop-Service -DisplayName (Get-Content -Path $env:TEMP\services.txt)
615615
```
616616

617617
This concept is like the order of operations in Algebra. Just as mathematical operations within

reference/docs-conceptual/learn/ps101/06-flow-control.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -314,13 +314,13 @@ In this chapter, you learned about the different types of loops that exist in Po
314314
## References
315315

316316
- [ForEach-Object][ForEach-Object]
317-
- [about_Foreach][about_Foreach]
318-
- [about_For][about_For]
319-
- [about_Do][about_Do]
320-
- [about_While][about_While]
321-
- [about_Break][about_Break]
322-
- [about_Continue][about_Continue]
323-
- [about_Return][about_Return]
317+
- [about_Foreach][about-foreach]
318+
- [about_For][about-for]
319+
- [about_Do][about-do]
320+
- [about_While][about-while]
321+
- [about_Break][about-break]
322+
- [about_Continue][about-continue]
323+
- [about_Return][about-return]
324324

325325
<!-- link references -->
326326

reference/docs-conceptual/learn/ps101/09-functions.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ PowerShell one-liners and scripts that have to be modified often are good candid
1212
reusable functions.
1313

1414
Write functions whenever possible because they're more tool-oriented. You can add the functions to a
15-
script module, put that module in a location defined in the `$Env:PSModulePath`, and call the
15+
script module, put that module in a location defined in the `$env:PSModulePath`, and call the
1616
functions without needing to locate where you saved the functions. Using the **PowerShellGet**
1717
module, it's easy to share your PowerShell modules in a NuGet repository. **PowerShellGet** ships
1818
with PowerShell version 5.0 and higher. It's also available as a separate download for PowerShell
@@ -559,7 +559,7 @@ The problem is that default values can't be used with mandatory parameters. Inst
559559
`ValidateNotNullOrEmpty` parameter validation attribute with a default value.
560560

561561
Even when setting a default value, try not to use static values. In the following example,
562-
`$Env:COMPUTERNAME` is used as the default value, which is automatically translated to the local
562+
`$env:COMPUTERNAME` is used as the default value, which is automatically translated to the local
563563
computer name if a value isn't provided.
564564

565565
```powershell
@@ -568,7 +568,7 @@ function Test-MrParameterValidation {
568568
[CmdletBinding()]
569569
param (
570570
[ValidateNotNullOrEmpty()]
571-
[string[]]$ComputerName = $Env:COMPUTERNAME
571+
[string[]]$ComputerName = $env:COMPUTERNAME
572572
)
573573
574574
Write-Output $ComputerName
@@ -591,7 +591,7 @@ function Test-MrVerboseOutput {
591591
[CmdletBinding()]
592592
param (
593593
[ValidateNotNullOrEmpty()]
594-
[string[]]$ComputerName = $Env:COMPUTERNAME
594+
[string[]]$ComputerName = $env:COMPUTERNAME
595595
)
596596
597597
foreach ($Computer in $ComputerName) {
@@ -611,7 +611,7 @@ function Test-MrVerboseOutput {
611611
[CmdletBinding()]
612612
param (
613613
[ValidateNotNullOrEmpty()]
614-
[string[]]$ComputerName = $Env:COMPUTERNAME
614+
[string[]]$ComputerName = $env:COMPUTERNAME
615615
)
616616
617617
foreach ($Computer in $ComputerName) {

reference/docs-conceptual/learn/ps101/10-script-modules.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ function Get-MrPSVersion {
201201
}
202202
203203
function Get-MrComputerName {
204-
$Env:COMPUTERNAME
204+
$env:COMPUTERNAME
205205
}
206206
```
207207

@@ -233,10 +233,10 @@ Import-Module C:\MyScriptModule.psm1
233233

234234
The module autoloading feature was introduced in PowerShell version 3. To take advantage of module
235235
autoloading, a script module needs to be saved in a folder with the same base name as the `.psm1`
236-
file and in a location specified in `$Env:PSModulePath`.
236+
file and in a location specified in `$env:PSModulePath`.
237237

238238
```powershell
239-
$Env:PSModulePath
239+
$env:PSModulePath
240240
```
241241

242242
```Output
@@ -249,7 +249,7 @@ The results are difficult to read. Since the paths are separated by a semicolon,
249249
results to return each path on a separate line. This makes them easier to read.
250250

251251
```powershell
252-
$Env:PSModulePath -split ';'
252+
$env:PSModulePath -split ';'
253253
```
254254

255255
```Output
@@ -301,7 +301,7 @@ Script 0.0 myscriptmodule {Get-MrComputerName, G
301301
The module manifest can be created with all of the recommended information.
302302

303303
```powershell
304-
New-ModuleManifest -Path $Env:ProgramFiles\WindowsPowerShell\Modules\MyScriptModule\MyScriptModule.psd1 -RootModule MyScriptModule -Author 'Mike F Robbins' -Description 'MyScriptModule' -CompanyName 'mikefrobbins.com'
304+
New-ModuleManifest -Path $env:ProgramFiles\WindowsPowerShell\Modules\MyScriptModule\MyScriptModule.psd1 -RootModule MyScriptModule -Author 'Mike F Robbins' -Description 'MyScriptModule' -CompanyName 'mikefrobbins.com'
305305
```
306306

307307
If any of this information is missed during the initial creation of the module manifest, it can be
@@ -323,7 +323,7 @@ function Get-MrPSVersion {
323323
}
324324
325325
function Get-MrComputerName {
326-
$Env:COMPUTERNAME
326+
$env:COMPUTERNAME
327327
}
328328
329329
Export-ModuleMember -Function Get-MrPSVersion

0 commit comments

Comments
 (0)