Whencreated date is incorrect

Richard Howse 6 Reputation points
2021-03-29T14:46:09.017+00:00

Hello,

I'm building a script that lists all office365 groups with their attributes so we can remove the unused ones. When i get the date of creation, whencreated gives me a completely incorrect date. I get the same result with get-group and get-unifiedgroup. Am i doing something wrong, or is this a bug i should submit?

Thank you

82409-powershell1.png
82455-powershell2jpg.jpg

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,381 questions
0 comments No comments
{count} vote

8 answers

Sort by: Most helpful
  1. Rich Matheisen 45,091 Reputation points
    2021-03-29T19:09:06.16+00:00

    Are you running that PowerShell Get-Group from a machine in an on-premises Active Directory network? If you are, the information should be from your local AD, not the group in M365.

    0 comments No comments

  2. Richard Howse 6 Reputation points
    2021-03-29T20:00:55.337+00:00

    Yes the server is part on a on premise AD. I tried running the command from a computer not part of the AD, and i'm getting the same result.

    0 comments No comments

  3. Rich Matheisen 45,091 Reputation points
    2021-03-29T20:08:39.393+00:00

    Use the Exchange Online PowerShell V2 module to connect to Exchange Online PowerShell. Then use Get-UnifiedGroup, or Get-Group, as appropriate.

    0 comments No comments

  4. Richard Howse 6 Reputation points
    2021-03-30T13:35:22.673+00:00

    I tried the Exchange Online PowerShell V2 with Connect-ExchangeOnline rather than Connect-EXOPSSession i was using. Same result.


  5. Richard Howse 6 Reputation points
    2021-03-30T15:08:56.733+00:00

    yes i tried:

    $sfbSession = New-CsOnlineSession
    Import-PSSession $sfbSession

    Same result.