31 March 2019

SYSVOL and NETLOGON Share is missing in Newly Built Domain Controllers

I recently provisioned a new Domain Controller, running Server 2016.  

After joining to domain, adding the AD roles and then promoting to DC, I noticed the NETLOGON and SYSVOL folders were missing.  Not just the shares, but the actual folders themselves.

Luckily, I was able to fix this rather easily, by following these steps:

  1. Click Start, click Run, type regedit, and then click OK.
  2. Locate the following subkey in Registry Editor:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters
  3. In the details pane, right-click the SysvolReady flag, and then click Modify.
  4. In the Value data box, type 0, and then click OK.
  5. Again in the details pane, right-click the SysvolReady flag, and then click Modify.
  6. In the Value data box, type 1, and then click OK.
Once this is done, you simply have to stop and start the netlogon service.

  • Net Stop Netlogon
  • Net Start Netlogon

24 March 2019

Remove .local address before O365 Migration

I was recently performing an O365 migration for a client who had lots of domain.local aliases.
There was no policy enforcing these addresses, and their accounts weren't picking up email address policies either.

The best way to find out who's got the .local address and then remove it is by running the following commands/scripts:


get-mailbox | where {$_.emailaddresses -like “*domain.local*”}


This will show you who has the domain.local address.  Once you've worked this out, you can then run the following script, which will go through and make sure that address is completely deleted from each mailbox alias.


$users = get-mailbox | where {$_.emailaddresses -like “*domain.local*”}
foreach ($user in $users)
{
$addresses = (get-mailbox $user.alias).emailaddresses
$fixedaddresses = $addresses | where {$_.proxyaddressstring -notlike “*domain.local”}
set-mailbox $user.alias -emailaddresses $fixedaddresses
}


The bold sections is where you need to update the domain name to whatsoever your .local address is.