How can I Uninstall MS SARA for Enterprise via PowerShell?

Joshua Larson 20 Reputation points
2024-10-18T19:28:45.5266667+00:00

Hello,

I am looking for a way to uninstall MS SARA for Enterprise via PowerShell. I have looked at the SARA for Enterprise documentation, and it does not give any guidance on this matter.

Note: I am an IT Technician trying to automate our PC build procedure. Part of the workflow is to uninstall all versions of office via SARA, then uninstall SARA, and install a configured version of MS Office. I have successfully written a PowerShell script which can install Enterprise SARA and uninstall Office. This script is almost entirely from the documentation I mentioned. However, I would like for the same script/sequence of scripts to also:

Reboot the PC,

Reinstall our configured MS Office (I could not figure out how to include a .xml config file, so help on this would also be appreciated.),

And for it to clean up after itself by uninstalling SARA before quitting and rebooting again.

All answers and suggestions are appreciated!

Environment:

OS: Windows 11

PowerShell Version: 5.1.22621.4111

Thanks in advance,

-Josh

Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

Accepted answer
  1. DavidChristiansson 155 Reputation points
    2024-11-02T18:05:14.6566667+00:00

    I'm REALLY sorry for replying with an image but I cannot seem to paste ANY code into this window and still be allowed to post the reply. Anyway, attached is an image of the function that would uninstall the application for you:
    User's image

    I borrowed inspiration from THIS guy, so you can always copy his code.

    BR

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.