Jump to content

PowerShell + Firstboot + TPM

Recommended Posts

Hey all,  

i need to enable TPM on laptops.

For one older, i need to enable it from Windows.

I have found a way to enable it through PowerShell with this command : Initialize-Tpm -AllowClear -AllowPhysicalPresence

After applying it, the computer reboot and prompt me with F1 key to reset TPM and after that i can enable Bitlocker.

I am looking for an option to call PowerShell script that can be executed on FirstBoot process.

I created a batch file that call ps1 (PowerShell.exe -command c:\Platform\TPM\TPM.ps1) but the script seems to not applied.

Any idea or better way?

Link to comment
Share on other sites

  • 4 months later...

Hi Joseph, I am trying to do something similar. I have a powershell script that will check the chassi, if it is a laptop it will install Office on it.

I have saved my installation files to local drive. Can I just call my power script from the Task command line like this:

powershell.exe -NOprofile -ExecutionPolicy Bypass -File C:\windows\software\Officeinstall.ps1

I am also doing this using the first boot option, so it should run as "system".

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...