Fix deployment on PS Gallery, default 'localhost' value, -ExpandResultForSingleComputer switch, formatting #35
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.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi
i noticed that the script version published to the PS Gallery is actually not correct.
When you
install-
thescript
, a "1.11" version is checked out from the gallery. But that's not the real 1.11 version, it's actually version 1.10, but (for some reason) the script's comment-based help reports version 1.11. This means that all of the localhost logic that avoids opening a PS Session, is missing.So, in this PR:
localhost
value for$ComputerName
(it was already implemented, but with anif
statement)127.0.0.1
as possible value for the local machineChanges proposed in this pull request:
-ExpandResultForSingleComputer
switch parameter that allows for returning just the boolean value, IIF a single computer was specified; for multilple computers, it does nothingHow to test this code:
Test-PendingReboot.ps1 127.0.0.1
Test-PendingReboot.ps1 -ExpandResultForSingleComputer
or (short version, as supported by Powershell/.NET)Test-PendingReboot.ps1' -Expand
Has been tested on (remove any that don't apply):