Closed skyrid3r698 closed 10 months ago
function Test-ADRecycleBin { $enabledScopes = (Get-ADOptionalFeature -Filter 'name -like "Recycle Bin Feature"').EnabledScopes
if ($enabledScopes)
{
Write-Output -InputObject 'Enabled'
}
else
{
Write-Output -InputObject 'Disabled'
}
}
Implemented with commit https://github.com/skyrid3r698/dc_prep/commit/e5fa70f1c25d33600d5aeebd64fcd9626adfbaf1
Enable-ADOptionalFeature 'Recycle Bin Feature' -Scope ForestOrConfigurationSet -Target