- 1 year ago
How to Call TpmVscMgr.exe (a 32-Bit Utility) from PowerShell Running in 64-Bit Mode
To call TpmVscMgr.exe, a 32-bit utility, from PowerShell running in 64-bit mode, you can use the Start-Process
cmdlet with the -FilePath
parameter set to the path of TpmVscMgr.exe and the -ArgumentList
parameter set to the arguments you want to pass to TpmVscMgr.exe.
Here is an example PowerShell script that demonstrates how to do this:
bash# Set the path to TpmVscMgr.exe
$tpmVscMgrPath = "C:\Windows\SysWOW64\TpmVscMgr.exe"
# Set the arguments to pass to TpmVscMgr.exe
$arguments = "/CreateVirtualSmartCard /AdminKeyAuth key1 /CardName MyVirtualSmartCard /Pin 1234 /AdminKeyAuth key2"
# Call TpmVscMgr.exe using Start-Process
Start-Process -FilePath $tpmVscMgrPath -ArgumentList $arguments -Wait
In this example, the script sets the path to TpmVscMgr.exe to "C:\Windows\SysWOW64\TpmVscMgr.exe"
, which is the path to the 32-bit version of the utility on a 64-bit system. It then sets the arguments to pass to TpmVscMgr.exe to "/CreateVirtualSmartCard /AdminKeyAuth key1 /CardName MyVirtualSmartCard /Pin 1234 /AdminKeyAuth key2"
. Finally, it calls TpmVscMgr.exe using Start-Process
with the -FilePath
parameter set to $tpmVscMgrPath
and the -ArgumentList
parameter set to $arguments
. The -Wait
parameter tells PowerShell to wait for the command to complete before continuing.