Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Import-Module Invoke-Parallel
- $folderlocation = "C:\Users\matthew.brown\Documents\Knowledge\Scripts\Bitlocker Inventory"
- $hostname = $null
- $hostnames = Get-Content "$folderlocation\TEST.txt"
- $Script = {
- $Session = New-PSSession -ComputerName $_
- $BDEresult = Invoke-Command -Session $Session -ScriptBlock {manage-bde -status -computername $hostname}
- Remove-PSSession $Session
- return $BDEresult
- }
- $params = @{
- ComputerName = $hostnames;
- ScriptBlock = $Script;
- ImportVariables = $True;
- RunspaceTimeout = 900;
- Throttle = 100;
- Verbose = $True
- }
- $Report = @(Invoke-Parallel @params)
- $Result = $Report | Where-Object {$_ -like "*aes*"}
- $Result | Export-Csv "$folderlocation\TESTRESULTS.txt"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement