Error 0x800F0922 or 0x800F0902 when installing SNMP Service

Had an interesting issue. Our installation of SNMP service kept failing.

The same error was shown when using PowerShell, DISM and Server manager.

Long story short, weirdly the installation is only deemed successful if the service can start, if it cannot, the whole installation is rolled back.

In our case a 3rd party app was hogging UDP 161 and SNMP failed to start hence the installation kept rolling back.

The culprit was identified by looking for the process that uses UDP 161 in output of command “NETSTAT -anb”

After killing this process installation work

Clear all Active Directory users’ manager attribute

Clear all Active Directory users’ manager attribute. See POC video

Option Explicit

Dim adoCommand
Dim adoConnection
Dim objRootDSE
Dim strDNSDomain
Dim strBase
Dim strFilter
Dim strAttributes
Dim strQuery
Dim adoRecordset
Dim strDN
Dim objUser
' Setup ADO objects.
Set adoCommand = CreateObject("ADODB.Command")
Set adoConnection = CreateObject("ADODB.Connection")
adoConnection.Provider = "ADsDSOObject"
adoConnection.Open "Active Directory Provider"
Set adoCommand.ActiveConnection = adoConnection
' Search entire Active Directory domain.
Set objRootDSE = GetObject("LDAP://RootDSE")
strDNSDomain = objRootDSE.Get("defaultNamingContext")
strBase = "<LDAP://" & strDNSDomain & ">"
' Filter for users
strFilter = "(&(objectCategory=person)(objectClass=user))"
' Comma delimited list of attribute values to retrieve.
strAttributes = "distinguishedName"
' Construct the LDAP syntax query.
strQuery = strBase & ";" & strFilter & ";" & strAttributes & ";subtree"
adoCommand.CommandText = strQuery
adoCommand.Properties("Page Size") = 100
adoCommand.Properties("Timeout") = 30
adoCommand.Properties("Cache Results") = False
' Run the query.
Set adoRecordset = adoCommand.Execute
' Enumerate the resulting recordset.
Do Until adoRecordset.EOF
    ' Retrieve values.
    strDN = adoRecordset.Fields("distinguishedName").Value
    ' Bind to the user object.
    Set objUser = GetObject("LDAP://" & strDN)
    ' Clear the manager attribute.
    objUser.PutEx ADS_PROPERTY_CLEAR, "manager", 0
    ' Save change to AD.
    ' Move to the next record in the recordset.
' Clean up.

BizTalk – WCF-SQL Issues

Just some issues I experienced using WCF-SQL…

Error: Value cannot be null


Solution: Specify a SOAP Action Header. This can also be found in the XSD of the generated metadata



Error: Received unexpected message type, does not match expected type


Solution: Change the receive pipeline to XMLReceive


BizTalk how to use same message inside and outside loop

  1. Create two Orchestration messages of same type. In this case I refer to them as Message1 and Message2
  2. Create a Orchestration variable of type System.Xml.Document. Tn this case I refer to it as xmlDocument
  3. Construct Message1 outside, before the loop with a Transform ect.
  4. Inside loop, within a single Construct Shape:
    1. Assign xmlDocument to Message2
    2. Manipilate Message2
    3. Assign Message2 to xmlDocument
  5. Outside, after the loop, assign xmlDocument to Message1
  6. Return Message1

BizTalk – Rename Output File Based on Some Attribute in Orchestration

  1. Create an Orchestration string variable (in this case testVAR)
  2. Add assignment shape with code below
  3. Change the send location output file name to %SourceFileName%
    outputMessage = outputMessage ;
    testVAR = xpath(outputMessage,"string(/*[local-name()='SomeName1' and namespace-uri()='SomeSchema']/*[local-name()='SomeName2' and namespace-uri()='']/*[local-name()='SomeName3' and namespace-uri()='']/text())");
    outputMessage(FILE.ReceivedFileName) = testVAR + ".TXT";


Get ClientContext in SharePoint App

Add the following function

    function getParameterByName(name) {
        name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
        var regex = new RegExp("[\\?&amp;]" + name + "=([^&amp;#]*)"),
            results = regex.exec(;
        return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));

Then you can use this to get ClientContext

    siteUrl = getParameterByName("SPAppWebUrl");

    var clientContext = new SP.ClientContext(siteUrl);

BizTalk – Using Tag Identifiers on Optional Records

Problem: I have a flat file with optional records for which I need to create a schema. Validation of schema only succeeds when a file is selected that contains all the possible records and fails if any is removed.

Resolution: Change the Parser Optimization (located on the schema node) to “Complexity” instead of “Speed” optimization.


MoveSysvol – Automate the relocation of the Sysvol folder (DFSR Version)

MoveSysvol (DFSR version) automated by Shaun Vermaak is a batch to automatically relocate the Sysvol folder as per

The following must be in the working folder or in path:

UPDATE: Please ensure that all DCs are in the default Domain Controllers OU

Example: MoveSysvol.bat C:WindowsSYSVOL D:SYSVOL TESTDOMAIN.COM