Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the special character "!" mean in PowerShell?

What does the special character ! mean in PowerShell?

Or a site which lists all special characters and meaning. Example:

$string = blah
!$String

(Returns $false)

like image 925
user2850560 Avatar asked Dec 29 '13 17:12

user2850560


1 Answers

PowerShell uses the ! character as an alias for the logical -not operator:

$true
!$true
$false
!$false

True
False
False
True
like image 133
mjolinor Avatar answered Oct 01 '22 02:10

mjolinor