Monday, September 19, 2016

DFS-R stopped replication Event 4012

If the DFS-R service stopped replication and you can see Events with ID 4012 in the DFS Replication Log, you can do the following steps to resolve this issue.
First have a look into the event 4012:

In the log we can see that the server has been disonnected for 101 days. To resume the replication, we have to change MaxOfflineTimeInDays to a value above 101 or rebuild it.
I will show you how to set the value to resume the replication. Just do the following steps:
- Set MaxOfflineTimeInDays in cmd:
wmic.exe /namespace:\\root\microsoftdfs path DfsrMachineConfig set MaxOfflineTimeInDays=102
- Restart DFS-R service in cmd:
net stop dfsr && net start dfsr

After that you can check the DFS Replication log and you will see that the replication resumed. It´s normal that it will detect conflicts (Event 4412).

Next Steps:
To prevent this issue, you can create a Powershell script that search for Event 2213 is logging the ROOT cause for Event 4412 that will be generated 60 days later. If an event was found it will send out an email. The Powershell script will be executed on a daily base in a schedule task, so you will be informed if this event happen on your server.




Wednesday, August 10, 2016

Windows 10 deployment and management lab kit


The Windows 10 Deployment and Management Lab Kit includes everything you need to review the new in-place upgrade option plus traditional deployment methods and other management tools.

Just get the lab here. 


Monday, August 8, 2016

Count number of GPOs using Powershell

Hi guys,

today I want to show you, how to count your GPOs. I also want to show you how to create filters that could be useful...

This script will show you the number of all GPOs in your domain:

$GPOCOunt = ((Get-GPO -All).count)
Write-Host "Number of GPOs: $GPOCOunt"

If you have a naming convention in place, you could filter and count these GPOs.
For example you name GPOs based on location shortcuts like US.
So lets get all GPOs starting with "US":

# Get all GPOs that are starts with US
$GPOCOuntUS = ((Get-GPO -All | where{($_.displayname –like “US*”)}))
# Count them
$GPOCOuntUS2 = $GPOCOuntUS.count
# Write output
Write-Host "Number of GPOs for US: $GPOCOuntUS2"

Another good filter (almost all use it I think...) is test
So lets get all GPOs that include the word test:
$GPOCOuntTest = ((Get-GPO -All | where{($_.displayname –like “*test*”)}))
$GPOCOuntTest2 = $GPOCOuntTest.count
Write-Host "Number of your TEST GPOs: $GPOCOuntTest2"

Tuesday, August 2, 2016

Hide a Windows Update in Windows 10

  1. Just download wushowhide.diagcab
  2. Run wushowhide.diagcab
  3. Click on Next
  4. Click Hide updates
  5. Select the updates you want to hide
  6. Click on Next and Close