skyrid3r698 / dc_prep

0 stars 0 forks source link

activate ad trashcan #1

Closed skyrid3r698 closed 10 months ago

skyrid3r698 commented 1 year ago

Enable-ADOptionalFeature 'Recycle Bin Feature' -Scope ForestOrConfigurationSet -Target

skyrid3r698 commented 1 year 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'
}

}

skyrid3r698 commented 10 months ago

Implemented with commit https://github.com/skyrid3r698/dc_prep/commit/e5fa70f1c25d33600d5aeebd64fcd9626adfbaf1