Summary: Learn how to use Windows PowerShell to view contents of a VBScript file.
How can I use Windows PowerShell to easily view the contents of a VBScript file, such as SLMGR.VBS? I do not know the path to the file.
You do not need to know the path to the file. Use the Windows PowerShell Get-Command cmdlet to find the script (listed, incidentally, as an application) and pipe the results to Get-Content, as shown here.
Get-Command -Name slmgr.vbs | Get-Content | more
You can find the path to all of these types of VBScripts by using a wild card for the name, as shown here.
Get-Command -Name *.vbs -CommandType application | select path