Script to locate TPM chip and it's status (VBScript)

Introduction

This script will demo how to locate TPM chip and it's status.

Scenarios  

Form the related cases, we could see that there are many already requirements from the IT admins, so the IT admins really need this script..

Script

Step1: Run  "Command Prompt" as Administrator.
Step2: Enter "Scriptpath  textpath" in to the Prompt,and press Enter.
After the script executed, you can find another record is added in the text file.
Note please ensure the local computer has the permission to read and write the shared file.
 
Here are some code snippets for your references. To get the complete script sample, please click the download button at the beginning of this page.
VB Script
Edit|Remove
Txtpath = WScript.Arguments(0)     
Set objshell = CreateObject("wscript.shell") 
strComputer = objshell.ExpandEnvironmentStrings("%Computername%") 
Set objFSO = CreateObject("Scripting.FileSystemObject") 
If objFSO.FileExists(TxtPath) Then  
    Set txtFile = objFSO.OpenTextFile(TxtPath , 8, True) 
Else 
    Set txtFile = objFSO.CreateTextFile(TxtPath) 
End If

Additional Resources

CreateObject