Get-Clipboard of Powershell : '-Raw' option? Get-Clipboard of Powershell : '-Raw' option? powershell powershell

Get-Clipboard of Powershell : '-Raw' option?


$tempfile = New-TemporaryFile@'some different lines of text'@ | Set-Content $tempfileGet-Content $tempfile | Set-Clipboard$text = Get-Clipboard$text.count3$text = Get-Clipboard -Raw$text.Count1

As it said it is a single string, rather than an array of strings.

Here is one example of the many times it matters.

$text = Get-Clipboard$text -match 'different'different lines$text = Get-Clipboard -Raw$text -match 'different'true