Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Bitlocker Status into SCCM Task Sequence Variable

$
0
0

I have a PowerShell script that will create 3 SCCM 2012 Task Sequence variables to check if TPM is Owned, TPM isActive, and if Bitlocker is on. This is the script:

Text
# create the SCCM tasksequence object $tsenv = New-Object -COMObject Microsoft.SMS.TSEnvironment ############# Define variables ################ # Query the wmi of the computer for the status of the TPM chip if ((Get-WmiObject -class Win32_Tpm -namespace "root\CIMV2\Security\MicrosoftTpm").IsOwned_InitialValue){ $tsenv.Value("TPMIsOwned")="True" } if ((Get-WmiObject -class Win32_Tpm -namespace "root\CIMV2\Security\MicrosoftTpm").IsActivated_InitialValue){ $tsenv.Value("TPMIsActive")="True" } if (((Get-WmiObject -Namespace "root\CIMV2\Security\MicrosoftVolumeEncryption" -Class Win32_EncryptableVolume).GetProtectionStatus().ProtectionStatus) = 1){...

Viewing all articles
Browse latest Browse all 15370

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>