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

Doesn't pickup calls that are in a variable #134

Open
AtleeRRN opened this issue Jan 19, 2024 · 0 comments
Open

Doesn't pickup calls that are in a variable #134

AtleeRRN opened this issue Jan 19, 2024 · 0 comments
Assignees

Comments

@AtleeRRN
Copy link

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

@VeryEarly VeryEarly self-assigned this Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants