Connecting Security & Compliance PowerShell

SauPom 156 Reputation points
2024-10-02T12:04:58.1866667+00:00

I get this error msg, when trying to connect Security & Compliance PowerShell

Could not find a part of the path 'C:\Users\username\AppData\Local\Temp\tmpEXO_5ewf3wn0.oir\exchange.format.ps1xml'.

At C:\Program

Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\3.6.0\netFramework\ExchangeOnlineManagement.psm1:762 char:21

  •                 throw $_.Exception.InnerException;
    
  •                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : OperationStopped: (:) [], DirectoryNotFoundException
    • FullyQualifiedErrorId : Could not find a part of the path 'C:\Users\username\AppData\Local\Temp\tmpEXO_5ewf3w
    n0.oir\exchange.format.ps1xml'.

I have this version of module

Name : ExchangeOnlineManagement

Version : 3.6.0

InstalledLocation : C:\Program Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\3.6.0

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,579 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 46,806 Reputation points
    2024-10-02T15:35:24.23+00:00

    Had you removed anything in that temp folder earlier in the same PowerShell session?

    If so, exit the PowerShell session and try again with a new session.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.