Microsoft is increasingly pushing BitLocker encryption onto new devices. Do you know your BitLocker recovery passwords (keys)? I’m deploying the following script to to run daily in my RMM tool on all customer computers. It’s just two lines in PowerShell, but it could literally save the day...
Summary: Use Windows PowerShell to get the BitLocker recovery key. How can I quickly find my BitLocker recovery key? Jason Walker, Microsoft PFE, says: From an elevated Windows PowerShell console, use theGet-BitlockerVolumefunction, select-MountPointC, and choose theKeyProtectorproperty: (Get-Bi...
# 配置透明数据加密 (TDE) $virtualDisk = Get-VirtualDisk -FriendlyName "RAID1Disk" $encryption = New-StorageEncryption -EncryptionType BitLocker -KeyProtector (Get-BitLockerKeyProtector -VolumeId $virtualDisk.UniqueId).KeyProtector Set-StorageEncryption -Encryption $encryption 这些示例展示了如何利用 Po...
We will configure that policy to be compatible with Surface Hub devices. If this script has been used before, please enter the name of the existing policy.' $easpolicy = $null try { $easpolicy = Get-MobileDeviceMailboxPolicy $strPolicy } catch {} if ($easpolicy) { if (!$easpolicy....
I have setup two GPO's, as well as two different Powershell commands to Enable Bitlocker. I had both Poweshell scripts working. However, I soon realized that I didn't have something in the script that was creating a Recovery Key\Passwords and exporting them into AD. (I have this ...
A lot of the following script examples come from a function I wrote calledBitLockerSAK. It is a tool written in Windows PowerShell that makes BitLocker tasks easier to automate. Finally, we arrive at the interesting part: the encryption of the drive. Don’t get me wrong—the Trusted Platfor...
Start-Job 會使用 ScriptBlock 參數來執行 Get-Counter 命令。 Get-Counter 會使用 Counter 參數來指定計數器路徑 \LogicalDisk(_Total)\% Free Space。 MaxSamples 參數會指定取得計數器的 1000 個樣本。範例6:從多部計算機取得計數器數據此範例會使用變數從兩部計算機取得性能計數器數據。 PowerShell 複製 $Disk...
在此示例中,我们将创建一个脚本分析器配置文件,并将其保存在当前目录中的 ScriptAnalyzerProfile.txt 文件中。 我们在 BitLocker 模块文件上运行 Invoke-ScriptAnalyzer。 配置文件 参数的值是脚本分析器配置文件的路径。PowerShell 复制 # In .\ScriptAnalyzerProfile.txt @{ Severity = @('Error...
运行Get-Command 列出所有的 Windows PowerShell cmdlet,最终我发现了 Select-Object。它的描述为使用它将“选择某个对象或对象集的指定属性”。所以我尝试运行以下命令:复制 gwmi win32_logicaldisk -filter "drivetype = 3" | select freespace 通过将 Gwmi 的结果传送到 Select(Select-Object 的别名),我可以...
To view the performance counter output from the job, use the Receive-Job cmdlet. PowerShell Copy Start-Job -ScriptBlock { Get-Counter -Counter "\LogicalDisk(_Total)\% Free Space" -MaxSamples 1000 } Id Name PSJobTypeName State HasMoreData Location Command -- --- --- --- --- --...