Query BitLocker status on remote machines

    This PowerShell script will remotely query each machines found in the specified answer file (using manage-bde.exe) to determine if BitLocker protection is ON or OFF.  Results will be saved to a CSV file. Very useful trick if you not have a specialized tool for. Just change the necessary variables and run...

    This is a very easy and simple script to use across your environment using manage-bde command line tool.

* You need to run as Admin 

# bitlocker status
$TextFilePath = Read-Host "What is the path to the text file?"
If (Test-Path $TextFilePath){
    $ComputersArray = Get-Content $TextFilePath
    $ComputerStatusCol = @()
ForEach ($Computer in $ComputersArray) {
        If (Test-Connection $Computer -Count 1){
            $ComputerStatus = manage-bde -status -cn "$Computer" 
            $ComputerStatusCol += $ComputerStatus
        } Else {
            Write-Host("$Computer appears to be offline.")
        }
    }
    $ComputerStatusCol | Out-File -filepath "c:\utils\Bitlocker-Status.txt" -append -force
Else {
    Write-Error "The text file was not found, check the path."
}


Visit my Powershell GitHub repository and contribute if you want... :-)
look for query_bitLocker.ps1

You need to insert the local path for a answer file with machines name to scan. After run on all machines, script will write data to a Out-File.  If you want to append data to this file instead of cleanning every time, do not forget to use -append -force


How to use it??




Liked !? Leave your comment !!

Do you know my linux Essentials course??

Disclaimer
    The sample scripts are not supported under any Microsoft standard support program, service or even by me. The sample scripts are provided AS IS without warranty of any kind. Use on your own risk.

Nenhum comentário:

Postar um comentário