Active Directory Recycle Bin: How to Enable and Restore Delete Objects

The Active Directory Recycle Bin allows a domain administrator to restore any deleted object (user, computer, security group) in the AD domain. AD Recycle Bin is available in all versions of Active Directory starting with Windows Server 2008 R2. In this article, we will show how to enable the Active Directory Recycle Bin and restore a deleted user.

Continue reading “Active Directory Recycle Bin: How to Enable and Restore Delete Objects”

Disable Local User Accounts in Windows with GPO and PowerShell

Best security practices for Windows domain networks recommend disabling local user accounts on computers and servers in an Active Directory domain. Local users who have administrative permissions on a computer can be a weak point in the security of your network. You can use tools such as Windows LAPS (Local Administrator Password Solution) to set unique, complex passwords for local administrators, or you can use AD Group Policies to completely disable local administrator and user accounts.

Continue reading “Disable Local User Accounts in Windows with GPO and PowerShell”

Move Hyper-V VMs Between Hosts Using Live Migration

The Live Migration feature in Hyper-V allows you to migrate a running virtual machine between hosts with almost no downtime. Initially, Live Migration in Hyper-V was only available as part of a Windows failover cluster with CSV shared storage. Starting with Windows Server 2012, Hyper-V Live Migration doesn’t require a cluster and shared storage. To migrate VMs, Hyper-V hosts need to be connected using a fast shared Ethernet network. This type of migration is called a Shared-nothing live migration.

Continue reading “Move Hyper-V VMs Between Hosts Using Live Migration”

Understanding IF, ELSE Statements in PowerShell

Logical statements If, Else, and ElseIf are used in PowerShell to check various conditions. The If statement is used to check a condition and perform a particular action if the condition is true. If the condition is not true (FALSE), you can use Else or ElseIf to perform another action.

Continue reading “Understanding IF, ELSE Statements in PowerShell”

Converting a PowerShell (PS1) Script to an EXE File

A separate *.ps1 extension is used for PowerShell script files. To run PS1 scripts, users must open a PowerShell console, cmd, or code editor (such as PowerShell ISE or VSCode). If you want your users to be able to easily run your PowerShell scripts, you can convert PS1 files to the .exe executable file format.

Continue reading “Converting a PowerShell (PS1) Script to an EXE File”

Measuring Script or Command Execution Time in PowerShell

Sometimes you need to know how long it takes to execute a PowerShell script or a particular block of code. This allows you to predict how long it will take for the script to perform the required action, make changes to your system settings, or return a result. There are several ways to measure the execution time of a PowerShell command or script in Windows.

Continue reading “Measuring Script or Command Execution Time in PowerShell”

How to Completely Uninstall Microsoft SQL Server?

In this article, we’re going to look at a number of ways that you can uninstall a Microsoft SQL Server instance on a Windows computer. This article applies to all supported versions: Microsoft SQL Server 2019/2017/2014/2012.

Continue reading “How to Completely Uninstall Microsoft SQL Server?”