Share a Powershell variable with VBscript RRS feed

  • Question

  • Anybody knows a way to create a Powershell variable and share the value by a VBscript? I want to call a VBscript for email purposes within a Powershell script.


    Sunday, December 2, 2018 3:09 PM


  • Variables cannot be shared.  Just call the VBScript and pass the variable's value as an argument.

    $var = 'my value'
    <path>\script.vbs $var

    Values can only be passed as strings.


    • Proposed as answer by BOfH-666 Sunday, December 2, 2018 7:11 PM
    • Marked as answer by Goku777 Monday, December 3, 2018 12:24 AM
    Sunday, December 2, 2018 5:27 PM