Closed jbirley closed 4 years ago
When deciding on if a PowerShell command should be public or private, we should answer the following questions:
When deciding if a PowerShell command should be public or private, we should answer the following questions:
When looking at the AcmeEmployee, we can probably think of many functions that are good candidates to be private to the module.
When looking at the AcmeEmployee module, we can probably think of many functions that are good candidates to be private to the module.
15 # Define aliases 16 $aliases = @() 17 $aliases += New-Alias -Name gae -Value Get-AcmeEmployee 18 $aliases += New-Alias -Name sae -Value Set-AcmeEmployee
15 # Define aliases 16 $aliases = @() 17 $aliases += New-Alias -Name gae -Value Get-AcmeEmployee -PassThru 18 $aliases += New-Alias -Name sae -Value Set-AcmeEmployee -PassThru
Thanks! Corrected.
Chapter 7
Section: 7.1.2 Candidates for private functions
States
Recommendation
Section: 7.1.2 Candidates for private functions
States
Recommendation
Section: 7.1.3 Controlling the visibility of variables and aliases
States
Recommendation
Section: 7.2 Summary (Key points callout)
States
Recommendation