Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

Converting VBScript's Call Statement

Windows PowerShell

Definition: Transfers control to a Sub or Function procedure.


The Call statement is optional in VBScript: you can call a subroutine or function either by using the Call statement followed by the procedure name or by simply specifying the procedure name. The Call statement is not used at all in Windows PowerShell; instead, you call a function simply by specifying the function name followed by any function parameters. For example, this command calls the function MultiplyNumbers, supplying a pair of parameters (25 and 67):

multiplynumbers 25 67

Return to the VBScript to Windows PowerShell home page

© 2016 Microsoft