mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-10 13:27:41 +02:00
Updated the manuals
This commit is contained in:
@ -15,6 +15,7 @@ Parameters
|
||||
Position? 1
|
||||
Default value
|
||||
Accept pipeline input? false
|
||||
Aliases
|
||||
Accept wildcard characters? false
|
||||
|
||||
[<CommonParameters>]
|
||||
@ -26,7 +27,7 @@ Example
|
||||
-------
|
||||
```powershell
|
||||
PS> ./enter-host.ps1 tux
|
||||
✅ tux is up and running (3ms latency).
|
||||
✅ tux is online (3ms latency to 192.168.1.179)
|
||||
⏳ Connecting as user 'markus' using OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2
|
||||
markus@tux's password:
|
||||
...
|
||||
@ -53,7 +54,7 @@ Script Content
|
||||
Specifies the remote hostname or IP address
|
||||
.EXAMPLE
|
||||
PS> ./enter-host.ps1 tux
|
||||
✅ tux is up and running (3ms latency).
|
||||
✅ tux is online (3ms latency to 192.168.1.179)
|
||||
⏳ Connecting as user 'markus' using OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2
|
||||
markus@tux's password:
|
||||
...
|
||||
@ -77,14 +78,14 @@ try {
|
||||
}
|
||||
|
||||
& "$PSScriptRoot/ping-host.ps1" $remoteHost
|
||||
if ($lastExitCode -ne "0") {
|
||||
if ($lastExitCode -ne 0) {
|
||||
Write-Host "Let's try to wake '$remoteHost' up..."
|
||||
& "$PSScriptRoot/wake-up-host.ps1"
|
||||
}
|
||||
|
||||
Write-Host "⏳ Connecting as user '$remoteUser' using " -noNewline
|
||||
& ssh -V
|
||||
if ($lastExitCode -ne "0") { throw "'ssh -V' failed with exit code $lastExitCode" }
|
||||
if ($lastExitCode -ne 0) { throw "'ssh -V' failed with exit code $lastExitCode" }
|
||||
|
||||
& ssh "$($remoteUser)@$($remoteHost)"
|
||||
exit 0 # success
|
||||
@ -94,4 +95,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(page generated by convert-ps2md.ps1 as of 01/23/2025 12:15:21)*
|
||||
*(page generated by convert-ps2md.ps1 as of 05/12/2025 22:02:54)*
|
||||
|
Reference in New Issue
Block a user