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

Restore files from Shadow Copy

Right click on the folder your trying to restore from shadow copy and chose ‘Previous versions’. Chose a date and click on open. Right click on any file or folder within the previous folder and chose ‘properties’. Under ‘General’ copy … Continue reading

Posted in Windows | 3 Comments

Create Windows Recovery Environment for Windows 8

Create Recovery partition create partition primary size=300 format quick fs=ntfs label=”Windows RE tools” assign letter=”R” set id=”de94bba4-06d1-4d40-a16a-bfd50179d6ac” gpt attributes=0x8000000000000001 Copy winpe.wim R:\Recovery\WindowsRE\winre.wim Customize winre.wim if want more options. Copy ReAgent.xml C:\Windows\System32\Recovery\ReAgent.xml This step can be omitted if ReAgentc function work … Continue reading

Posted in Windows | Leave a comment

Fix and Customize Boot for Windows

In Windows Recovery Environment, there are couple tools that do the job. If just want to fix the boot problem, BootRec.exe maybe is the easiest way. if just want fix BCD, try Bcdboot.exe, it has less steps. But, BcdEdit.exe has … Continue reading

Posted in Windows | 2 Comments