Search notes:

Powershell: Param(Parameter(ValueFromRemainingArguments=$true|$false))

function show-remaining-arguments {

   param (

      [parameter(
         mandatory                   = $false
      )]
      [string] $arg_1,

      [parameter(
         mandatory                   = $false,
         valueFromRemainingArguments = $true
      )]
      [string[]] $args
   )

   write-host "First Argument:       $arg_1"

   $r = 0
   foreach($arg in $args) {
      $r ++;
      write-host "Remaining Argument $r`: $arg"
   }
}
Github repository about-PowerShell, path: /language/statement/function/parameters/attributes/parameter/valueFromRemainingArguments/show-remaining-arguments.ps1
show-remaining-arguments   ABC
show-remaining-arguments   one two three four
show-remaining-arguments  -args bar,baz foo

See also

$myInvocation.line
Function and script parameter attributes

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/...', 1758199968, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Windows/PowerShell/language/statement/function/parameters/attributes/parameter/valueFromRemainingArguments/index(69): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78