Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFix typo in .Description for Measure-RequiresModules #888
Conversation
| @@ -126,7 +126,7 @@ function Measure-RequiresRunAsAdministrator | |||
| .DESCRIPTION | |||
| The #Requires statement prevents a script from running unless the Windows PowerShell version, modules, snap-ins, and module and snap-in version prerequisites are met. | |||
| From Windows PowerShell 3.0, the #Requires statement let script developers specify Windows PowerShell modules that the script requires. | |||
| To fix a violation of this rule, please consider to use #Requires -RunAsAdministrator instead of using Import-Module. | |||
| To fix a violation of this rule, please consider to use #Requires -Modules instead of using Import-Module. | |||
This comment has been minimized.
This comment has been minimized.
bergmeister
Feb 14, 2018
Collaborator
Thanks for the contribution. The fix of this copy-paste mistake makes sense.
However, by looking at the documentation here, I think it would be better to state the full synax:
#Requires -Modules { <Module-Name> | <Hashtable> }
c54c8fe
into
PowerShell:development
2 checks passed
2 checks passed
license/cla
All CLA requirements met.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
TimCurwick commentedFeb 14, 2018
PR Summary
Fix typo - Change "-RunAsAdministrator" to "-Modules" in .Description for Measure-RequiresModules.
Error is presumed to have been copy and paste from Measure-RequiresRunAsAdministrator, where it was appropriate.
PR Checklist
Note: Tick the boxes below that apply to this pull request by putting an
xbetween the square brackets. Please mark anything not applicable to this PRNA.WIP:to the beginning of the title and remove the prefix when the PR is ready