How to Write VBScript Code on Windows

Open notepad or any other third party editor like Notepad++. Write any VBScript code suppose Wscript.Echo "Hello" Wscript.Quit 0 Save the file with .vbs extension suppose hello.vbs. You can then run that VBScript file from command prompt. Reference http://testingfreak.com/run-vb-script-code-written-on-notepad-without-additional-software-windows/

What is CBS.log?

CBS stands for component based servicing. CBS.log is a file which include logs about components when they get installed or uninstalled during updates. If you want to check these files, they are located at %windir%\Logs\CBS\ You will see two files in CBS folder, one is CBS.log and the other is CBS.persist.log. CBS.persist.log is the older ... Read more

How to Import and Export Virtual Machines in Windows Hyper-V Server

You can use the import and export feature to create a new virtual machine with the exact same configuration of an existing VM in Hyper-V. You can import the VM files on a new server and create as many VMs as you like. Export Hyper-V Virtual Machine Step 1. Open Hyper-V Manager. Step 2. Right-click ... Read more

Fixed, Dynamically Expanding, and Differencing Disks in Hyper-V

There are three types of virtual hard disks in Hyper-V. Those three types are: Fixed size Dynamically expanding Differencing I will explain each type with pros and cons in the article below. Fixed size Disk When you create a fixed-size virtual hard disk, space is reserved beforehand. Suppose you created a VHDX of 200 GB, ... Read more

Error when Executing a PowerShell Script for the First Time

When you are executing a PowerShell script for the first time you may encounter the following error: .... cannot be loaded because running scripts is disabled on this system. Why did this happen: PowerShell Execution Policies PowerShell has four execution policies for executing the script. Those four policies are described below: Restricted This is a default policy. ... Read more

How to Fix WinRm Firewall Exception Rule When Enabling PS Remoting

When you are enabling PowerShell remoting using the command Enable-PSRemoting, you may get the following error because your system is connected to the network trough a Wi-Fi connection. PS C:\WINDOWS\system32> winrm quickconfig The following changes must be made: Start the WinRM service. Set the WinRM service type to delayed auto start. Make these changes [y/n]? y ... Read more

How to Prevent Users from Shutting Down the Domain Joined Client Computers

Domain users are by default allowed to shutdown, restart, or put the domain-joined client computers to sleep. However, you can use a group policy to prevent them from shutting down or restarting the client computers. Following are step by step instructions written for this purpose. Prevent Users from Shutting Down their Computer Step 1. Open Group ... Read more

How to Prompt a User for Input using PowerShell

You can use the read-host command-let to get an input from a user during program execution. PowerShell Input Example Here is a related example, the program gets two numbers in string format and converts them into integers and then sums up those numbers and finally displays the result. The -prompt parameter is used to display a ... Read more

How to Read a Text File Using PowerShell

You can read a text file and display its content using get-content cmdlet in PowerShell. Read textfile example Execute the following command on PowerShell with elevated privileges. Get-Content c:\scripts\test.txt This command will display the contents of the file test.txt which is located in c:\scripts\