function Get-MACAddress { 
    param ($strComputer) 
     
    $colItems = get-wmiobject -class "Win32_NetworkAdapterConfiguration" -computername $strComputer |Where{$_.IpEnabled -Match "True"}  
     
    foreach ($objItem in $colItems) {  
     
        $objItem |select Description,MACAddress  
     
    } 
}

If ((Get-WindowsFeature bitlocker).Installstate -Ne "Installed") {
        Install-WindowsFeature BitLocker -IncludeAllSubFeature -IncludeManagementTools -Restart
    }
else {
    echo yes
    }

If (-Not (get-gpo -name "TPM")){
    new-gpo -name "TPM" | New-GPLink -target (Get-ADDomain).DistinguishedName
    }
else {
    echo yes
    }

$SecureString = ConvertTo-SecureString (Get-MACAddress localhost).MACAddress -AsPlainText -Force
Enable-BitLocker -MountPoint "C:" -EncryptionMethod Aes256 -PasswordProtector $SecureString
restart-computer