Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $key = 'HKLM:\SOFTWARE\WOW6432Node\RES\Workspace Manager'
- $dbcachepath = (Get-ItemProperty -Path $key -Name LocalCachePath).LocalCachePath
- $size = "{0:N2} MB" -f ((Get-ChildItem $dbcachepath -Recurse | Measure-Object -Property Length -Sum -ErrorAction Stop).Sum / 1MB)
- $transactions = Get-ChildItem "$dbcachepath\Transactions"
- Write-Host -ForegroundColor Yellow "The Ivanti Workspace Control DB cache folder located at $dbcachepath is $size"
- If($transactions -eq $null){
- Write-host -ForegroundColor Green "The transactions folder is empty"
- } ELSE {
- Write-host -ForegroundColor Red "The transactions folder is not empty and contains the following files $transactions.name"
- }
Advertisement
Add Comment
Please, Sign In to add comment