What does the & symbol in powershell mean?

前端 未结 1 607
北荒
北荒 2020-12-13 01:18
$tool = \'C:\\Program Files\\gs\\gs9.07\\bin\\gswin64c.exe\'

& $tool -q -dNOPAUSE -sDEVICE=tiffg4 $param -r300 $pdf.FullName -c quit

Can someo

相关标签:
1条回答
  • 2020-12-13 01:57

    & is the call operator which allows you to execute a command, a script, or a function. For more details: &

    Syntax
          & "[path] command" [arguments]
    

    Example:

    $LocalComputerName = & $ENV:windir\System32\HostName.exe
    

    Also, if you use an IDE (such as PowerGUI) you can block it from opening a separate window when executing a secondary process:

    & more
    Start-Process "my_script.here"
    
    0 讨论(0)
提交回复
热议问题