You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Details of the scenario you tried and the problem that is occurring
Running an initial export. Using powershell 7.1.7, installed modules in elevated command prompt. Runs as shown below, ending with the error "Parameter cannot be processed because the parameter name 'Error' is ambiguous. Possible matches include: -ErrorAction -ErrorVariable".
> Export-M365DSCConfiguration ApplicationId $ApplicationId -ApplicationSecret $ApplicationSecret -TenantId $TenantId
Exporting Microsoft 365 configuration for Mode: Default
Authentication methods specified:
- Service Principal with Application Secret
[WARNING] Based on the provided Authentication parameters, the following resources cannot be extracted:
(...long list of resources deleted from issue entry...)
Parameter cannot be processed because the parameter name 'Error' is ambiguous. Possible matches include: -ErrorAction -ErrorVariable.
Verbose logs showing the problem
VERBOSE: Loading module from path 'C:\Users\eirik.lygre\Documents\PowerShell\Modules\Microsoft.Graph.Teams\1.9.2\Microsoft.Graph.Teams.psm1'.
VERBOSE: Populating RepositorySourceLocation property for module Microsoft.Graph.Users.
VERBOSE: Loading module from path 'C:\Users\eirik.lygre\Documents\PowerShell\Modules\Microsoft.Graph.Users\1.13.0\Microsoft.Graph.Users.psm1'.
VERBOSE: Populating RepositorySourceLocation property for module Microsoft.Graph.Users.
VERBOSE: Populating RepositorySourceLocation property for module Microsoft.Graph.Users.Actions.
VERBOSE: Populating RepositorySourceLocation property for module Microsoft.Graph.Users.Actions.
VERBOSE: Loading module from path 'C:\Users\eirik.lygre\Documents\PowerShell\Modules\Microsoft.Graph.Users.Actions\1.9.2\Microsoft.Graph.Users.Actions.psm1'.
Parameter cannot be processed because the parameter name 'Error' is ambiguous. Possible matches include: -ErrorAction -ErrorVariable.
Partial Export file was saved at: C:\Users\EIRIK~1.LYG\AppData\Local\Temp\0d828988-fde2-4037-a44b-7dafa2c1ac0a.partial.ps1
(There is in fact no partial export file)
Suggested solution to the issue
Using ripgrep through the repository (the dev-version), I find only one instance of " -Error ":
PS C:\git\azure\Microsoft365DSC> git checkout 1.22.1214.1
HEAD is now at 4137458f Merge pull request #2668 from microsoft/Dev
PS C:\git\azure\Microsoft365DSC> rg -B8 -A3 -e " -Error " -e "-Error$" -t ps
Modules\Microsoft365DSC\Modules\M365DSCLogEngine.psm1
249- catch
250- {
251- Write-Verbose -Message $_
252-
253- $MessageText = "Could not write to event log Source {$Source} EntryType {$EntryType} Message {$Message}"
254- # Check call stack to prevent indefinite loop between New-M365DSCLogEntry and this function
255- if ((Get-PSCallStack)[1].FunctionName -ne 'New-M365DSCLogEntry')
256- {
257: New-M365DSCLogEntry -Error $_ -Message $MessageText `
258- -Source '[M365DSCLogEngine]' `
259- -TenantId $TenantId
260- }
The DSC configuration that is used to reproduce the issue (as detailed as possible)
Details of the scenario you tried and the problem that is occurring
Running an initial export. Using powershell 7.1.7, installed modules in elevated command prompt. Runs as shown below, ending with the error "Parameter cannot be processed because the parameter name 'Error' is ambiguous. Possible matches include: -ErrorAction -ErrorVariable".
Verbose logs showing the problem
(There is in fact no partial export file)
Suggested solution to the issue
Using ripgrep through the repository (the dev-version), I find only one instance of " -Error ":
The DSC configuration that is used to reproduce the issue (as detailed as possible)
N/A
The operating system the target node is running
Version of the DSC module that was used ('dev' if using current dev branch)
1.22.1214.1
The text was updated successfully, but these errors were encountered: