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 Setup Windows Deployment Services with Separate DHCP Server on Windows Server 2012 R2

In this post, I'll show you how to setup WDS when there is a separate DHCP server running on the network. This guide assumes you have already configured a DHCP server with an active scope. Prerequisites Your machine should meet the following requirements before WDS is configured. Administrator account has a strong password. Static IP is ... 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

How to Delete a Folder Using Command Prompt of Windows

Delete Folder in Windows

To delete a folder using the command prompt of Windows, follow this procedure. Open a command prompt (Press the Windows icon key and R to open the run window). Type cmd and hit enter from the keyboard. On a command prompt, enter the following command and hit enter from the keyboard. Syntax rmdir /s <complete ... Read more

How to Get all Active Directory Users Created in the Last 24 Hours using PowerShell

You may require in some cases to check an active directory for newly created users so you can send them an email. You may also require to get newly added users for auditing or security purposes. You can get the active directory users created in last 24 hours by using this script. Feel free to change it for ... Read more