Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Update Invoke-AzVMRunCommand.md with more Windows Examples #23693

Merged
merged 2 commits into from
Apr 30, 2024

Conversation

Toluwaloope
Copy link
Contributor

@Toluwaloope Toluwaloope commented Dec 8, 2023

Added more examples to educate Microsoft Learn readers on how to run cmdlets and script blocks using Invoke-AzVMRunCommand. This will help readers understand that the ScriptBlock parameter in PowerShell Invoke-Command cmdlet can also be worked around in Az PowerShell.

Description

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • For SDK-based development mode, update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • For autorest-based development mode, include the changelog in the PR description.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

Added more examples to educate Microsoft Learn readers on how to run cmdlets and script blocks using Invoke-AzVMRunCommand. This will help readers understand that the ScriptBlock parameter in PowerShell Invoke-Command cmdlet can also be worked around in Az PowerShell.
Copy link

azure-client-tools-bot-prd bot commented Dec 8, 2023

⚠️Az.Compute
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
⚠️Help Example Check
⚠️PowerShell Core - Windows
Type Cmdlet Example Line RuleName Description Extent Remediation
⚠️ Invoke-AzVMRunCommand 3 12 Mismatched_Parameter_Value_Type Invoke-AzVMRunCommand -ScriptString $Script is not an expected parameter value type. -ScriptString Use correct parameter value type. Expected Type is string. Now the type is scriptblock.(Type).
⚠️ Invoke-AzVMRunCommand 3 6 Unassigned_Variable Set-TimeZone -Id $NewTimeZone is a null-valued parameter value. -Id Assign value for $NewTimeZone.
⚠️Windows PowerShell - Windows
Type Cmdlet Example Line RuleName Description Extent Remediation
⚠️ Invoke-AzVMRunCommand 3 12 Mismatched_Parameter_Value_Type Invoke-AzVMRunCommand -ScriptString $Script is not an expected parameter value type. -ScriptString Use correct parameter value type. Expected Type is string. Now the type is scriptblock.(Type).
⚠️ Invoke-AzVMRunCommand 3 6 Unassigned_Variable Set-TimeZone -Id $NewTimeZone is a null-valued parameter value. -Id Assign value for $NewTimeZone.
️✔️Help File Existence Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows

Copy link
Contributor

Thank you for your contribution Toluwaloope! We will review the pull request and get back to you soon.

@Toluwaloope
Copy link
Contributor Author

@microsoft-github-policy-service agree company="Igloo Software"

@wyunchi-ms
Copy link
Contributor

Hi @Sandido , could you please help to valiate the examples?

@wyunchi-ms
Copy link
Contributor

/azp run azure-powershell - security-tools

Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

wyunchi-ms
wyunchi-ms previously approved these changes Jan 2, 2024
Copy link

github-actions bot commented Jan 2, 2024

‼️ DO NOT MERGE THIS PR ‼️
This PR was labeled "Do Not Merge" because it contains code change that cannot be merged. Please contact the reviewer for more information.

@wyunchi-ms wyunchi-ms dismissed their stale review January 2, 2024 08:56

Waiting for Sandido

@YanaXu
Copy link
Contributor

YanaXu commented Apr 24, 2024

Hi @Sandido, @haagha and @grizzlytheodore, could you please review the examples? I thinks they are fine.

@YanaXu YanaXu added the Compute label Apr 26, 2024
@YanaXu YanaXu merged commit d1ac9af into Azure:main Apr 30, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants