This blog is part of a series that shows example PowerShell code for those learning the language. This time we’re using PowerShell create a text adventure game that requires to find your way out of a house using simple commands. There is a locked door and you need to find a key. This example explores … Continue reading PowerShell Examples: Adventure House Game
Tag: PowerShell
PowerShell Examples: Guess the number
This blog is part of a series that shows example PowerShell code for those learning the language. This time we’re using PowerShell create a simple game where you need to guess a number. This example explores basic loops, logical operations (like –ne, –ge, –lt) and entering data with Read-Host. ## Guess the number# [int] … Continue reading PowerShell Examples: Guess the number
PowerShell Examples: Counting words in a text file
This blog is part of a series that shows example PowerShell code for those learning the language. This time we’re using PowerShell to count lines, count words, find the largest word and find the most frequently used words in a text file. To make it interesting, we’re using a plain text version of “Alice in … Continue reading PowerShell Examples: Counting words in a text file
PowerShell Examples: Generating Random Names
This blog is part of a series that shows example PowerShell code for those learning the language. This time we’re using PowerShell to generate random full names using common first names and common last names. It basically combines a random first name with a random letter for middle initial and a random last name. This … Continue reading PowerShell Examples: Generating Random Names
PowerShell Examples: Calculating the value of Pi
This blog is part of a series that shows example PowerShell code for those learning the language. This time we’re using PowerShell to find the value of Pi. This is done using one of the many methods available, using a division between n! (factorial) and (n*2+1)! (factorial of odd numbers). This example explores loops and … Continue reading PowerShell Examples: Calculating the value of Pi
PowerShell Examples: Calculating Prime Numbers
This blog is part of a series that shows example PowerShell code for those learning the language. This time we’re using PowerShell to find prime numbers. This is not using any sophisticated method, just checking the remainder for all numbers between 2 and the square root of the number. This example explores loops and general … Continue reading PowerShell Examples: Calculating Prime Numbers
PowerShell Examples: Calculating very small and very large numbers
This blog is part of a series that shows example PowerShell code for those learning the language. This time we’re using PowerShell to find some very small and very large floating point numbers. The principal here is that if you keep dividing a number by 2, there will be a point where the number is … Continue reading PowerShell Examples: Calculating very small and very large numbers
New version of the Storage Spaces physical disk validation PowerShell script
The Storage Spaces team has just published a new version of the Storage Space disk validation script written in PowerShell. This script makes sure that the physical disks in a system have everything that is needed by Storage Spaces. That includes checking functional requirements and performance characteristics. In the same way that we ask you … Continue reading New version of the Storage Spaces physical disk validation PowerShell script
Using PowerShell to select Physical Disks for use with Storage Spaces
1. Introduction If you use PowerShell to configure Storage Spaces, you probably noticed that selecting physical disks is an important part of the process. You must select disks to create a pool and you might also need to do it also when you create a virtual disk using a subset of the disks. … Continue reading Using PowerShell to select Physical Disks for use with Storage Spaces
Storage Spaces Survival Guide (Links to presentations, articles, blogs, tools)
In this post, I'm sharing my favorite links related to Storage Spaces in Windows Server 2012 R2. This includes TechEd Presentations, TechNet articles, Blogs and tools related to Storage Spaces in general and more specifically about its deployment in a Failover Cluster or Scale-Out File Server configuration. It's obviously not a complete reference (there are … Continue reading Storage Spaces Survival Guide (Links to presentations, articles, blogs, tools)