Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Enhancements to PowerShell pipeline and Azure resource management instructions #38

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

LuizMacedo
Copy link

This pull request includes updates to the instructions for working with PowerShell pipelines and Azure resource management. The most important changes include clarifying task descriptions, adding commands to check pipeline binding, and updating instructions for creating storage accounts and switching shells.

Improvements to PowerShell pipeline instructions:

Updates to Azure resource management instructions:

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
updated instructions
1. In the console, enter the following command, and then press the Enter key:

```powershell
Get-Date | Get-Member
```

> **Note:** Notice the **DayOfYear** property.
> **Note:** Notice how the **(|)** allows the output of one cmdlet to be passed as input to another.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: Notice how the (|) passes the the datetime object that Get-Date produces through the pipeline to the Get-Member cmdlet producing metadata as output.

1. In the console, enter the following command, and then press the Enter key:
```powershell
Get-Date

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing a list of date objects and extracting the month names demonstrates the ByValue concept exposed in the above steps.

 [datetime]"2024-01-01", [datetime]"2024-06-15", [datetime]"2024-12-25" | Get-Date -Format "MMMM"

```
> **Note:** Notice the **Accept pipeline input** and **Parameter set name** values.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Retrieving a list of computer names and creating a calculated property name to pipe into the Get-Hotfix cmdlet would demonstrate binding ByPropertyName concept exposed in these steps.

Get-ADComputer -Filter * | Select-Object @{n='ComputerName';e={$_.Name}} | Get-HotFix

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants