source: Option Explicit
  Dim dayNum
  dayNum = Weekday(Date)
  MsgBox "Test #59 - Day " & dayNum
target: Add-Type -AssemblyName Microsoft.VisualBasic
  Option Explicit
  
  $dayNum = [Microsoft.VisualBasic.DateAndTime]::Weekday([Microsoft.VisualBasic.DateAndTime]::Today)
  [Microsoft.VisualBasic.Interaction]::MsgBox "Test #59 - Day " + $dayNum