Change the Defult Boot OS and Time-Out for Dual Boot Windows

Recently I installed windows 8.1 along with existing windows 10 on my free partition. After reboot, the dual boot option gives me 30 second time-out with the default to windows 8.1 as seen in Fig-1. As I worked with Win-10 most of the time, I need my computer boot directly into windows 10 with less time-out. Since Windows Vista and later, windows shipped with bcdedit.exe which gives enhanced user option to edit the BCD Store (Boot Configuration Data, formerly called boot loader) before calling the windows kernel.You can read a complete windows boot process from the following articles.
https://social.technet.microsoft.com/wiki/contents/articles/11341.the-windows-7-boot-process-sbsl.aspx
https://technet.microsoft.com/en-us/library/ee221031(v=ws.10).aspx


Note: There are many third-party tools if you prefer GUI for this task. EASYBCD has a free (also has a paid version), one of the popular BCD editor tools to work with dual boot systems.

Fig-1: Default is Window 8.1 and 30 seconds time-out



bcdedit.exe has a good many parameters for boot configuration tasks. Check a full list of bcdedit.exe commands with:
bcdedit.exe /?
bcdedit.exe <parameter> /?

1) Backup before you do anything
Like editing registry, you will need to backup the current configuration to avoid unexpected failures. First, create the backup directory under C: and run bcdedit with /export. See Fig-2.
bcdedit.exe /export c:bcdbackup

Fig-2: Backup the BCD Store

2) Check the Current BCD setting
You can check the current bcd setting with /enum and /v parameters. As, you can see the default id is {d22d3d4f-c6d9-11e6-bf59-d680d7abcd65} which is Windows 8.1. We need to change this id to the windows 10’s id in the next step. See Fig-3 for all OS lists in the boot menu.
bcdedit.exe /enum /v

Fig-3: Enumerate all the Boot Options

3) Change the Default OS and Time-Out Settings
As talked, we need to change the default OS Identifier to {6aea34be-2dec-11e6-9221-9292a8212aa0} which is Windows 10. Also, we want to decrease time-out to 5 sec. Type the following commands one-by-one (replace xxxxx with your own OS id).
** Note that you may see different id for your OS, not the same one here. So, do not copy & paste these commands **
bcdedit.exe /default {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
bcdedit.exe /timeout 5

So, for my case, my Windows 10’s id is {6aea34be-2dec-11e6-9221-9292a8212aa0} (check Fig-3). So, I need to type:
bcdedit /default  {6aea34be-2dec-11e6-9221-9292a8212aa0}
bcdedit /timeout 5

Fig-4: Change the Default Boot OS & Time-Out Settings

4) Check your settings & Reboot (optional)
Now, you can check your setting with the same command. See Fig-5.
bcdedit.exe /enum /v

Fig-5: Check the setting after changes

You can reboot now (or later) to see the results. See Fig-6.

Fig-6: Check the results

Active Directory Recycle Bin: Restore Deleted Objects or Wipe Off your Bin ?

Active Directory Recycle Bin is available from Server 2008R2 but it is disabled by default and it is one of the most useful feature for system admins in that he can restore any directory objects (user/computer or system accounts) that he mistakenly deleted.
You need Active Directory Administrative Center Console and forest functional level 2008R2 as a minimum to use this.
For the restore process, you can use GUI or powershell. For permanent deletion, powershell is the way to go. Also, there is tombstone lifetime and deleted object lifetime depending on how long you want to keep the deleted objects. Continue reading “Active Directory Recycle Bin: Restore Deleted Objects or Wipe Off your Bin ?”

Enumerate and Check DNS Records between two Windows DNS Servers

Update on 22.May.2023 : I do not review my scripts regularly. Thanks to Frank Dub  who modified the script by removing the Server 2008 execution code and fixed the PTR record section, which was not working properly. You can find it as the latest script with version 1.1 attached in this post. For the previous version, see here.

———————————————————————————————————–

Today, I finished up the script which can check the DNS records between two DNS servers. Powershell DNS Client module is only available from Windows 8, Server 2012/R2, which makes powershellers easy for dns query & administration. But as I want to include the old server 2008 in this scenario, I scripted the ‘nslookup’ command in this script. Continue reading “Enumerate and Check DNS Records between two Windows DNS Servers”

Check If your running Processes and Files are Digitally Signed

Digital Signatures of running process is needed when your want to validate that the softwares actually comes from trusted source and is unmodified by viruses or trojans. You can also check the the executable files (.exe, .dll etc,.) on your system that they are digitally signed. Continue reading “Check If your running Processes and Files are Digitally Signed”

How to Automate SSH-ing with Powershell

Being away from blogging a while, since I have been on vacation after my VCP exam, now it’s time back to my blogging. Today let’s see how we can automate SSH-ing with powershell. Instead of connecting to each ssh hosts (eg, your routers/switches or linux servers), you can make the powershell snippets and insert the linux commands with plink.exe. Most of the time, you can use 2 methods to do ssh connection via powershell. Continue reading “How to Automate SSH-ing with Powershell”