Search notes:

PowerShell: the automatic variable $psItem ($_)

$_ is an alias for $psItem.
The following two pipelines are equivalent:
'foo', 'bar', 'baz' | forEach-object { write-host $_      }
'foo', 'bar', 'baz' | forEach-object { write-host $psItem }
Github repository about-PowerShell, path: /language/variable/automatic/psItem/equivalency.ps1
In a pipeline, $_ refers to the object that is received from the last step in the pipeline.
In a catch block, $_ refers to the exception object (whose type is System.Management.Automation.ErrorRecord) that caused the catch block to be invoked.
In a switch statement, $_ is an alias for the object being tested.

See also

Other automatic variables

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Windows/...', 1738303271, '3.138.137.175', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Windows/PowerShell/language/variable/automatic/psItem/index(51): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78