We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 03efde0 commit b01876bCopy full SHA for b01876b
src/powershell/public/Clear-ZtRequiredModule.ps1
@@ -16,8 +16,10 @@ function Clear-ZtRequiredModule {
16
Write-Warning -Message 'This command cannot be run when the module is loaded.'
17
Write-Warning -Message 'Please close all sessions where ZeroTrustAssessment module is loaded, then run the following...'
18
Write-Warning -Message ('&''{0}''' -f $PSCommandPath)
19
- Set-Clipboard -Value ('&''{0}''' -f $PSCommandPath)
20
- Write-Warning -Message ('(The command has been copied to your clipboard.)')
+ if ($isWindows -and (Get-Command -Name Set-Clipboard -ErrorAction SilentlyContinue)) {
+ Set-Clipboard -Value ('&''{0}''' -f $PSCommandPath)
21
+ Write-Warning -Message '(The command has been copied to your clipboard.)'
22
+ }
23
return
24
}
25
else
0 commit comments