@@ -12,7 +12,7 @@ PowerShell one-liners and scripts that have to be modified often are good candid
1212reusable functions.
1313
1414Write 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
1616functions without needing to locate where you saved the functions. Using the ** PowerShellGet**
1717module, it's easy to share your PowerShell modules in a NuGet repository. ** PowerShellGet** ships
1818with 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
561561Even 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
563563computer 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) {
0 commit comments