This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$GooglePolicyObj = $null | |
$GooglePolicyObj = Get-ItemProperty -Path HKCU:\SOFTWARE\Policies\Google\Chrome -Name "UserDataDir" | |
$GoogleUserDir = $env:LOCALAPPDATA + "\Google\Chrome\User Data" | |
if ($GooglePolicyObj -ne $null) { | |
$GoogleUserDir = $GooglePolicyObj.UserDataDir -replace "\$\{documents\}", [Environment]::GetFolderPath("MyDocuments") | |
} | |
$jsonPath = $GoogleUserDir + "\Local State" | |
if (![System.IO.File]::Exists($jsonPath)) { | |
Write-Host ($jsonPath + " does not exist, strange") | |
return |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ADUser -SearchBase "OU_DISTINGIUSHED_NAME" -Filter * -ResultSetSize 5000 -properties * | select UserPrincipalName, Name, CanonicalName, Created, extensionAttribute4, @{n="LastLogon";e={[datetime]::FromFileTime($_.lastLogon)}}, AccountExpirationDate, Enabled, @{n="MemberOf";e={($_.memberof | %{(Get-ADGroup $_).sAMAccountName}) -join ";"}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-VBRBackup | where { $_.VmCount -gt 0 -and $_.JobType -eq "Backup"} | % { $_.Name; Get-VBRRestorePoint -Backup $_.Name | select Name -uniq | % { Get-VBRRestorePoint -Name $_.Name | Sort-Object {$_.CreationTime.toString("yyyyMMddHH")} -Descending | select -First 1 } } |