Call

The call operator is used to execute a string or script block. For example, the call operator may be used to execute the ipconfig command:

$command = 'ipconfig' 
& $command 

Or it may be used to execute a script block:

$scriptBlock = { Write-Host 'Hello world' } 
& $scriptBlock 

The call operator accepts a list of arguments that can be passed to the command. For example, the displaydns parameter can be passed into the ipconfig command:

& 'ipconfig' '/displaydns' 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.186.46