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

Install experience fails if user path has special characters #2381

Open
ChrisOD-AD opened this issue Oct 23, 2023 · 5 comments
Open

Install experience fails if user path has special characters #2381

ChrisOD-AD opened this issue Oct 23, 2023 · 5 comments

Comments

@ChrisOD-AD
Copy link

Describe the bug

If a User has an "'" (single quote or apostrophe) in their directory path then import-module or running commandlets fails.

To Reproduce
Steps to reproduce the behavior:

  1. Have an Azure User with an apostrophe in their real name
  2. have a device that is connected to that azure ad
  3. attempt to install then import module Microsoft.Graph

Expected behavior

The commandlets work?

Debug Output After an Install-Module

connect-mggraph -debug
$ParseException/ at System.Management.Automation.ScriptBlock.Create(Parser parser, String fileName, String fileContents)
at System.Management.Automation.ScriptBlock.Create(ExecutionContext context, String script)
at System.Management.Automation.CommandInvocationIntrinsics.InvokeScript(String script, Boolean useNewScope, PipelineResultTypes writeToPipeline, IList input, Object[] args)
at System.Management.Automation.CommandInvocationIntrinsics.InvokeScript(String script)
at Microsoft.Graph.PowerShell.PSCmdletExtensions.RunScript[T](CommandInvocationIntrinsics cii, String script)
at Microsoft.Graph.PowerShell.PSCmdletExtensions.RunScript[T](PSCmdlet cmdlet, String script)
at Microsoft.Graph.PowerShell.Authentication.Utilities.Runtime.Cmdlets.GetScriptCmdlet.GetScriptCmdlets(String scriptFolder)
at Microsoft.Graph.PowerShell.Authentication.Utilities.Runtime.Cmdlets.GetScriptCmdlet.ProcessRecord()
$IncompleteParseException/ at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection1 input, PSDataCollection1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection1 input, PSDataCollection1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.InvokeT
at Microsoft.Graph.PowerShell.PSCmdletExtensions.RunScript[T](String script)
at Microsoft.Graph.PowerShell.Authentication.Utilities.Runtime.Cmdlets.GetModuleCmdlet.GetModuleCmdlets(String modulePath)
at Microsoft.Graph.PowerShell.Authentication.Utilities.Runtime.Cmdlets.GetModuleCmdlet.ProcessRecord()
connect-mggraph: The term 'connect-mggraph' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Module Version
PS C:\Users\ChrisO'Donoghue> get-module microsoft.graph
PS C:\Users\ChrisO'Donoghue> Get-Module -ListAvailable

Directory: C:\Users\ChrisO'Donoghue\Documents\PowerShell\Modules

ModuleType Version PreRelease Name PSEdition ExportedCommands


Binary 2.0.2.180 AzureAD Desk
Script 3.0.0 ExchangeOnlineManagement Desk {Get-ConnectionInformation, Get-EXOCasM…
Manifest 2.8.0 Microsoft.Graph Core,Desk
Script 2.8.0 Microsoft.Graph.Applications Core,Desk {Add-MgApplicationKey, Add-MgApplicatio…
Script 1.18.0 Microsoft.Graph.Applications Core,Desk {Add-MgApplicationKey, Add-MgApplicatio…
Script 2.8.0 Microsoft.Graph.Authentication Core,Desk {Connect-MgGraph, Disconnect-MgGraph, G…
Script 1.18.0 Microsoft.Graph.Authentication Core,Desk {Connect-MgGraph, Disconnect-MgGraph, G…
Script 2.8.0 Microsoft.Graph.Bookings Core,Desk {Get-MgBookingBusiness, Get-MgBookingBu…
Script 1.18.0 Microsoft.Graph.Bookings Core,Desk {Get-MgBookingBusiness, Get-MgBookingBu…
Script 2.8.0 Microsoft.Graph.Calendar Core,Desk {Get-MgGroupCalendar, Get-MgGroupCalend…
Script 1.18.0 Microsoft.Graph.Calendar Core,Desk {Get-MgGroupCalendar, Get-MgGroupCalend…
Script 2.8.0 Microsoft.Graph.ChangeNotifications Core,Desk {Get-MgSubscription, Invoke-MgReauthori…
Script 1.18.0 Microsoft.Graph.ChangeNotifications Core,Desk {Get-MgSubscription, Invoke-MgReauthori…
Script 2.8.0 Microsoft.Graph.CloudCommunications Core,Desk {Add-MgCommunicationCallLargeGalleryVie…
Script 1.18.0 Microsoft.Graph.CloudCommunications Core,Desk {Add-MgCommunicationCallLargeGalleryVie…
Script 2.8.0 Microsoft.Graph.Compliance Core,Desk {Get-MgCompliance, Get-MgPrivacySubject…
Script 1.18.0 Microsoft.Graph.Compliance Core,Desk {Add-MgComplianceEdiscoveryCaseCustodia…
Script 2.8.0 Microsoft.Graph.CrossDeviceExperie… Core,Desk {Get-MgUserActivity, Get-MgUserActivity…
Script 1.18.0 Microsoft.Graph.CrossDeviceExperie… Core,Desk {Get-MgUserActivity, Get-MgUserActivity…
Script 2.8.0 Microsoft.Graph.DeviceManagement Core,Desk {Get-MgAdminEdge, Get-MgAdminEdgeIntern…
Script 1.18.0 Microsoft.Graph.DeviceManagement Core,Desk {Get-MgDeviceManagement, Get-MgDeviceMa…
Script 2.8.0 Microsoft.Graph.DeviceManagement.A… Core,Desk {Clear-MgDeviceManagementManagedDevice,…
Script 1.18.0 Microsoft.Graph.DeviceManagement.A… Core,Desk {Add-MgDeviceManagementGroupPolicyUploa…
Script 2.8.0 Microsoft.Graph.DeviceManagement.A… Core,Desk {Get-MgDeviceManagementApplePushNotific…
Script 1.18.0 Microsoft.Graph.DeviceManagement.A… Core,Desk {Get-MgDeviceManagementApplePushNotific…
Script 2.8.0 Microsoft.Graph.DeviceManagement.E… Core,Desk {Get-MgDeviceManagementConditionalAcces…
Script 1.18.0 Microsoft.Graph.DeviceManagement.E… Core,Desk {Get-MgDeviceManagementAndroidDeviceOwn…
Script 2.8.0 Microsoft.Graph.DeviceManagement.F… Core,Desk {Confirm-MgDeviceManagementWindowsEnrol…
Script 1.18.0 Microsoft.Graph.DeviceManagement.F… Core,Desk {Compare-MgDeviceManagementIntent, Comp…
Script 2.8.0 Microsoft.Graph.Devices.CloudPrint Core,Desk {Get-MgPrint, Get-MgPrintConnector, Get…
Script 1.18.0 Microsoft.Graph.Devices.CloudPrint Core,Desk {Get-MgPrint, Get-MgPrintConnector, Get…
Script 2.8.0 Microsoft.Graph.Devices.CorporateM… Core,Desk {Get-MgDeviceAppManagement, Get-MgDevic…
Script 1.18.0 Microsoft.Graph.Devices.CorporateM… Core,Desk {Clear-MgDeviceAppMgtWindowInformationP…
Script 2.8.0 Microsoft.Graph.Devices.ServiceAnn… Core,Desk {Get-MgServiceAnnouncementHealthOvervie…
Script 1.18.0 Microsoft.Graph.Devices.ServiceAnn… Core,Desk {Get-MgServiceAnnouncementHealthOvervie…
Script 2.8.0 Microsoft.Graph.DirectoryObjects Core,Desk {Confirm-MgDirectoryObjectMemberGroup, …
Script 1.18.0 Microsoft.Graph.DirectoryObjects Core,Desk {Confirm-MgDirectoryObjectMemberGroup, …
Script 2.8.0 Microsoft.Graph.Education Core,Desk {Get-MgEducationClass, Get-MgEducationC…
Script 1.18.0 Microsoft.Graph.Education Core,Desk {Get-MgEducationClass, Get-MgEducationC…
Script 2.8.0 Microsoft.Graph.Files Core,Desk {Add-MgDriveListContentTypeCopy, Add-Mg…
Script 1.18.0 Microsoft.Graph.Files Core,Desk {Add-MgDriveListContentTypeCopy, Add-Mg…
Script 1.18.0 Microsoft.Graph.Financials Core,Desk {Get-MgFinancial, Get-MgFinancialCompan…
Script 2.8.0 Microsoft.Graph.Groups Core,Desk {Add-MgGroupDriveListContentTypeCopy, A…
Script 1.18.0 Microsoft.Graph.Groups Core,Desk {Add-MgGroupDriveListContentTypeCopy, A…
Script 2.8.0 Microsoft.Graph.Identity.Directory… Core,Desk {Confirm-MgContactMemberGroup, Confirm-…
Script 1.18.0 Microsoft.Graph.Identity.Directory… Core,Desk {Complete-MgDirectoryImpactedResource, …
Script 2.8.0 Microsoft.Graph.Identity.Governance Core,Desk {Add-MgIdentityGovernanceAccessReviewDe…
Script 1.18.0 Microsoft.Graph.Identity.Governance Core,Desk {Add-MgAccessReviewDecision, Add-MgAcce…
Script 2.8.0 Microsoft.Graph.Identity.Partner Core,Desk {Get-MgTenantRelationshipDelegatedAdmin…
Script 2.8.0 Microsoft.Graph.Identity.SignIns Core,Desk {Confirm-MgRiskyServicePrincipalComprom…
Script 1.18.0 Microsoft.Graph.Identity.SignIns Core,Desk {Confirm-MgInformationProtectionSignatu…
Script 2.8.0 Microsoft.Graph.Mail Core,Desk {Get-MgUserInferenceClassification, Get…
Script 1.18.0 Microsoft.Graph.Mail Core,Desk {Get-MgUserInferenceClassification, Get…
Script 1.18.0 Microsoft.Graph.ManagedTenants Core,Desk {Get-MgTenantRelationshipManagedTenant,…
Script 2.8.0 Microsoft.Graph.Notes Core,Desk {Get-MgGroupOnenoteNotebook, Get-MgGrou…
Script 1.18.0 Microsoft.Graph.Notes Core,Desk {Get-MgGroupOnenoteNotebook, Get-MgGrou…
Script 2.8.0 Microsoft.Graph.People Core,Desk {Get-MgUserLastSharedMethodInsight, Get…
Script 1.18.0 Microsoft.Graph.People Core,Desk {Get-MgUserActivityStatistics, Get-MgUs…
Script 2.8.0 Microsoft.Graph.PersonalContacts Core,Desk {Get-MgUserContact, Get-MgUserContactCo…
Script 1.18.0 Microsoft.Graph.PersonalContacts Core,Desk {Get-MgUserContact, Get-MgUserContactEx…
Script 2.8.0 Microsoft.Graph.Planner Core,Desk {Get-MgGroupPlanner, Get-MgGroupPlanner…
Script 1.18.0 Microsoft.Graph.Planner Core,Desk {Get-MgGroupPlanner, Get-MgGroupPlanner…
Script 2.8.0 Microsoft.Graph.Reports Core,Desk {Get-MgAuditLogDirectoryAudit, Get-MgAu…
Script 1.18.0 Microsoft.Graph.Reports Core,Desk {Confirm-MgAuditLogSignInCompromised, C…
Script 2.8.0 Microsoft.Graph.SchemaExtensions Core,Desk {Get-MgSchemaExtension, Get-MgSchemaExt…
Script 1.18.0 Microsoft.Graph.SchemaExtensions Core,Desk {Get-MgSchemaExtension, New-MgSchemaExt…
Script 2.8.0 Microsoft.Graph.Search Core,Desk {Add-MgExternalConnectionItemActivity, …
Script 1.18.0 Microsoft.Graph.Search Core,Desk {Add-MgExternalConnectionItemActivity, …
Script 2.8.0 Microsoft.Graph.Security Core,Desk {Add-MgSecurityCaseEdiscoveryCaseCustod…
Script 1.18.0 Microsoft.Graph.Security Core,Desk {Add-MgSecurityCaseEdiscoveryCaseCustod…
Script 2.8.0 Microsoft.Graph.Sites Core,Desk {Add-MgSite, Add-MgSiteContentTypeCopy,…
Script 1.18.0 Microsoft.Graph.Sites Core,Desk {Add-MgSiteContentTypeCopy, Add-MgSiteC…
Script 2.8.0 Microsoft.Graph.Teams Core,Desk {Add-MgChatMember, Add-MgTeamChannelMem…
Script 1.18.0 Microsoft.Graph.Teams Core,Desk {Add-MgChatMember, Add-MgTeamChannelMem…
Script 2.8.0 Microsoft.Graph.Users Core,Desk {Get-MgUser, Get-MgUserCount, Get-MgUse…
Script 1.18.0 Microsoft.Graph.Users Core,Desk {Get-MgUser, Get-MgUserCreatedObject, G…
Script 2.8.0 Microsoft.Graph.Users.Actions Core,Desk {Add-MgUserChatMember, Add-MgUserDriveL…
Script 1.18.0 Microsoft.Graph.Users.Actions Core,Desk {Add-MgUserChatMember, Add-MgUserDriveL…
Script 2.8.0 Microsoft.Graph.Users.Functions Core,Desk {Export-MgUserDeviceAndAppManagementDat…
Script 1.18.0 Microsoft.Graph.Users.Functions Core,Desk {Export-MgUserDeviceAndAppManagementDat…
Script 1.18.0 Microsoft.Graph.WindowsUpdates Core,Desk {Add-MgWindowsUpdatesDeploymentAudience…

Directory: C:\program files\powershell\7\Modules

ModuleType Version PreRelease Name PSEdition ExportedCommands


Manifest 7.0.0.0 CimCmdlets Core {Get-CimAssociatedInstance, Get-CimClas…
Manifest 1.2.5 Microsoft.PowerShell.Archive Desk {Compress-Archive, Expand-Archive}
Manifest 7.0.0.0 Microsoft.PowerShell.Diagnostics Core {Get-WinEvent, New-WinEvent, Get-Counte…
Manifest 7.0.0.0 Microsoft.PowerShell.Host Core {Start-Transcript, Stop-Transcript}
Manifest 7.0.0.0 Microsoft.PowerShell.Management Core {Add-Content, Clear-Content, Get-Clipbo…
Manifest 7.0.0.0 Microsoft.PowerShell.Security Core {Get-Acl, Set-Acl, Get-PfxCertificate, …
Manifest 7.0.0.0 Microsoft.PowerShell.Utility Core {Export-Alias, Get-Alias, Import-Alias,…
Manifest 7.0.0.0 Microsoft.WSMan.Management Core {Disable-WSManCredSSP, Enable-WSManCred…
Script 1.4.8.1 PackageManagement Desk {Find-Package, Get-Package, Get-Package…
Script 2.2.5 PowerShellGet Desk {Find-Command, Find-DSCResource, Find-M…
Script 7.0.0.0 PSDiagnostics Core {Disable-PSTrace, Disable-PSWSManCombin…
Script 2.2.6 PSReadLine Desk {Get-PSReadLineKeyHandler, Set-PSReadLi…
Binary 2.0.3 ThreadJob Desk Start-ThreadJob

Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version PreRelease Name PSEdition ExportedCommands


Script 0.9.0 AADInternals Desk {Export-AADIntADFSCertificates, Export-…
Script 10.2.0 Az Core,Desk
Script 10.0.0 Az Core,Desk
Script 2.12.5 Az.Accounts Core,Desk {Disable-AzDataCollection, Disable-AzCo…
Script 2.12.3 Az.Accounts Core,Desk {Disable-AzDataCollection, Disable-AzCo…
Script 2.0.0 Az.Advisor Core,Desk {Disable-AzAdvisorRecommendation, Enabl…
Script 5.5.1 Az.Aks Core,Desk {Get-AzAksCluster, New-AzAksCluster, Re…
Script 5.5.0 Az.Aks Core,Desk {Get-AzAksCluster, New-AzAksCluster, Re…
Script 1.1.4 Az.AnalysisServices Core,Desk {Resume-AzAnalysisServicesServer, Suspe…
Script 4.0.2 Az.ApiManagement Core,Desk {Add-AzApiManagementApiToGateway, Add-A…
Script 1.3.0 Az.AppConfiguration Core,Desk {Get-AzAppConfigurationStore, Get-AzApp…
Script 1.2.0 Az.AppConfiguration Core,Desk {Get-AzAppConfigurationStore, Get-AzApp…
Script 2.2.2 Az.ApplicationInsights Core,Desk {Get-AzApplicationInsights, Get-AzAppli…
Script 2.0.0 Az.Attestation Core,Desk {Get-AzAttestationPolicy, Set-AzAttesta…
Script 1.0.0 Az.Automanage Core,Desk {Get-AzAutomanageBestPractice, Get-AzAu…
Script 1.9.1 Az.Automation Core,Desk {Set-AzAutomationPython3Package, New-Az…
Script 3.5.0 Az.Batch Core,Desk {Remove-AzBatchAccount, Get-AzBatchAcco…
Script 3.4.0 Az.Batch Core,Desk {Remove-AzBatchAccount, Get-AzBatchAcco…
Script 2.0.3 Az.Billing Core,Desk {Get-AzBillingInvoice, Get-AzBillingPer…
Script 2.0.2 Az.Billing Core,Desk {Get-AzBillingInvoice, Get-AzBillingPer…
Script 3.1.0 Az.Cdn Core,Desk {Clear-AzCdnEndpointContent, Clear-AzFr…
Script 1.2.0 Az.CloudService Core,Desk {Get-AzCloudService, Get-AzCloudService…
Script 1.14.0 Az.CognitiveServices Core,Desk {Get-AzCognitiveServicesAccount, Get-Az…
Script 1.13.1 Az.CognitiveServices Core,Desk {Get-AzCognitiveServicesAccount, Get-Az…
Script 6.2.0 Az.Compute Core,Desk {Remove-AzAvailabilitySet, Get-AzAvaila…
Script 6.0.0 Az.Compute Core,Desk {Remove-AzAvailabilitySet, Get-AzAvaila…
Script 1.0.0 Az.ConfidentialLedger Core,Desk {Get-AzConfidentialLedger, New-AzConfid…
Script 3.2.0 Az.ContainerInstance Core,Desk {Add-AzContainerInstanceOutput, Get-AzC…
Script 4.1.0 Az.ContainerRegistry Core,Desk {Connect-AzContainerRegistry, Get-AzCon…
Script 4.0.0 Az.ContainerRegistry Core,Desk {Connect-AzContainerRegistry, Get-AzCon…
Script 1.11.2 Az.CosmosDB Core,Desk {Get-AzCosmosDBSqlContainer, Get-AzCosm…
Script 1.11.0 Az.CosmosDB Core,Desk {Get-AzCosmosDBSqlContainer, Get-AzCosm…
Script 1.1.0 Az.DataBoxEdge Core,Desk {Get-AzDataBoxEdgeJob, Get-AzDataBoxEdg…
Script 1.7.0 Az.Databricks Core,Desk {Get-AzDatabricksAccessConnector, Get-A…
Script 1.5.1 Az.Databricks Core,Desk {Get-AzDatabricksAccessConnector, Get-A…
Script 1.17.0 Az.DataFactory Core,Desk {Set-AzDataFactoryV2, Update-AzDataFact…
Script 1.16.13 Az.DataFactory Core,Desk {Set-AzDataFactoryV2, Update-AzDataFact…
Script 1.0.2 Az.DataLakeAnalytics Core,Desk {Get-AzDataLakeAnalyticsDataSource, New…
Script 1.3.0 Az.DataLakeStore Core,Desk {Get-AzDataLakeStoreTrustedIdProvider, …
Script 2.0.0 Az.DataProtection Core,Desk {Backup-AzDataProtectionBackupInstanceA…
Script 1.0.1 Az.DataShare Core,Desk {New-AzDataShareAccount, Get-AzDataShar…
Script 1.1.0 Az.DeploymentManager Core,Desk {Get-AzDeploymentManagerArtifactSource,…
Script 4.0.0 Az.DesktopVirtualization Core,Desk {Disconnect-AzWvdUserSession, Expand-Az…
Script 1.0.2 Az.DevTestLabs Core,Desk {Get-AzDtlAllowedVMSizesPolicy, Get-AzD…
Script 1.1.3 Az.Dns Core,Desk {Get-AzDnsRecordSet, New-AzDnsRecordCon…
Script 1.1.2 Az.Dns Core,Desk {Get-AzDnsRecordSet, New-AzDnsRecordCon…
Script 1.6.0 Az.EventGrid Core,Desk {New-AzEventGridTopic, Get-AzEventGridT…
Script 4.0.0 Az.EventHub Core,Desk {New-AzEventHubAuthorizationRuleSASToke…
Script 1.10.0 Az.FrontDoor Core,Desk {New-AzFrontDoor, Get-AzFrontDoor, Set-…
Script 4.0.6 Az.Functions Core,Desk {Get-AzFunctionApp, Get-AzFunctionAppAv…
Script 6.0.0 Az.HDInsight Core,Desk {Get-AzHDInsightJob, New-AzHDInsightSqo…
Script 2.0.0 Az.HealthcareApis Core,Desk {Get-AzHealthcareApisService, Get-AzHea…
Script 2.7.5 Az.IotHub Core,Desk {Add-AzIotHubKey, Get-AzIotHubEventHubC…
Script 4.10.1 Az.KeyVault Core,Desk {Add-AzKeyVaultCertificate, Update-AzKe…
Script 4.10.0 Az.KeyVault Core,Desk {Add-AzKeyVaultCertificate, Update-AzKe…
Script 2.2.0 Az.Kusto Core,Desk {Add-AzKustoClusterLanguageExtension, A…
Script 1.0.0 Az.LoadTesting Core,Desk {Get-AzLoad, New-AzLoad, Remove-AzLoad,…
Script 1.5.0 Az.LogicApp Core,Desk {Get-AzIntegrationAccountAgreement, Get…
Script 1.1.3 Az.MachineLearning Core,Desk {Move-AzMlCommitmentAssociation, Get-Az…
Script 1.0.0 Az.MachineLearningServices Core,Desk {Get-AzMLServiceQuota, Get-AzMLServiceU…
Script 1.3.0 Az.Maintenance Core,Desk {Get-AzApplyUpdate, Get-AzConfiguration…
Script 1.2.1 Az.Maintenance Core,Desk {Get-AzApplyUpdate, Get-AzConfiguration…
Script 1.1.1 Az.ManagedServiceIdentity Core,Desk {Get-AzFederatedIdentityCredentials, Ge…
Script 3.0.0 Az.ManagedServices Core,Desk {Get-AzManagedServicesAssignment, Get-A…
Script 2.0.0 Az.MarketplaceOrdering Core,Desk {Get-AzMarketplaceTerms, Invoke-AzMarke…
Script 1.1.1 Az.Media Core,Desk {Sync-AzMediaServiceStorageKey, Set-AzM…
Script 2.2.0 Az.Migrate Core,Desk {Get-AzMigrateDiscoveredServer, Get-AzM…
Script 2.1.0 Az.Migrate Core,Desk {Get-AzMigrateDiscoveredServer, Get-AzM…
Script 4.5.0 Az.Monitor Core,Desk {Get-AzMetricDefinition, Get-AzMetric, …
Script 1.1.1 Az.MySql Core,Desk {Get-AzMySqlConfiguration, Get-AzMySqlC…
Script 1.1.0 Az.MySql Core,Desk {Get-AzMySqlConfiguration, Get-AzMySqlC…
Script 6.1.1 Az.Network Core,Desk {Add-AzApplicationGatewayAuthentication…
Script 6.0.0 Az.Network Core,Desk {Add-AzApplicationGatewayAuthentication…
Script 1.1.1 Az.NotificationHubs Core,Desk {Get-AzNotificationHub, Get-AzNotificat…
Script 3.2.0 Az.OperationalInsights Core,Desk {New-AzOperationalInsightsAzureActivity…
Script 1.6.2 Az.PolicyInsights Core,Desk {Get-AzPolicyEvent, Get-AzPolicyState, …
Script 1.6.1 Az.PolicyInsights Core,Desk {Get-AzPolicyEvent, Get-AzPolicyState, …
Script 1.1.0 Az.PostgreSql Core,Desk {Get-AzPostgreSqlConfiguration, Get-AzP…
Script 1.2.1 Az.PowerBIEmbedded Core,Desk {Remove-AzPowerBIWorkspaceCollection, G…
Script 1.0.4 Az.PrivateDns Core,Desk {Get-AzPrivateDnsZone, Remove-AzPrivate…
Script 1.0.3 Az.PrivateDns Core,Desk {Get-AzPrivateDnsZone, Remove-AzPrivate…
Script 6.5.0 Az.RecoveryServices Core,Desk {Get-AzRecoveryServicesBackupProperty, …
Script 6.4.0 Az.RecoveryServices Core,Desk {Get-AzRecoveryServicesBackupProperty, …
Script 1.8.0 Az.RedisCache Core,Desk {Remove-AzRedisCachePatchSchedule, New-…
Script 1.7.1 Az.RedisCache Core,Desk {Remove-AzRedisCachePatchSchedule, New-…
Script 1.2.0 Az.RedisEnterpriseCache Core,Desk {Export-AzRedisEnterpriseCache, Get-AzR…
Script 2.0.0 Az.Relay Core,Desk {Get-AzRelayAuthorizationRule, Get-AzRe…
Script 0.12.0 Az.Reservations Core,Desk {Get-AzReservation, Get-AzReservationAv…
Script 1.1.0 Az.ResourceMover Core,Desk {Add-AzResourceMoverMoveResource, Get-A…
Script 6.9.0 Az.Resources Core,Desk {Get-AzProviderOperation, Remove-AzRole…
Script 6.7.0 Az.Resources Core,Desk {Get-AzProviderOperation, Remove-AzRole…
Script 1.4.0 Az.Security Core,Desk {Get-AzSecuritySolution, Get-AzSecurity…
Script 3.0.1 Az.SecurityInsights Core,Desk {Get-AzSentinelAlertRule, Get-AzSentine…
Script 3.0.0 Az.ServiceBus Core,Desk {New-AzServiceBusAuthorizationRuleSASTo…
Script 3.2.0 Az.ServiceFabric Core,Desk {Add-AzServiceFabricClientCertificate, …
Script 2.0.0 Az.SignalR Core,Desk {New-AzSignalR, Get-AzSignalR, Get-AzSi…
Script 4.9.0 Az.Sql Core,Desk {Invoke-AzSqlServerExternalGovernanceSt…
Script 4.7.0 Az.Sql Core,Desk {Invoke-AzSqlServerExternalGovernanceSt…
Script 2.0.0 Az.SqlVirtualMachine Core,Desk {Get-AzAvailabilityGroupListener, Get-A…
Script 2.1.0 Az.StackHCI Core,Desk {Add-AzStackHCIVMAttestation, Disable-A…
Script 2.0.0 Az.StackHCI Core,Desk {Add-AzStackHCIVMAttestation, Disable-A…
Script 5.9.0 Az.Storage Core,Desk {Get-AzStorageAccount, Get-AzStorageAcc…
Script 5.7.0 Az.Storage Core,Desk {Get-AzStorageAccount, Get-AzStorageAcc…
Script 1.0.1 Az.StorageMover Core,Desk {Get-AzStorageMover, Get-AzStorageMover…
Script 1.0.0 Az.StorageMover Core,Desk {Get-AzStorageMover, Get-AzStorageMover…
Script 2.0.0 Az.StorageSync Core,Desk {Invoke-AzStorageSyncCompatibilityCheck…
Script 2.0.0 Az.StreamAnalytics Core,Desk {Get-AzStreamAnalyticsCluster, Get-AzSt…
Script 1.0.0 Az.Support Core,Desk {Get-AzSupportService, Get-AzSupportPro…
Script 3.0.2 Az.Synapse Core,Desk {Get-AzSynapseSparkJob, Stop-AzSynapseS…
Script 3.0.0 Az.Synapse Core,Desk {Get-AzSynapseSparkJob, Stop-AzSynapseS…
Script 1.2.1 Az.TrafficManager Core,Desk {Add-AzTrafficManagerCustomHeaderToEndp…
Script 1.2.0 Az.TrafficManager Core,Desk {Add-AzTrafficManagerCustomHeaderToEndp…
Script 3.1.0 Az.Websites Core,Desk {Get-AzAppServicePlan, Set-AzAppService…
Script 3.0.0 Az.Websites Core,Desk {Get-AzAppServicePlan, Set-AzAppService…
Script 5.1.2 Azure Desk {Get-AzureAutomationCertificate, Get-Az…
Manifest 0.5.0 Azure.AnalysisServices Desk {Add-AzureAnalysisServicesAccount, Rest…
Script 4.2.1 Azure.Storage Desk {Get-AzureStorageTable, New-AzureStorag…
Script 5.7.0 AzureRM Desk
Script 0.6.6 AzureRM.AnalysisServices Desk {Resume-AzureRmAnalysisServicesServer, …
Script 5.1.2 AzureRM.ApiManagement Desk {Add-AzureRmApiManagementRegion, Get-Az…
Script 0.1.3 AzureRM.ApplicationInsights Desk {Get-AzureRmApplicationInsights, New-Az…
Script 4.3.2 AzureRM.Automation Desk {Get-AzureRMAutomationHybridWorkerGroup…
Script 4.0.4 AzureRM.Backup Desk {Backup-AzureRmBackupItem, Enable-Azure…
Script 4.0.6 AzureRM.Batch Desk {Remove-AzureRmBatchAccount, Get-AzureR…
Script 0.14.1 AzureRM.Billing Desk {Get-AzureRmBillingInvoice, Get-AzureRm…
Script 4.2.2 AzureRM.Cdn Desk {Get-AzureRmCdnProfile, Get-AzureRmCdnP…
Script 0.9.4 AzureRM.CognitiveServices Desk {Get-AzureRmCognitiveServicesAccount, G…
Script 4.6.0 AzureRM.Compute Desk {Remove-AzureRmAvailabilitySet, Get-Azu…
Script 0.3.1 AzureRM.Consumption Desk Get-AzureRmConsumptionUsageDetail
Script 0.2.5 AzureRM.ContainerInstance Desk {New-AzureRmContainerGroup, Get-AzureRm…
Script 1.0.4 AzureRM.ContainerRegistry Desk {New-AzureRmContainerRegistry, Get-Azur…
Script 4.2.2 AzureRM.DataFactories Desk {Remove-AzureRmDataFactory, Get-AzureRm…
Script 0.5.3 AzureRM.DataFactoryV2 Desk {Set-AzureRmDataFactoryV2, Update-Azure…
Script 4.2.3 AzureRM.DataLakeAnalytics Desk {Get-AzureRmDataLakeAnalyticsDataSource…
Script 5.2.0 AzureRM.DataLakeStore Desk {Get-AzureRmDataLakeStoreTrustedIdProvi…
Script 4.0.4 AzureRM.DevTestLabs Desk {Get-AzureRmDtlAllowedVMSizesPolicy, Ge…
Script 4.1.2 AzureRM.Dns Desk {Get-AzureRmDnsRecordSet, New-AzureRmDn…
Script 0.3.2 AzureRM.EventGrid Desk {New-AzureRmEventGridTopic, Get-AzureRm…
Script 0.6.3 AzureRM.EventHub Desk {New-AzureRmEventHubNamespace, Get-Azur…
Script 4.1.2 AzureRM.HDInsight Desk {Get-AzureRmHDInsightJob, New-AzureRmHD…
Script 4.0.4 AzureRM.Insights Desk {Get-AzureRmMetricDefinition, Get-Azure…
Script 3.1.2 AzureRM.IotHub Desk {Add-AzureRmIotHubKey, Get-AzureRmIotHu…
Script 4.3.0 AzureRM.KeyVault Desk {Add-AzureKeyVaultCertificate, Set-Azur…
Script 4.0.3 AzureRM.LogicApp Desk {Get-AzureRmIntegrationAccountAgreement…
Script 0.17.2 AzureRM.MachineLearning Desk {Move-AzureRmMlCommitmentAssociation, G…
Script 0.4.2 AzureRM.MachineLearningCompute Desk {Get-AzureRmMlOpCluster, Get-AzureRmMlO…
Script 0.2.1 AzureRM.MarketplaceOrdering Desk {Get-AzureRmMarketplaceTerms, Set-Azure…
Script 0.9.2 AzureRM.Media Desk {Sync-AzureRmMediaServiceStorageKeys, S…
Script 5.4.2 AzureRM.Network Desk {Add-AzureRmApplicationGatewayAuthentic…
Script 4.1.1 AzureRM.NotificationHubs Desk {Get-AzureRmNotificationHub, Get-AzureR…
Script 4.3.2 AzureRM.OperationalInsights Desk {New-AzureRmOperationalInsightsAzureAct…
Script 4.1.4 AzureRM.PowerBIEmbedded Desk {Remove-AzureRmPowerBIWorkspaceCollecti…
Script 4.6.0 AzureRM.Profile Desk {Disable-AzureRmDataCollection, Disable…
Script 4.1.2 AzureRM.RecoveryServices Desk {Get-AzureRmRecoveryServicesBackupPrope…
Script 4.1.2 AzureRM.RecoveryServices.Backup Desk {Backup-AzureRmRecoveryServicesBackupIt…
Script 0.2.4 AzureRM.RecoveryServices.SiteRecov… Desk {Edit-AzureRmRecoveryServicesAsrRecover…
Script 4.1.2 AzureRM.RedisCache Desk {Remove-AzureRmRedisCachePatchSchedule,…
Script 0.3.3 AzureRM.Relay Desk {New-AzureRmRelayNamespace, Get-AzureRm…
Script 5.5.2 AzureRM.Resources Desk {Get-AzureRmProviderOperation, Remove-A…
Script 0.16.3 AzureRM.Scheduler Desk {Disable-AzureRmSchedulerJobCollection,…
Script 4.1.2 AzureRM.ServerManagement Desk {Invoke-AzureRmServerManagementPowerShe…
Script 0.6.4 AzureRM.ServiceBus Desk {New-AzureRmServiceBusNamespace, Get-Az…
Script 0.3.4 AzureRM.ServiceFabric Desk {Add-AzureRmServiceFabricApplicationCer…
Script 5.0.6 AzureRM.SiteRecovery Desk {Get-AzureRmSiteRecoveryFabric, New-Azu…
Script 4.4.0 AzureRM.Sql Desk {Get-AzureRmSqlDatabaseTransparentDataE…
Script 4.2.3 AzureRM.Storage Desk {Get-AzureRmStorageAccount, Get-AzureRm…
Script 4.0.4 AzureRM.StreamAnalytics Desk {Get-AzureRmStreamAnalyticsFunction, Ge…
Script 4.0.1 AzureRM.Tags Desk {Remove-AzureRmTag, Get-AzureRmTag, New…
Script 4.0.3 AzureRM.TrafficManager Desk {Disable-AzureRmTrafficManagerEndpoint,…
Script 4.0.2 AzureRM.UsageAggregates Desk Get-UsageAggregates
Script 4.2.2 AzureRM.Websites Desk {Get-AzureRmAppServicePlan, Set-AzureRm…
Script 1.0.0.1 ConvertTo-JsonFromXml Desk ConvertTo-JsonFromXml
Script 1.0 CType Desk
Script 3.0.0 ExchangeOnlineManagement Desk {Get-ConnectionInformation, Get-EXOCasM…
Script 1.9.7 EZOut Desk {Add-FormatData, Clear-FormatData, Out-…
Script 1.4.1 IsePackV2 Desk {Select-CurrentTextAsType, Get-CurrentD…
Script 1.0.0 Mailozaurr Core,Desk {Connect-IMAP, Connect-oAuthGoogle, Con…
Script 1.27.0 Microsoft.Graph.Authentication Core,Desk {Connect-MgGraph, Disconnect-MgGraph, G…
Script 1.27.0 Microsoft.Graph.Identity.SignIns Core,Desk {Confirm-MgInformationProtectionSignatu…
Script 1.0.1 Microsoft.PowerShell.Operation.Val… Desk {Get-OperationValidation, Invoke-Operat…
Binary 1.0.3414.0 Microsoft.RDInfra.RDPowershell Desk {Get-RdsContext, Set-RdsContext, Add-Rd…
Binary 1.0.0.1 PackageManagement Desk {Find-Package, Get-Package, Get-Package…
Script 3.4.0 Pester Desk {Describe, Context, It, Should…}
Script 1.9.9.4 Pipeworks Desk {Resolve-Location, Get-Person, Search-E…
Manifest 1.10.0 PnP.PowerShell Core,Desk {Add-PnPAdaptiveScopeProperty, Add-PnPP…
Manifest 3.0.8 Posh-SSH Desk {Get-SCPItem, Get-SFTPItem, New-SFTPSes…
Script 1.0.0.1 PowerShellGet Desk {Install-Module, Find-Module, Save-Modu…
Script 2023.1.0 PowerShellProTools Desk {Merge-Script, Install-PoshProToolsLice…
Script 2.0.0 PSReadLine Desk {Get-PSReadLineKeyHandler, Set-PSReadLi…
Script 0.3.7 RoughDraft Desk {Send-Media, Get-FFProbe, Receive-Media…
Script 1.6.1 ScriptCop Desk {Unregister-ScriptCopPatrol, Enable-Com…
Script 1.5 ShowUI Desk {Move-Control, Set-UIStyle, Set-Depende…
Binary 1.11.0 UniversalPrintManagement Desk {Get-UPPrinter, Get-UPPrinterShare, Rem…

Directory: C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules

ModuleType Version PreRelease Name PSEdition ExportedCommands


Manifest 1.0.1.0 ActiveDirectory Core,Desk {Add-ADCentralAccessPolicyMember, Add-A…
Manifest 1.0.0.0 AppBackgroundTask Core,Desk {Disable-AppBackgroundTaskDiagnosticLog…
Script 1.0.0.0 AssignedAccess Core,Desk {Clear-AssignedAccess, Get-AssignedAcce…
Manifest 1.0.0.0 BitLocker Core,Desk {Unlock-BitLocker, Suspend-BitLocker, R…
Script 2.0.0.0 BitsTransfer Core,Desk {Add-BitsFile, Complete-BitsTransfer, G…
Manifest 1.0.0.0 BranchCache Core,Desk {Add-BCDataCacheExtension, Clear-BCCach…
Manifest 1.0 ConfigDefenderPerformance Core,Desk {New-MpPerformanceRecording, Get-MpPerf…
Manifest 1.0 DefenderPerformance Core,Desk {New-MpPerformanceRecording, Get-MpPerf…
Manifest 1.0.3.0 DeliveryOptimization Core,Desk {Get-DeliveryOptimizationLog, Get-Deliv…
Manifest 1.0 DFSN Core,Desk {Get-DfsnRoot, Remove-DfsnRoot, Set-Dfs…
Manifest 1.0.0.0 DirectAccessClientComponents Core,Desk {Disable-DAManualEntryPointSelection, E…
Script 3.0 Dism Core,Desk {Add-AppProvisionedSharedPackageContain…
Manifest 1.0.0.0 DnsClient Core,Desk {Resolve-DnsName, Clear-DnsClientCache,…
Manifest 1.0.0.0 EventTracingManagement Core,Desk {Start-EtwTraceSession, New-EtwTraceSes…
Script 2022.3.14… Get-NetView Core,Desk Get-NetView
Manifest 1.0.0.0 HgsClient Core,Desk {Get-HgsAttestationBaselinePolicy, Get-…
Manifest 1.0.0.0 HgsDiagnostics Core,Desk {New-HgsTraceTarget, Get-HgsTrace, Get-…
Manifest 2.0.0.0 Hyper-V Core,Desk {Add-VMAssignableDevice, Add-VMDvdDrive…
Manifest 1.1 Hyper-V Core,Desk {Add-VMDvdDrive, Add-VMFibreChannelHba,…
Script 1.1.0.0 IISAdministration Core,Desk
Manifest 2.1.0.0 International Core,Desk {Copy-UserInternationalSettingsToSystem…
Manifest 1.0.0.0 Kds Core,Desk {Add-KdsRootKey, Get-KdsRootKey, Test-K…
Manifest 1.0 LanguagePackManagement Core,Desk {Install-Language, Uninstall-Language, …
Script 1.0.0.0 LAPS Core,Desk {Find-LapsADExtendedRights, Get-LapsADP…
Manifest 1.0.0.0 Microsoft.PowerShell.LocalAccounts Core,Desk {Add-LocalGroupMember, Disable-LocalUse…
Manifest 1.0.0 Microsoft.Windows.Bcd.Cmdlets Core,Desk {Copy-BcdEntry, Disable-BcdElementBootD…
Manifest 1.0 MMAgent Core,Desk {Disable-MMAgent, Enable-MMAgent, Set-M…
Manifest 2.0.0.0 NetAdapter Core,Desk {Disable-NetAdapter, Disable-NetAdapter…
Manifest 2.0.0.0 NetConnection Core,Desk {Get-NetConnectionProfile, Set-NetConne…
Manifest 1.0.0.0 NetEventPacketCapture Core,Desk {New-NetEventSession, Remove-NetEventSe…
Manifest 2.0.0.0 NetLbfo Core,Desk {Add-NetLbfoTeamMember, Add-NetLbfoTeam…
Manifest 1.0.0.0 NetNat Core,Desk {Get-NetNat, Get-NetNatExternalAddress,…
Manifest 2.0.0.0 NetQos Core,Desk {Get-NetQosPolicy, Set-NetQosPolicy, Re…
Manifest 2.0.0.0 NetSecurity Core,Desk {Get-DAPolicyChange, New-NetIPsecAuthPr…
Manifest 1.0.0.0 NetSwitchTeam Core,Desk {New-NetSwitchTeam, Remove-NetSwitchTea…
Manifest 1.0.0.0 NetTCPIP Core,Desk {Get-NetIPAddress, Get-NetIPInterface, …
Manifest 1.0.0.0 NetworkConnectivityStatus Core,Desk {Get-DAConnectionStatus, Get-NCSIPolicy…
Manifest 1.0.0.0 NetworkSwitchManager Core,Desk {Disable-NetworkSwitchEthernetPort, Ena…
Manifest 1.0.0.0 NetworkTransition Core,Desk {Add-NetIPHttpsCertBinding, Disable-Net…
Manifest 1.0 NFS Core,Desk {Get-NfsMappedIdentity, Get-NfsNetgroup…
Manifest 1.0.0.0 PcsvDevice Core,Desk {Get-PcsvDevice, Start-PcsvDevice, Stop…
Manifest 1.0.0.0 PKI Core,Desk {Add-CertificateEnrollmentPolicyServer,…
Manifest 1.0.0.0 PnpDevice Core,Desk {Get-PnpDevice, Get-PnpDeviceProperty, …
Manifest 1.1 PrintManagement Core,Desk {Add-Printer, Add-PrinterDriver, Add-Pr…
Binary 1.0.12 ProcessMitigations Core,Desk {Get-ProcessMitigation, Set-ProcessMiti…
Script 3.0 Provisioning Core,Desk {Install-ProvisioningPackage, Export-Pr…
Manifest 1.0.0.0 ScheduledTasks Core,Desk {Get-ScheduledTask, Set-ScheduledTask, …
Manifest 2.0.0.0 SecureBoot Core,Desk {Confirm-SecureBootUEFI, Set-SecureBoot…
Manifest 2.0.0.0 SmbShare Core,Desk {Get-SmbShare, Remove-SmbShare, Set-Smb…
Manifest 2.0.0.0 SmbWitness Core,Desk {Get-SmbWitnessClient, Move-SmbWitnessC…
Manifest 1.0.0.1 StartLayout Core,Desk {Export-StartLayout, Import-StartLayout…
Manifest 2.0.0.0 Storage Core,Desk {Add-InitiatorIdToMaskingSet, Add-Parti…
Manifest 2.0.0.0 TLS Core,Desk {New-TlsSessionTicketKey, Enable-TlsSes…
Manifest 1.0.0.0 TroubleshootingPack Core,Desk {Get-TroubleshootingPack, Invoke-Troubl…
Manifest 2.0.0.0 TrustedPlatformModule Core,Desk {Get-Tpm, Initialize-Tpm, Clear-Tpm, Un…
Binary 2.1.639.0 UEV Core,Desk
Manifest 2.0.0.0 VpnClient Core,Desk {Add-VpnConnection, Set-VpnConnection, …
Manifest 1.0.0.0 Wdac Core,Desk {Get-OdbcDriver, Set-OdbcDriver, Get-Od…
Manifest 2.0.0.0 Whea Core,Desk {Get-WheaMemoryPolicy, Set-WheaMemoryPo…
Manifest 1.0.0.0 WindowsDeveloperLicense Core,Desk {Get-WindowsDeveloperLicense, Unregiste…
Script 1.0 WindowsErrorReporting Core,Desk {Enable-WindowsErrorReporting, Disable-…
Manifest 1.0.0.0 WindowsSearch Core,Desk {Get-WindowsSearchSetting, Set-WindowsS…
Manifest 1.0.0.0 WindowsUpdate Core,Desk Get-WindowsUpdateLog

Directory: C:\Program Files (x86)\Windows Kits\10\Microsoft Application Virtualization\Sequencer

ModuleType Version PreRelease Name PSEdition ExportedCommands


Manifest 0.0 AppvPkgConverter Desk
Manifest 1.0.0.0 AppvSequencer Desk

Directory: C:\Program Files (x86)\Windows Kits\10\Microsoft Application Virtualization

ModuleType Version PreRelease Name PSEdition ExportedCommands


Manifest 1.0.0.0 AutoSequencer Desk {Connect-AppVSequencerVM, handleDismErr…
Binary 0.0.0.0 Sequencer Desk

Environment Data
PS C:\Users\ChrisO'Donoghue> $PSVersionTable

Name Value


PSVersion 7.3.8
PSEdition Core
GitCommitId 7.3.8
OS Microsoft Windows 10.0.22621
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

@peombwa
Copy link
Member

peombwa commented Oct 24, 2023

The issue appears to be duplicate of #879.

Does the issue occur when you explicitly import the latest version of v2: Import-Module Microsoft.Graph.Authentication -RequiredVersion 2.8.0? Alternatively, you can uninstall all v1.x modules from your PC and restart your PowerShell session. PowerShell can at times load the wrong version if you haven't closed your PowerShell after an install.

@ChrisOD-AD
Copy link
Author

Yes: It still fails:
PS C:\Users\ChrisO'Donoghue> Import-Module Microsoft.Graph.Authentication -RequiredVersion 2.8.0
$ParseException/ at System.Management.Automation.ScriptBlock.Create(Parser parser, String fileName, String fileContents)
at System.Management.Automation.ScriptBlock.Create(ExecutionContext context, String script)
at System.Management.Automation.CommandInvocationIntrinsics.InvokeScript(String script, Boolean useNewScope, PipelineResultTypes writeToPipeline, IList input, Object[] args)
at System.Management.Automation.CommandInvocationIntrinsics.InvokeScript(String script)
at Microsoft.Graph.PowerShell.PSCmdletExtensions.RunScript[T](CommandInvocationIntrinsics cii, String script)
at Microsoft.Graph.PowerShell.PSCmdletExtensions.RunScript[T](PSCmdlet cmdlet, String script)
at Microsoft.Graph.PowerShell.Authentication.Utilities.Runtime.Cmdlets.GetScriptCmdlet.GetScriptCmdlets(String scriptFolder)
at Microsoft.Graph.PowerShell.Authentication.Utilities.Runtime.Cmdlets.GetScriptCmdlet.ProcessRecord()
Get-ScriptCmdlet: C:\Users\ChrisO'Donoghue\Documents\PowerShell\Modules\Microsoft.Graph.Authentication\2.8.0\StartupScripts\ExportCustomCommands.ps1:11
Line |
11 | … r -Function (Get-ScriptCmdlet -ScriptFolder $CustomScriptPath) -Alias …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| The string is missing the terminator: '.
$IncompleteParseException/ at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection1 input, PSDataCollection1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection1 input, PSDataCollection1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.InvokeT
at Microsoft.Graph.PowerShell.PSCmdletExtensions.RunScript[T](String script)
at Microsoft.Graph.PowerShell.Authentication.Utilities.Runtime.Cmdlets.GetModuleCmdlet.GetModuleCmdlets(String modulePath)
at Microsoft.Graph.PowerShell.Authentication.Utilities.Runtime.Cmdlets.GetModuleCmdlet.ProcessRecord()
Get-ModuleCmdlet: The string is missing the terminator: '.

Since I've never installed any Graph modules before I suspect it's not a version issue. Also when I use a new PC and join it to my Azure domain, now I've changed my name to Chris ODonoghue in Azure. It works.

@ChrisOD-AD
Copy link
Author

I got rid of the first error with this hackey hack.
edited ExportCustomCommands.ps1

Export custom script cmdlets.

$CustomScriptPath = Join-Path $PSScriptRoot "../custom"
$CustomScriptPath = $CustomScriptPath.Replace("'","%'")
$CustomScriptPath = $CustomScriptPath.Replace("%",'`')

But The second error $IncompleteParseException remains :(

@peombwa
Copy link
Member

peombwa commented Oct 25, 2023

Thanks for confirming.

I'm to repro the issue on my end per the provided repro steps. We will use this issue to track and fix the bug. As a workaround, you can install the module system-wide via:

Install-Module Microsoft.Graph -Scope AllUsers

This will install the module in $env:ProgramFiles\PowerShell\7\Modules (PowerShell 7)
or $env:ProgramFiles\WindowsPowerShell\Modules (PowerShell 5.1). You should first uninstall the existing modules by following the instructions at https://learn.microsoft.com/powershell/microsoftgraph/installation?view=graph-powershell-1.0#uninstalling-the-sdk for a smooth install.

@ChrisOD-AD
Copy link
Author

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants