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

Get-AzADGroup Pipe line issue #23516

Closed
1spgardiner opened this issue Nov 21, 2023 · 2 comments
Closed

Get-AzADGroup Pipe line issue #23516

1spgardiner opened this issue Nov 21, 2023 · 2 comments
Labels
Azure PS Team bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Graph.Microsoft needs-author-feedback More information is needed from author to address the issue.

Comments

@1spgardiner
Copy link

Description

When running Get-AzADGroup I'm getting pipeline issues.

Removed AZ module and reinistalled

Issue script & Debug output

$DebugPreference-'Continue'
$varrgname = 'rg-keycabinet-pd-uks-01'
$GroupSuffix = 'Owner'

$ADGroupName = "az-rbac-$($varrgname)-$($GroupSuffix)"

$Info = Get-AzADGroup -DisplayName $ADGroupName -Debug
PS C:\Source\ALZ-Jemca> $ADGroupName = "az-rbac-$($varrgname)-$($GroupSuffix)"
PS C:\Source\ALZ-Jemca>  Get-AzADGroup -DisplayName $ADGroupName -Debug
ParentContainsErrorRecordException: C:\Users\Documents\PowerShell\Modules\Az.Resources\6.12.0\MSGraph.Autorest\exports\ProxyCmdletDefinitions.ps1:3532:9
Line |
3532 |          $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvoc|          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Exception calling "GetSteppablePipeline" with "1" argument(s): "The expression after '&' in a pipeline element produced an object that was not valid. It must result in a command name, a script       
     | block, or a CommandInfo object."

Environment data

PS C:\Source\ALZ-Jemca> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.4.0
PSEdition                      Core
GitCommitId                    7.4.0
OS                             Microsoft Windows 10.0.19045
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Module versions

PS C:\Source\ALZ-Jemca> Get-module Az*

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Script     2.13.2                Az.Accounts                         {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…}
Script     6.12.0                Az.Resources                        {Export-AzResourceGroup, Export-AzTemplateSpec, Get-AzDenyAssignment, Get-AzDeployment…}

Error output

HistoryId: 6

Message        : Exception calling "GetSteppablePipeline" with "1" argument(s): "The expression after '&' in a pipeline element produced an object that was not valid. It must result in a command name, a    
                 script block, or a CommandInfo object."
StackTrace     :    at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
                    at Microsoft.PowerShell.Executor.ExecuteCommandHelper(Pipeline tempPipeline, Exception& exceptionThrown, ExecutionOptions options)
Exception      : System.Management.Automation.MethodInvocationException
InvocationInfo : {}
Line           :         $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)

Position       : At C:\Users\xxx\Documents\PowerShell\Modules\Az.Resources\6.12.0\MSGraph.Autorest\exports\ProxyCmdletDefinitions.ps1:3532 char:9
                 +         $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvoc+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 6

Message        : The expression after '&' in a pipeline element produced an object that was not valid. It must result in a command name, a script block, or a CommandInfo object.
StackTrace     :    at System.Management.Automation.PipelineOps.AddCommand(PipelineProcessor pipe, CommandParameterInternal[] commandElements, CommandBaseAst commandBaseAst, CommandRedirection[]
                 redirections, ExecutionContext context)
                    at System.Management.Automation.PipelineOps.GetSteppablePipeline(PipelineAst pipelineAst, CommandOrigin commandOrigin, ScriptBlock scriptBlock, Object[] args)
                    at CallSite.Target(Closure, CallSite, Object, Object)
Exception      : System.Management.Automation.RuntimeException
InvocationInfo : {}
Line           :         $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)

Position       : At C:\Users\Documents\PowerShell\Modules\Az.Resources\6.12.0\MSGraph.Autorest\exports\ProxyCmdletDefinitions.ps1:3532 char:9
                 +         $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvoc+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 6
@1spgardiner 1spgardiner added bug This issue requires a change to an existing behavior in the product in order to be resolved. needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Nov 21, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported needs-triage This is a new issue that needs to be triaged to the appropriate team. and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Nov 21, 2023
@isra-fel
Copy link
Member

Thanks for the feedback but I cannot reproduce this using the same version. Could you try uninstalling and installing the Az module again?
cc @dolauli

@isra-fel isra-fel added Azure PS Team needs-author-feedback More information is needed from author to address the issue. Graph.Microsoft and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Nov 22, 2023
@1spgardiner
Copy link
Author

Thank you, I removed al modules and let them reinstall across PS5.1 and PS7 module spaces. User and Computer and this looks to have resolved the issue. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure PS Team bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Graph.Microsoft needs-author-feedback More information is needed from author to address the issue.
Projects
None yet
Development

No branches or pull requests

2 participants