Posted in Windows 2012

Some quick command line tools for AD

1. To quickly list all the groups in your domain, with members, run this command: dsquery group -limit 0 | dsget group -members –expand 2. To find all users whose accounts are set to have a non-expiring password, run this command: dsquery * domainroot -filter “(&(objectcategory=person)(objectclass=user)(lockoutTime=*))” -limit 0 3. To list all the FSMO role holders in your […]

How can I kill RDP sessions from the command line?

If you have hung RDP sessions on a server that you want to kill without rebooting it, run the following: regsvr32 query.dll [enter] You only have to do this the first time. query session /server:servername [enter] reset session # /server:servername [enter] Let me know if this little quick tip helps you at AIR-SENEGAL-INTERNATIONAL.

Why can I not access administrative shares from Windows 7 or Windows 8 ?

Someone asked me about this recently. They had a Windows 8 laptop and a Windows 7 desktop and no matter what they tried, they were unable to access the C$ on either the laptop or the desktop. They were 100% sure they were using the correct credentials but for whatever  reason, Windows would not accept […]

How can I stop Server Manager from loading up at start-up on Windows Server 2012

If you would rather open the server manager manually, then follow these steps to prevent it auto starting: Go into Server Manager, click on the Manage menu item, then go to Server Manager Properties. Once there, simply tick on Do not start Server Manager automatically at logon. That will prevent it from starting up every time.

How can I clear all the remote desktop session remotely

There are 2 methods to do this: Method 1: Open CMD with admin right, then — A. Type “qwinsta /” into the window, replacing “” with the IP address of your server. When you hit “Enter,” a list of active remote-desktop connections will appear. Each session will have an ID number assigned to it. B. […]

How to configure Windows Defender to get definition updates in Windows 8 without using Windows Update?

In Windows 8, the automatic definition update work only IF you TURN ON the Windows Update and configure it to install update AUTOMATICALLY! If you need to turn off the windows automatic update but still want Windows Defender to update its definition, it would be trouble. According to some references from the internet, you can use […]

How can I search for all users that have the “Network Policy” set to false using PowerShell ?

If you need to search Active Directory to find users who currently have the “Network Access Permission” set to “Deny Access” on the Dial-in tab of their user account run this Powershell command: Get-ADUser -Filter {(mail -like “*”) -and (ObjectClass -eq “user”)} -Properties msNPAllowDialin | Where { $_.msNPAllowDialin -match “False” } | fl Name, msNPAllowDialin […]

How can I clean the WinSXS folder on Windows Server 2012?

WinSXS folder is the component store of Windows vista and later operating systems. Windows OS stores all its core components to WinSXS directory. The WinSXS folder is the only location that the core system components found on the system and all the system files you see in their usual locations, in the windows directory structure, […]