diff --git a/New-GitHubMarkdownIndex/New-GitHubMarkdownIndex.ps1 b/New-GitHubMarkdownIndex/New-GitHubMarkdownIndex.ps1 index 9b92984..d627712 100644 --- a/New-GitHubMarkdownIndex/New-GitHubMarkdownIndex.ps1 +++ b/New-GitHubMarkdownIndex/New-GitHubMarkdownIndex.ps1 @@ -77,7 +77,11 @@ Will run against the jaapbrasser account, sharedscripts repository and will look if ($NoClipBoard) { $BuildMarkDown.Invoke() } else { - $BuildMarkDown.Invoke() | clip.exe + if (Get-Command -Name Set-Clipboard -ErrorAction SilentlyContinue) { + $BuildMarkDown.Invoke() | Set-Clipboard + } else { + $BuildMarkDown.Invoke() | clip + } } } } diff --git a/README.md b/README.md index da3413f..aa7a492 100644 --- a/README.md +++ b/README.md @@ -21,4 +21,4 @@ All individual blog posts can be found here: * [150000 Downloads: A personal milestone](https://www.jaapbrasser.com/150000-downloads-a-personal-milestone/) * [Disconnect-LoggedOnUser – Disconnect a RDP session remotely](https://www.jaapbrasser.com/disconnect-loggedonuser-disconnect-a-rdp-session-remotely/) * [Get-LocalLastLogonTime – Get the lastlogin time on a local system](https://www.jaapbrasser.com/get-locallastlogontime-get-the-lastlogin-time-of-a-user-on-a-local-system/) -* +* []()