Converting Windows Script Host Methods to Windows PowerShell Commands

Part of the VBScript to Windows PowerShell Conversion Guide

Windows Script Host (WSH) is designed primarily to server as a scripting environment. As the WSH language reference notes, “When a script arrives at your computer, WSH plays the part of the host – it makes objects and services available for the script and provides a set of guidelines within which the script is executed. Among other things, Windows Script Host manages security and invokes the appropriate script engine.”

Nevertheless, Windows Script Host does include a language component, and it includes a number of methods whose functionality is not replicated by any other VBScript-accessible COM object. What methods are we talking about? See below.

VBScript to Windows PowerShell Conversion Guide Home

  • AddWindowsPrinterConnection
  • AppActivate
  • Close
  • ConnectObject
  • Count
  • CreateObject
  • CreateScript
  • DisconnectObject
  • Echo
  • EnumNetworkDrives
  • EnumPrinterConnections
  • Exec
  • Execute
  • Exists
  • ExpandEnvironmentStrings
  • GetObject
  • GetResource
  • LogEvent
  • MapNetworkDrive
  • Popup
  • Quit
  • Read
  • ReadAll
  • ReadLine
  • RegDelete
  • RegRead
  • RegWrite
  • Remove
  • RemoveNetworkDrive
  • RemovePrinterConnection
  • Run
  • Save
  • SendKeys
  • SetDefaultPrinter
  • ShowUsage
  • Sign
  • SignFile
  • Skip
  • SkipLine
  • Sleep
  • Terminate
  • Verify
  • VerifyFile
  • Write
  • WriteBlankLines
  • WriteLine

Top of pageTop of page