Remove all phone numbers on all users in OU in Windows domain

To remove all phone numbers from all users in Windows domain in a certain OU, run PowerShell script to fix it

Get-ADUser -SearchBase ‘OU=Desktop users,OU=Users and groups,OU=Lessor,DC=int,DC=lessor,DC=dk’ -Filter * | ForEach-Object {Set-ADUser -OfficePhone $null $_ }

Kommentarer

Populære opslag fra denne blog

Microsoft Office 2016 and the AUTO_ACTIVATE property

Access Exchange online with Office 365 multi-factor authentication (MFA/2FA)

Disable logon and logoff events (event id 4624, 4625, 4634 (and all the other ones...))