azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

Variables within PowerShell commands need to be explained

Open TimAbmgf opened this issue 2 years ago • 4 comments

Type of issue

Missing information

Feedback

When I look at the PS commands, there are variables within the examples which are not explained (on what goes into each variable):

  1. $ProtectableItems = Get-AzRecoveryServicesAsrProtectableItem -ProtectionContainer $Container
  2. Get-AzRecoveryServicesAsrProtectableItem -ProtectionContainer $pc -FriendlyName $piFriendlyName
  3. Get-AzRecoveryServicesAsrProtectableItem -ProtectionContainer $pc -Name $piName

I feel the examples should explain how to get the data for each variable to run the command

Page URL

https://learn.microsoft.com/en-us/powershell/module/az.recoveryservices/get-azrecoveryservicesasrprotectableitem?view=azps-11.2.0&tryIt=true&source=docs#code-try-5

Content source URL

https://github.com/Azure/azure-powershell/blob/main/src/RecoveryServices/RecoveryServices/help/Get-AzRecoveryServicesAsrProtectableItem.md

Author

@mikefrobbins

Document Id

bf1c237f-b687-f13f-5ac3-155d291aa343

TimAbmgf avatar Jan 30 '24 20:01 TimAbmgf

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Daya-Patil.

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Daya-Patil.

This is recovery services ASR. Adding @Sharmistha-Rai

Daya-Patil avatar Feb 01 '24 03:02 Daya-Patil

Let me group more similar requests in this single issue:

https://github.com/Azure/azure-powershell/blob/main/src/RecoveryServices/RecoveryServices/help/Get-AzRecoveryServicesAsrProtectionContainer.md

$ProtectionContainers = Get-AzRecoveryServicesAsrProtectionContainer -Fabric $fabric
Get-AzRecoveryServicesAsrProtectionContainer -Name xxxxx -Fabric $fabric
Get-AzRecoveryServicesAsrProtectionContainer -FriendlyName xxxxxxxx -Fabric $fabric

https://github.com/Azure/azure-powershell/blob/main/src/RecoveryServices/RecoveryServices/help/Get-AzRecoveryServicesAsrProtectionContainerMapping.md

$ProtectionContainerMappings = Get-AzRecoveryServicesAsrProtectionContainerMapping -ProtectionContainer $Container
$ProtectionContainerMappings = Get-AzRecoveryServicesAsrProtectionContainerMapping -ProtectionContainer $Container -Name $PrimaryProtectionContainerMapping

isra-fel avatar Feb 02 '24 14:02 isra-fel