• Powershell: How to re-provsion the sync DB to resolve the issue that User Profile Synchronization Service fails to start?

    You can use the below script: ================================== Get-SPDatabase $syncdb=Get-SPDatabase -Id $syncdb. Unprovision () $syncdb.Status='Offline' Get-SPServiceApplication $upa=Get-SPServiceApplication - Id $upa.ResetSynchronizationMachine...
  • Powershell: How to restart the User Profile Synchronization Service if disabled?

    Below script shows how to restart the User Profile Synchronization Service if disabled. ============================================ # Loads the SharePoint 2010 PowerShell extensions Add-PSSnapIn Microsoft.SharePoint.PowerShell # Sets variable...
  • CPP: How to wait on a job object?

    This is the sample code in CPP to show how to wait on a job object. In the documentation: The state of a job object is set to signaled when all of its processes are terminated because the specified end-of-job time limit has been exceeded. Use WaitForSingleObject...
  • Error "The certificate enrollment page you are attempting to access cannot be used with this version of Windows" after MS11-051 patch installation

    Symptom: You have Windows Server 2003 with installed Certification Authority and Web Enrollment components. When you try to access web enrollment pages from a Windows Vista-based (or newer) computer you receive error: The certificate enrollment...
  • How to query network adapter for IPv6 protocol?

    Assuming you need it in script, PowerShell: # computername $MachineName = 'localhost' # open HKLM reg on $MachineName $reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $MachineName) # open subKey SYSTEM\CurrentControlSet...