Azure / Azure/azure-powershell-migration

Doesn't pickup calls that are in a variable

Open
#134 0 comments 0 reactions 1 assignee Claimed by @VeryEarly View on GitHub
Dominant language
PowerShell
Stars
36
Forks
27
PR merge metrics
No merged PRs in 30d

Description

**Component**
[X] PowerShell module
[] VSCode extension
[] Other

**Description of the issue**
Does not seem to migrate commands within a variable.

**Describe how to reproduce the issue**
```
Function Confirm-MicrosoftGraphServicePrincipal {
$graphsp = Get-AzureADServicePrincipal -SearchString "Microsoft Graph"
if (!$graphsp) {
$graphsp = Get-AzureADServicePrincipal -SearchString "Microsoft.Azure.AgregatorService"
}
if (!$graphsp) {
Login-AzureRmAccount -Credential $Credential
New-AzureRmADServicePrincipal -ApplicationId "00000003-0000-0000-c000-000000000000"
$graphsp = Get-AzureADServicePrincipal -SearchString "Microsoft Graph"
}
return $graphsp
}
```

Will only pick up

1 test.ps1:8:9 Cmdlet ReadyToUpgrade New-AzureRmADServicePrincipal New-AzADServicePrincipal
2 test.ps1:7:9 Cmdlet ReadyToUpgrade Login-AzureRmAccount Login-AzAccount

I expect Get-AzureADServicePrincipal to be changed to Get-AzADServicePrincipal

**Environment**
PSVersion 7.3.10
https://www.powershellgallery.com/packages/Az.Tools.Migration/11.0.0
Windows 11 22631.3007

**Error output**

**Additional context**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.