fork download
  1. ' List Windows Product Activation Status
  2.  
  3.  
  4. strComputer = "."
  5. Set objWMIService = GetObject("winmgmts:" _
  6. & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
  7.  
  8. Set colWPA = objWMIService.ExecQuery _
  9. ("Select * from Win32_WindowsProductActivation")
  10.  
  11. For Each objWPA in colWPA
  12. Wscript.Echo "Activation Required: " & objWPA.ActivationRequired
  13. Wscript.Echo "Description: " & objWPA.Description
  14. Wscript.Echo "Product ID: " & objWPA.ProductID
  15. Wscript.Echo "Remaining Evaluation Period: " & _
  16. objWPA.RemainingEvaluationPeriod
  17. Wscript.Echo "Remaining Grace Period: " & objWPA.RemainingGracePeriod
  18. Wscript.Echo "Server Name: " & objWPA.ServerName
  19. Next
Success #stdin #stdout 0s 3008KB
stdin
Standard input is empty
stdout
Standard output is empty