Microsoft
Copyright Notice
SFL Services LLC has prepared this document for use only by their staff, agents, customers and prospective customers. Companies, names and data used as examples in this document are fictitious unless otherwise noted. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of SFL Services LLC, who reserve the right to change specifications and other information contained herein without prior notice. The reader should consult SFL Services LLC to determine whether any such changes have been made.
Licensing and Warranty
The terms and conditions governing the licensing of SFL Services LLC software consist solely of those set forth in the written contracts between SFL Services LLC and its customers. Except as expressly provided for in the warranty provisions of those written contracts, no representation or other affirmation of fact contained in this document, including but not limited to statements regarding capacity, suitability for use or performance of products described herein, shall be deemed to be a warranty by SFL Services LLC for any purpose, or give rise to any liability of SFL Services LLC whatsoever.
Liability
In no event shall SFL Services LLC be liable for any incidental, indirect, special or consequential damages whatsoever (including but not limited to lost profits) arising out of or related to this document or the information contained in it, even if SFL Services LLC had been advised, knew or should have known of the possibility of such damages, and even if they had acted negligently.
- Windows - Update additional resources
- Windows - How to delete the Recovery Partition
- Windows - Set Logon Server
- Windows - How To Fix DFS Replication Event 4012 on Domain Controller
- Windows - Delete user Graph
- Windows - How To Fix DISM Source Files Could Not Be Found In Win10
- Windows - Windows Logon Service
- Windows - Online Repair
- Windows - How to Switch Domain Controller
- Windows 11 - Bypass Microsoft Account Requirement
Windows - Update additional resources
Try resetting the Windows Update Agent by running these commands from an elevated command prompt:
net stop wuauserv
rd /s /q %systemroot%\SoftwareDistribution
net start wuauserv
Reset Windows Update components manually
-
Open a Windows command prompt. To open a command prompt, select Start > Run. Copy and paste (or type) cmd and then press Enter.
-
Stop the BITS service, the Windows Update service and the Cryptographic service. Type the following commands at a command prompt. Press Enter after you type each command.
ConsoleCopy
net stop bits net stop wuauserv net stop cryptsvc
-
Delete the qmgr*.dat files. Type the following command at a command prompt, and then press Enter:
ConsoleCopy
Del "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr*.dat"
-
If it is your first attempt at resolving your Windows Update issues by using the steps in this article, go to step 5 without carrying out the steps in step 4. The steps in step 4 should only be performed at this point in the troubleshooting if you can't resolve your Windows Update issues after following all steps but step 4. The steps in step 4 are also performed by the "Aggressive" mode of the Fix it Solution above.
-
Rename the following folders to *.BAK:
-
%Systemroot%\SoftwareDistribution\DataStore
-
%Systemroot%\SoftwareDistribution\Download
-
%Systemroot%\System32\catroot2
To do this, type the following commands at a command prompt. Press Enter after you type each command.
ConsoleCopy
Ren %Systemroot%\SoftwareDistribution\DataStore DataStore.bak Ren %Systemroot%\SoftwareDistribution\Download Download.bak Ren %Systemroot%\System32\catroot2 catroot2.bak
Important
The reset step below using sc.exe will overwrite your existing security ACLs on the BITS and Windows Update service and set them to default. Skip this step unless the other steps to reset Windows Update components have not resolved the issue.
-
-
Reset the BITS service and the Windows Update service to the default security descriptor. To do this, type the following commands at a command prompt. Press Enter after you type each command.
ConsoleCopy
sc.exe sdset bits D:(A;CI;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU) sc.exe sdset wuauserv D:(A;;CCLCSWRPLORC;;;AU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SY)
-
-
Type the following command at a command prompt, and then press Enter:
ConsoleCopy
cd /d %windir%\system32
-
Reregister the BITS files and the Windows Update files. To do this, type the following commands at a command prompt. Press Enter after you type each command.
ConsoleCopy
regsvr32.exe atl.dll regsvr32.exe urlmon.dll regsvr32.exe mshtml.dll regsvr32.exe shdocvw.dll regsvr32.exe browseui.dll regsvr32.exe jscript.dll regsvr32.exe vbscript.dll regsvr32.exe scrrun.dll regsvr32.exe msxml.dll regsvr32.exe msxml3.dll regsvr32.exe msxml6.dll regsvr32.exe actxprxy.dll regsvr32.exe softpub.dll regsvr32.exe wintrust.dll regsvr32.exe dssenh.dll regsvr32.exe rsaenh.dll regsvr32.exe gpkcsp.dll regsvr32.exe sccbase.dll regsvr32.exe slbcsp.dll regsvr32.exe cryptdlg.dll regsvr32.exe oleaut32.dll regsvr32.exe ole32.dll regsvr32.exe shell32.dll regsvr32.exe initpki.dll regsvr32.exe wuapi.dll regsvr32.exe wuaueng.dll regsvr32.exe wuaueng1.dll regsvr32.exe wucltui.dll regsvr32.exe wups.dll regsvr32.exe wups2.dll regsvr32.exe wuweb.dll regsvr32.exe qmgr.dll regsvr32.exe qmgrprxy.dll regsvr32.exe wucltux.dll regsvr32.exe muweb.dll regsvr32.exe wuwebv.dll
-
Reset Winsock. Type the following command at a command prompt, and then press Enter:
ConsoleCopy
netsh winsock reset
-
If you're running Windows XP or Windows Server 2003, you have to set the proxy settings. Type the following command at a command prompt, and then press Enter:
ConsoleCopy
proxycfg.exe -d
-
Restart the BITS service, the Windows Update service and the Cryptographic service. Type the following commands at a command prompt. Press Enter after you type each command.
ConsoleCopy
net start bits net start wuauserv net start cryptsvc
-
If you're running Windows Vista or Windows Server 2008, clear the BITS queue. Type the following command at a command prompt, and then press Enter:
ConsoleCopy
bitsadmin.exe /reset /allusers
Windows - How to delete the Recovery Partition
Unfortunately when there is no room on the disk to convert the drive from basic to dynamic.
Microsoft documents the problem, and notes the solution is to delete the last partition on the disk:
Not Enough Space Available to Upgrade to a Dynamic Disk
RESOLUTION
Start Disk Manager, right-click the last partition, and then click Delete Partition.
It's important to note that, the recovery partition was created when Windows Retail or OEM was cleanly installed.
Microsoft says you can use the Create Recovery Drive to delete a recovery partition
From Create a USB recovery drive, which is used to create a USB recovery drive, there is supposed to be an option at the end of the wizard to delete the recovery partition on the hard drive:
When the process is done, do one of the following:
If you want to keep the recovery partition on your PC, tap or click Finish.
If you want to remove the recovery partition from your PC and free up disk space, tap or click Delete the recovery partition. Then tap or click Delete. This will free up the disk space used to store your recovery image. When the removal is done, tap or click Finish.
Note
Some PCs don't offer the option to remove a recovery partition. If you experience this, there isn't a recovery partition on your PC that's using additional disc space.
When you complete the wizard, there isn't offered the option to remove a recovery partition:
Which apparently means that my machine doesn't have a Recovery Partition, yet i refer you to
Disk Management Tool
As you can see the partition number is 4 in this case, which is the one we want to remove to be able to expand the drive.
DiskPart
Using DiskPart from an elevated command prompt
>diskpart
DISKPART> select disk 0
DISKPART> list partition
DISKPART> select partition 4
DISKPART> delete partition override
DiskPart successfully deleted the selected partition.
Windows - Set Logon Server
How To change Logon server Name through Command Line:
echo %logonserver%
set logonserver=\\server1
set logonserver
open Command Prompt
*******************************************************
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.
C:\Users\user>echo %logonserver%
\\ServerName1
C:\Users\user>set logonserver
LOGONSERVER=\\ServerName1
C:\Users\user>set logonserver=\\ServerName2
C:\Users\user>set logonserver
LOGONSERVER=\\ServerName2
C:\Users\user> echo %logonserver%
\\ServerName2
It is likely that DC2 is running your PDC Emulator role, which is why those messages are appearing on DC1.
Basically, what's happened is that the domain has reached a time period where it is no longer feasible to reconcile/merge all the USN (Update Sequence Numbers - i.e. they denote the versioning/changes on all of your AD objects) with the other DC, because it has been unavailable for replication for so long.
Here's the first few steps on TechNet:
Technet: Forcing the Removal of a Domain Controller
To complete this task, perform the following procedures:
-
Identify Replication Partners . Use this procedure to identify a domain controller that is a replication partner of the domain controller that you are removing. Identify a replication partner in the same site, if possible. You will connect to this domain controller when you clean up server metadata.
Then, you'll need to seize FSMO roles:
After that, you can try to re-promote that DC.
Ensure that on DC1:
-
Primary DNS IP on NIC is pointing to DC2
-
Secondary DNS IP on NIC is pointing to 127.0.0.1
Ensure that on DC2:
-
Primary DNS IP on NIC is pointing to DC1
-
Secondary DNS IP on NIC is pointing to 127.0.0.1
Any new objects (computer/user accounts) that appear on DC1 and not DC2 will need to be recreated once you've got your replication back in order (or you could recreate them on DC2...either way, they'll need to be recreated). Honestly, I would export a list of user and computer objects from your DC1 that were created after the date of last replication and then go from there. There are various scripts out there that can do this.
Windows - How To Fix DFS Replication Event 4012 on Domain Controller
1. Verifying Server Promotion Status
The first crucial step in resolving DFS replication Event ID 4012 is to verify the server’s promotion status. Any discrepancies in the promotion process can lead to issues with DFSR. Administrators can use tools like Active Directory Users and Computers (ADUC) or PowerShell commands to ensure that the server has been successfully promoted to a domain controller.
2. Adjusting MaxOfflineTimeInDays
An easy fix for Event ID 4012 involves adjusting the MaxOfflineTimeInDays parameter. This parameter determines the maximum duration a server can remain offline before triggering the error. If the server was offline for an extended period, increasing this threshold can resolve the issue.
Using WMIC Commands for MaxOfflineTimeInDays
To check the current MaxOfflineTimeInDays value, administrators can use the following command:
wmic.exe /namespace:\\root\microsoftdfs path dfsrMachineConfig get MaxOfflineTimeinDays
To increase the MaxOfflineTimeInDays value, use the following command, setting it to a value higher than the time the server was offline:
wmic.exe /namespace:\\root\microsoftdfs path dfsrMachineConfig set MaxOfflineTimeinDays=100
These commands provide a quick and efficient way to address the time constraint set by MaxOfflineTimeInDays, ensuring that the DFS Replication service can resume without encountering the 4012 error.
3. Initiating DFS Replication Partnerships
Starting DFS Replication Partnerships involves establishing connections to enable the synchronized replication of data between servers. One method to achieve this is by manually running DFS replication using the repadmin /syncall /AeD command or initiate it through the Active Directory Sites and Services console.
The repadmin cmd provides a direct and efficient way to trigger synchronization across all domain controllers, aiding in the resolution of replication interruptions and maintaining consistent data distribution.
4. Set MaxOfflineTimeInDays Back to Default 60 Days
Once the replication is complete set MaxOfflineTimeInDays value back to default 60 Days
wmic.exe /namespace:\\root\microsoftdfs path dfsrMachineConfig set MaxOfflineTimeinDays=60
Windows - Delete user Graph
https://www.alitajran.com/remove-on-premises-directory-synchronization-service-account/
Install-Module Microsoft.Graph -Force -Confirm:$false
Install-Module Microsoft.Graph.Beta -AllowClobber -Force -Confirm:$false
Connect-MgGraph -Scopes "User.ReadWrite.All"
Remove-MgUser -UserId "Sync_DC01-2019_d5d79537b1b8@exoip365.onmicrosoft.com"
Get-MgUser -UserId "Sync_DC01-2019_d5d79537b1b8@exoip365.onmicrosoft.com"
Windows - How To Fix DISM Source Files Could Not Be Found In Win10
https://www.minitool.com/news/fix-dism-source-files-could-not-be-found-win10.html
The DISM command “DISM / Online / Cleanup-Image / Restore Health” can be performed successfully in normal cases to repair your Windows System Image. However, some users said their DISM failed and they receive the DISM source files could not be found error message. What’s the problem with that? How to fix the issue yourself?
What is DISM?
DISM refers to DISM.exe, which is a command-line tool that can be used to service and prepare Windows images (.wim) or virtual hard disks (.vhd or .vhdx). DISM is built into all versions of Windows and you can access it from the command line or Windows PowerShell. See what you can do if DISM /Online /Cleanup-image /Restorehealth is stuck.
DISM Source Files Could Not be Found Error
“DISM /Online /Cleanup-Image /RestoreHealth” is one of the frequently used commands to repair a Windows image. You can perform this command in Command Prompt tool easily, but people don’t always succeed. The DISM source files could not be found error will show up when DISM failed. It means that the DISM tool on your PC cannot find the source files needed to restore the Windows image.
How to fix “DISM failed. No operation was performed”?
The DISM restore health process could be interrupted in Windows 10 or other Windows systems. But I’ll take the failure of DISM Online Cleanup Image RestoreHealth Windows 10 as an example to show you how to fix the problem in different ways.
Causes of “The Source Files Could Not Be Found”
The source files could not be found error message may come with an error code like 0x800f081f or 0x800f0906 or 0x800f0907. There are 4 main reasons for causing it:
-
The DISM tool cannot find the files you need to repair online (in Windows Update or WSUS).
-
The Windows image file (install.wim) specified as the repair source is not correct.
-
The install.wim or install.esd file used as the repair source contains several install.wim files.
-
The Windows.ISO file used as the repair source may be damaged or incorrect (it cannot match the version, edition, and architecture 32 or 64 bit of your installed Windows).
Fix DISM Source Files Could Not Be Found Windows 10
What to do when encountering Windows 10 DISM source files could not be found? Please follow the fixes below.
#1. Use Windows Repair Upgrade
Step 1: download Windows Repair Upgrade tool.
-
Click on the Download tool now button to get Windows Media Creation tool.
-
Run the installer. Then, accept the license terms and conditions.
-
Click Upgrade this PC now.
-
Click Next.
-
Wait for the actions to end.
Step 2: start the Windows repair process on your PC.
-
Press Windows + S.
-
Type cmd.
-
Right click on Command Prompt.
-
Select Run as administrator.
-
Type DISM /Online /Cleanup-Image /StartComponentCleanup and press Enter.
-
Type DISM /Online /Cleanup-Image /RestoreHealth and press Enter.
-
Type sfc /scannow and press Enter.
https://www.minitool.com/data-recovery/recover-files-using-cmd-001.html
#2. Clean & Analyze the WinSXS Folder
-
Also, you need to run Command Prompt as administrator.
-
Type DISM /Online /Cleanup-Image /StartComponentCleanup and press Enter.
-
Type sfc /scannow and press Enter.
-
Type DISM /Online /Cleanup-Image /AnalyzeComponentStore and press Enter.
-
Type sfc /scannow and press Enter.
-
Restart your computer.
#3. Use an Alternative Repair Source in DISM
Step 1: check the Index number on your Windows 10.
-
Connect the USB drive that contains the Windows installation media (or mount the ISO file) to your computer.
-
Press Windows + E to open File Explorer. Then, go to your USB drive.
-
Double click on the Sources folder to check whether it contains an install.wim or install.esd file.
-
Run Command Prompt as administrator.
-
Type dism /Get-WimInfo /WimFile:*:sources/install.wim or dism /Get-WimInfo /WimFile:*:sources/install.esd (* represents the drive letter). Then, press Enter.
Step 2: repair Windows 10. Please replace * with the drive letter of your USB drive and type the correct Index Number.
-
If the Sources folder contain an install.wim: type DISM /Online /Cleanup-Image /RestoreHealth /Source:WIM:*:\sources\install.wim:IndexNumber /LimitAccess and press Enter.
-
If the Sources folder contain an install.esd: type DISM /Online /Cleanup-Image /RestoreHealth /Source:ESD:*:\sources\install.esd:IndexNumber /LimitAccess and press Enter.
Step 3: wait for the operation to complete.
In addition, you can try to specify an alternative repair source by using Registry Editor or Local Group Policy Editor when system tells you the DISM source files could not be found.
https://www.partitionwizard.com/partitionmagic/dism-error-2.html
Windows - Windows Logon Service
The logon process for how a system connects to a DC is pretty striaghtforward (read: Simple, but not easy)
-
Workstation comes online and queries DNS SRV records to find all DCs
-
Workstation attempts LDAP connection to ALL DCs found.
-
Workstation queries DNS for site information.
-
Workstation compares site information received with its own network ID.
-
Workstation attempts LDAP connection to all DCs in its site
-
If no DCs in its site respond, Workstation attempts LDAP connection to all DCs in the domain
-
First DC to respond is where the Workstation attempts to authenticate.
If this is giving odd results - workstations routinely log onto DCs not in their site - check out where the DCs reside in Sites and Services and correct as needed.
It’s also possible the Workstation is on a subnet that isn’t defined to Sites & Services and this also would need to be corrected.
Check
I would recommend to ensure the below IP settings on each domain controller:
-
Each DC / DNS server points to its private IP address as primary DNS server and other internal DNS servers as secondary ones
-
Each DC has just one IP address and one network adapter is enabled (disable unused NICs).
-
If multiple NICs (enabled and disabled) are present on server, make sure the active NIC is on top in NIC binding.
-
Contact your ISP and get valid DNS IPs from them and add it in to the forwarders, Do not set public DNS server in TCP/IP setting of DC.
How To Fix DFS Replication Event 4012 on Domain Controller
1. Verifying Server Promotion Status
The first crucial step in resolving DFS replication Event ID 4012 is to verify the server’s promotion status. Any discrepancies in the promotion process can lead to issues with DFSR. Administrators can use tools like Active Directory Users and Computers (ADUC) or PowerShell commands to ensure that the server has been successfully promoted to a domain controller.
2. Adjusting MaxOfflineTimeInDays
An easy fix for Event ID 4012 involves adjusting the MaxOfflineTimeInDays parameter. This parameter determines the maximum duration a server can remain offline before triggering the error. If the server was offline for an extended period, increasing this threshold can resolve the issue.
Using WMIC Commands for MaxOfflineTimeInDays
To check the current MaxOfflineTimeInDays value, administrators can use the following command:
wmic.exe /namespace:\\root\microsoftdfs path dfsrMachineConfig get MaxOfflineTimeinDays
To increase the MaxOfflineTimeInDays value, use the following command, setting it to a value higher than the time the server was offline:
wmic.exe /namespace:\\root\microsoftdfs path dfsrMachineConfig set MaxOfflineTimeinDays=400
These commands provide a quick and efficient way to address the time constraint set by MaxOfflineTimeInDays, ensuring that the DFS Replication service can resume without encountering the 4012 error.
3. Initiating DFS Replication Partnerships
Starting DFS Replication Partnerships involves establishing connections to enable the synchronized replication of data between servers. One method to achieve this is by manually running DFS replication using the repadmin /syncall /AeD command or initiate it through the Active Directory Sites and Services console.
The repadmin cmd provides a direct and efficient way to trigger synchronization across all domain controllers, aiding in the resolution of replication interruptions and maintaining consistent data distribution.
4. Set MaxOfflineTimeInDays Back to Default 60 Days
Once the replication is complete set MaxOfflineTimeInDays value back to default 60 Days
wmic.exe /namespace:\\root\microsoftdfs path dfsrMachineConfig set MaxOfflineTimeinDays=60
Windows - Online Repair
Crashing Error
SFC /SCANNOW
DISM /Online /Cleanup-Image /ScanHealth
DISM /Online /Cleanup-Image /CheckHealth
DISM /Online /Cleanup-image /RestoreHealth
Windows - How to Switch Domain Controller
Find Current Domain Controller
You can grab the domain controller that the computer is currently connected to with these steps:
-
Select the “Start” button.
-
Type “CMD“.
-
Hold “Shift” and right-click “Command Prompt“.
-
Select “Run as different user“.
-
Type credentials for a Domain Admin user account.
-
At the Command Prompt, type:
-
nltest /dsgetdc:domainname
-
Switch Domain Controller Command
Actually switch the domain controller computer is using with these steps.
-
Select the “Start” button.
-
Type “CMD“.
-
Hold “Shift” and right-click “Command Prompt“.
-
Select “Run as different user“.
-
Type credentials for a Domain Admin user account.
-
At the command prompt, type:
-
nltest /Server:ClientComputerName /SC_RESET:DomainName\DomainControllerName
-
Note: This option is not permanent, as a restart of the computer may grab a different DC.
Set Domain Controller Via Registry
-
Hold the Windows Key and press “R” to bring up the Windows Run dialog.
-
Type “Regedit“, then press “Enter“.
-
Navigate to:
-
HKEY_LOCAL_MACHINE
-
SYSTEM
-
CurrentControlSet
-
Services
-
Netlogon
-
Parameters
-
-
Create a String value called “SiteName“, and set it to the domain controller you wish the computer to connect to. (i.e. DC1.domain.com)
Windows 11 - Bypass Microsoft Account Requirement
Once on the following screen make sure you disconnect from the internet or have no internet connection and hit the "Shift-F10" keys to open a command prompt.
Type this in the command prompt window "oobe\bypassnro"
The computer will reboot
Once you get to this screen click on the option "I don't have internet"
Once on the next screen click on the option "Continue with limited setup"
Once on the next screen add the a name to create a local account
On the next screen enter a password to use