Difference between revisions of "Power Shell"

Jump to navigation Jump to search
m (→‎WMI: Revised WMI examples etc)
m (→‎Strings: Added "Strip Whitespace")
Line 109: Line 109:
For proper regular expressions support, use the following syntax
For proper regular expressions support, use the following syntax
<source lang="powershell"> $query = [regex]::Replace($query, "search", "replace") </source>
<source lang="powershell"> $query = [regex]::Replace($query, "search", "replace") </source>
<br>'''Strip Whitespace'''<br>
<source lang="powershell"> $string = $string.TrimEnd() </source>


== Credentials ==
== Credentials ==