Take Ownership of a File or Folder by Command in Windows

Taking ownership of files in Windows is necessary to edit or delete system or program files that you have no access to by default. There are multiple ways to achieve that goal, like doing everything manually through the Properties menu, applying a registry tweak or, as described here, executing a command in the Command Prompt. ... Read more

How to Create a Hyper-V Virtual Machine using PowerShell

You can create a new VM by using one of the following two methods: Using Windows GUI. Using PowerShell commands. This article will discuss how to create a Hyper-V virtual machine using PowerShell commands. Create a Hyper-V Virtual Machine using PowerShell Step 1. Open PowerShell command with elevated privileges. Step 2. Execute the following command ... Read more

How to Create a PowerShell Session on a Remote Computer

PowerShell Remote Session

A session is required to execute PowerShell commands or scripts on a remote computer. A PowerShell session is also known as PowerShell remoting, and it is just like an SSH session to an operating system. There are several ways to create a PowerShell session. I'll list one of the easiest methods here. These steps work ... Read more

How to Sysprep Windows 8.1 for deployment

The Sysprep or System Preparation Tool is used to create a new security identifier (SID) and clean up user-specific and computer-specific settings and data so that an image can be used to deploy windows operating systems on other machines. The tool is located in \Windows\System32\sysprep folder. Following are the steps which are required: Step 1: Click Windows ... Read more

How to Run VBScript on Windows

To run VBScript file, follow these steps. I have tested on my Windows Server 2016 but it should run on other windows versions. Open PowerShell or command prompt with elevated privileges. Execute the following command: cscript <VBScript file name> For example, to run hello.vbs, which is located in your current working directory: cscript hello.vbs or ... Read more

How to Check the PowerShell Version on Windows

PowerShell Version

If you want to check which PowerShell version you are using, then execute either the command get-host or the command echo $PSVersionTable on PowerShell with elevated privileges. Get PowerShell Version Powershell Command: echo $PSVersionTable Result: The latest version is 5.1 and it is available in the newer generation of Windows Server 2016. PowerShell Versions on Windows ... Read more

How to Check if Processor Supports SLAT (Second Level Address Translation)

If you want to run Hyper-V on newer Windows operating systems (Like Windows 8 or Windows Server 2016), your processor must support SLAT or Second level address translation. What is SLAT? SLAT is a technology which was introduced in both Intel and AMD processors. Intel calls this technology EPT (Extended Page Tables) while AMD refers ... Read more

How to Create a Function in PowerShell

If you have worked with other programming languages, you have may used functions for code reusability. You can also create functions in PowerShell. PowerShell function example Below is the syntax of a simple function function hello-world { write-host "hello world"  } You can also pass parameters in a function using the param keyword function Get-TimesResult { Param ([int]$a,[int]$b) $c = ... Read more