TechShizz | All posts tagged 'CMD'

Take Ownership

Take ownership of folder + delete - Run all three commands

takeown /F D:\My Documents\OneNote Notebooks* /R /A

cacls D:\My Documents\OneNote Notebooks*.* /T /grant administrators:F

rmdir /S /Q D:\My Documents\OneNote Notebooks

Active Directory Replication Commands

Repadmin /replsummary

Identifies domain controllers that are failing inbound replication or outbound replication, and summarizes the results in a report.

Repadmin /Queue

Displays inbound replication requests that the domain controller has to issue to become consistent with its source replication partners.

Repadmin /Showrep

Displays the replication status when the specified domain controller last attempted to perform inbound replication of Active Directory partitions

Windows Update Fix

If windows update fails to install try this:
Step by step instructions to get the issue fixed.


a) Press Windows key + X and select Command Prompt (Admin).


b) On the open Command Prompt window copy and paste the commands (all at once)


net stop wuauserv


net stop cryptSvc


net stop bits


net stop msiserver


ren C:\Windows\SoftwareDistribution SoftwareDistribution.old


ren C:\Windows\System32\catroot2 catroot2.old


net start wuauserv


net start cryptSvc


net start bits


net start msiserver


c) Wait for the process to complete.


d) Close the Command Prompt.



Now, try to install Windows Updates again and check if it helps.




I was getting this error too, but solved removing a value from registry:

  • Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsSelfHost\Applicability
    • ThresholdOptedIn

How is my registry now (downloading updates):

Find Asset Tag / Serial Number

wmic bios get serialnumber


To get the product number I think its:


Get-WmiObject win32_computersystem | Select-Object SystemSKUNumber

Bulk Active Directory Import

CSVDE -i -f c:\users.csv


To Loop a DSAdd command


for /f "Tokens=*" %i in (c:\5000users.csv) do dsmod user %i -pwd Pa$$w0rD -disabled no