Forum Discussion

Zach Hill's avatar
Zach Hill
Copper Contributor
Jun 16, 2017

PowerShell 2 - Need commandlet Search-UnifiedAuditLog

Disclaimer - Limited Powershell experience and new to the community

 

We've developed a script that runs on our local machines that pull O365 audit logs using the commandlet Search-UnifiedAuditLog 

Our local machines have:

Windows 10 64 bit with Powershell 5 and .NET Framework 4.6

 

We now need to get the script to run on an older production server.

The server is running Windows 7 SP1 64 bit with Powershell 2 and .NET Framework 4.5.2

 

I need to provide precise instructions on what steps need to be taken in order to make this possible since this commandlet Search-UnifiedAuditLog is not currently available on the server.  

Unfortunately the documentation I can find on this commandlet does not tell me exactly what I would need to do to make this happen.  Is it as simple as upgrading to a newer version of Powershell?  Is there a specific module I can add that would work in PS 2?  

https://technet.microsoft.com/en-us/library/mt238501(v=exchg.160).aspx

 

I'm researching but any advice / suggestions are welcome

 

    • Zach Hill's avatar
      Zach Hill
      Copper Contributor

      Thanks for the information.  What I was failing to realize is that it was actually doing a Remote PowerShell connection.  Based on the requriements we should only need to upgrade to minimum version of PowerShell 3

      • Martin Wiedmeyer's avatar
        Martin Wiedmeyer
        Copper Contributor

        First comment: PLEASE do not run a desktop OS (Win 7) on a Server!

         

        Install Posh 4.0 (WMF 4.0 and .Net 4.5 or higher)

        Posh 4.0 is a prereq for 5.0.

        Then upgrade to Posh 5.0, you will not regret it.

         

        Regards,

        Marty Wiedmeyer

Resources