Add some documentation
This commit is contained in:
@@ -28,8 +28,8 @@ Function Test-CommandExists {
|
|||||||
Example of how to run the script.
|
Example of how to run the script.
|
||||||
|
|
||||||
.LINK
|
.LINK
|
||||||
Links to further documentation.
|
https://devblogs.microsoft.com/scripting/use-a-powershell-function-to-see-if-a-command-exists/
|
||||||
|
|
||||||
.NOTES
|
.NOTES
|
||||||
Detail on what the script does, if this is needed.
|
Detail on what the script does, if this is needed.
|
||||||
|
|
||||||
@@ -45,10 +45,10 @@ Function Test-CommandExists {
|
|||||||
Return $true
|
Return $true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch {
|
Catch {
|
||||||
Return $false
|
Return $false
|
||||||
}
|
}
|
||||||
finally {
|
Finally {
|
||||||
$ErrorActionPreference = $OldPreference
|
$ErrorActionPreference = $OldPreference
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user