<commit_before>ms.ContentId: C481ACA0-C4AD-4AC1-B1B5-97AA635D0809
title: Step 10: Experiment with Windows PowerShell

# Step 9: Experiment with Windows PowerShell

Now that we have walked through the basics of deploying Hyper-V, creating virtual machines and managing these virtual machines, let’s explore how we can automate many of these activities with PowerShell.

### Return a list of Hyper-V commands
Before we work with Hyper-V virtual machines, let’s explore the Hyper-V module:
1.	Click on the Windows start button, type **PowerShell** and click **enter** to open PowerShell.
2.	Type the following command to display a searchable list of PowerShell commands available with the Hyper-V PowerShell Module.

 ```powershell
get-command –module hyper-v | out-gridview
```
  You'll get something like this: <!--I'd crop this screenshot to make it shorter and get rid of the whitespace on the left. You only need enough to get the point across. They don't need to see everything..-->

  ![](media\command_grid.png)

3. To learn how to use a PowerShell cmdlet like **get-vm**, run the following command:

  ```powershell
get-help get-vm
```
 This shows you how to structure the command, what the required and optional parameters are and the aliases you can use.

 ![](media\get_help.png)


### Return a list of virtual machines

Now that we have examined the commands available for Hyper-V, let’s use the 'get-vm' command to return a list of virtual machines:
<commit_msg>Updated step9.md<commit_after>ms.ContentId: C481ACA0-C4AD-4AC1-B1B5-97AA635D0809
title: Step 10: Experiment with Windows PowerShell

# Step 9: Experiment with Windows PowerShell

Now that we have walked through the basics of deploying Hyper-V, creating virtual machines and managing these virtual machines, let’s explore how we can automate many of these activities with PowerShell.

### Return a list of Hyper-V commands
Before we work with Hyper-V virtual machines, let’s explore the Hyper-V module:
1.	Click on the Windows start button, type **PowerShell** and click **enter** to open PowerShell.
2.	Type the following command to display a searchable list of PowerShell commands available with the Hyper-V PowerShell Module.

 ```powershell
get-command –module hyper-v | out-gridview
```
  You'll get something like this: <!--I'd crop this screenshot to make it shorter and get rid of the whitespace on the left. You only need enough to get the point across. They don't need to see everything..-->

  ![](media\command_grid.png)

3. To learn how to use a PowerShell cmdlet like **get-vm**, run the following command:

  ```powershell
get-help get-vm
```
 This shows you how to structure the command, what the required and optional parameters are and the aliases that you can use.

 ![](media\get_help.png)


### Return a list of virtual machines

Now that we have examined the commands available for Hyper-V, let’s use the 'get-vm' command to return a list of virtual machines:

{'fraction_non_alphanumeric': 0.07413676371022343, 'fraction_numerical': 0.016587677725118485, 'mean_word_length': 4.392335766423358, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5994381', 'n_tokens_mistral': 852, 'n_tokens_neox': 777, 'n_words': 420}