Collecting Outlook Version Information Programmatically Using PowerShell and Gathering User Data from Intune or SCCM

Swahela Mulla 95 Reputation points
2023-10-05T06:22:20.79+00:00

Hello Microsoft Forum Community,

 

I hope you're all doing well. I have a couple of questions regarding Outlook and PowerShell, and I was hoping someone could provide some guidance.

Question 1: Collecting Outlook Version Information Programmatically Using PowerShell

Recently, Microsoft introduced a feature in the Outlook app called "New Outlook." Enabling this feature unlocks access to new Outlook functionalities. I am interested in finding a way to determine which version of Outlook (new or old) is installed on a user's machine using PowerShell. Specifically, I would like to collect this information from the Windows Registry.

I am new to working with the Windows Registry, and I am seeking assistance in creating a PowerShell script or commands that can help me gather this Outlook version information from the Registry. If anyone could guide me through the process or recommend any step-by-step documentation, it would be greatly appreciated.

 

Question 2: Gathering User Information from Intune or SCCM Using PowerShell

Additionally, once I have successfully collected the Outlook version information, my next goal is to gather user data from Intune or SCCM (System Center Configuration Manager) using PowerShell. This data would include information about the users who have enabled the "New Outlook" feature.

If anyone has experience or can provide guidance on how to retrieve user data from Intune or SCCM programmatically using PowerShell, I would be grateful for any assistance or resources you can offer.

 User's image

Thank you in advance for your help. I look forward to your valuable insights and recommendations.

 

Best regards,

Swahela Mulla

Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
5,132 questions
Office
Office
A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.
1,714 questions
Outlook
Outlook
A family of Microsoft email and calendar products.
4,019 questions
Outlook Management
Outlook Management
Outlook: A family of Microsoft email and calendar products.Management: The act or process of organizing, handling, directing or controlling something.
5,283 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,597 questions
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Shabbir Salemwalla 0 Reputation points
    2024-02-09T14:34:11.2866667+00:00

    I have the same question on how to find out which users have activated New outlook within the intune tenant of the company or is there a powershell script available to run a report. Thanks

    0 comments No comments

  2. Micha Gerkema 5 Reputation points
    2024-07-29T12:00:48.4666667+00:00

    Hello Swahela,

    I am working on almost the same.
    For the activation of a plugin a script will need to check for Outlook on the system and specifically which version.

    In your case I would go with Intune Remediation Scripts, which reports no problem in the Detection-part of the solution if the new Outlook version is found.
    When not available, it will report a problem.

    If you'd like you could let the remediation part install the new version, or just use the report to see which users and computers are 'problematic'.
    This also resolves the need for your second script solution, since it is reported back to EndPoint Manager.

    For the new Outlook the command is quite simple:

    get-appxpackage | where-object Name -match "Outlook"
    This will return the new Appx version of Outlook.

    It will look something like this:

    $outlookNew = $null
    Try {    
    	$outlookNew = get-appxpackage | where-object Name -match "Outlook"    
    	If ($outlookNew -ne $null){        
    		Write-Output "Compliant"        
    		Exit 0   
    		}    
    		Write-Warning "Not Compliant"    
    		Exit 1
    	} 
    
    Catch {    
    	Write-Warning "Not Compliant"    
    	Exit 1}  
    

    For the older version I am still looking for a nice way to find it.
    I will update my answer when I find more.

    EDIT:

    It seems we can check for the classic outlook client throug the registry with
    $outlookClassic = (Test-Path "HKLM:\SOFTWARE\Microsoft\Office\16.0\Outlook\InstallRoot")

    This will return $True when the path is found for the installRoot of the classic client.

    Please click Mark as Best Response & Like if my post helped you to solve your issue.
    This will help others to find the correct solution easily. It also closes the item.

    If the post was useful in other ways, please consider giving it Like.

    Kindest regards,

    Micha Gerkema

    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.