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\

How to Generate Random Numbers Using PowerShell

When you have to generate random passwords for users, you can execute the get-random command let on PowerShell to create it. Generate Random Number get-random -maximum 2000 -minimum 100 This command, when executed on PowerShell, creates a number between 1999 (not 2000 and always set one number higher in maximum) and 100.

How to Configure DHCP with PowerShell

PowerShell commands are an easy way to save a lot of time as system administrator. In this article, I'll show you how to configure DHCP from PowerShell. I have following information including scope, and router gateway IP. DHCP DNSServerIP="192.168.1.10" DHCPServerIP="192.168.1.10" StartRange="192.168.1.150" EndRange="192.168.1.200" Subnet="255.255.255.0" Router="192.168.1.1" Following is the configuration break down: Installing DHCP Adding DHCP scope ... Read more

How to Enable or Disable Notifications for Apps in Windows 10

You can enable or disable notifications for specific apps to appear in your action center. This article will help you to: Enable or disable notifications from specific apps in Windows 10. Change notifications priority for certain Apps Change the number of notifications that can appear in action center. Enabling and Disabling Notifications for Specific Apps in ... Read more