Category Archives: Windows

Get-ADObject Filter vs LDAP Filter

Get-ADObject Filter Definition: <filter> ::= “{” <FilterComponentList> “}” <FilterComponentList> ::= <FilterComponent> | <FilterComponent> <JoinOperator> <FilterComponent> | <NotOperator> <FilterComponent> <FilterComponent> ::= <attr> <FilterOperator> <value> | “(” <FilterComponent> “)” <FilterOperator> ::= “-eq” | “-le” | “-ge” | “-ne” | “-lt” | “-gt”| … Continue reading

Posted in Active Directory, Powershell | Leave a comment

Install GUI in Windows 2012 R2 Core

If the regular way failed, then they this way Copy the the C:\Windows\WinSxS from other server with GUI and same updates to C:\WinSxS of Core server Then run the command with -source C:\WinSxS Install-WindowsFeature server-gui-infra,server-gui-shell -source c:\WinSxS

Posted in Windows | Leave a comment

Install Offline standalone CA for Domain

Install standalone CA Change validity period to longer, so it can issue a longer period certificates. certutil -getreg ca\ValidityPeriod certutil -getreg ca\ValidityPeriodUnits certutil -setreg ca\ValidityPeriod “Years” certutil -setreg ca\ValidityPeriodUnits “20” Make standalone CA to support AD.  Don’t joint the standalone … Continue reading

Posted in Windows | Leave a comment

Command Line to Uninstall IE xx

For IE 9 FORFILES /P %WINDIR%\servicing\Packages /M Microsoft-Windows-InternetExplorer-*9.*.mum /c “cmd /c echo Uninstalling package @fname && start /w pkgmgr /up:@fname /norestart” For IE 10 FORFILES /P %WINDIR%\servicing\Packages /M Microsoft-Windows-InternetExplorer-*10.*.mum /c “cmd /c echo Uninstalling package @fname && start /w pkgmgr … Continue reading

Posted in Windows | Leave a comment

Disable the ActiveX Prompts

Option 1: ActiveX controls are essentially mini-programs that can be shared by different Windows applications. Note: ActiveX controls are the most common tools for loading viruses, spyware and other malicious software onto computers. Because of this, every time a website … Continue reading

Posted in Windows | Leave a comment

Turn on Number Lock by Login Screen and Default Users

Copy following code to notepad and save it as numlock.bat, then run it with administrator right. @echo off :: For Login Screen reg add “HKEY_USERS\.DEFAULT\Control Panel\Keyboard” /v InitialKeyboardIndicators /t REG_SZ /d 2 /f :: For Default Profile reg load HKLM\DefaultProfile … Continue reading

Posted in Windows | Leave a comment

Failed to add network printer

Failed to add network printer Error: 0x0000007e Solution: In the printer server, delete the registry key HKLM\Software\Microsoft\windows NT\CurrentVersion\Print\Printers\\CopyFiles\BIDI Cause: the station of users was trying to access a path that the 64bit OS do not recognize as valid: “spool\drivers\w32x86\3”. This … Continue reading

Posted in Windows | Leave a comment