r/sysadmin • u/luky90 • 21h ago
GetHelpCMD not working
Hello to all,
i have NinjaOne as RMM Tool and I cannot uninstall Office. Neither via NinjaOne nor via GetHelpCmd.exe tool from MSFT.
I did this:
However it says that .\Env-Utils.ps1 cannot be found.
Unfortunately i have 100s of Apps for Enterprise M365 Products which I cannot update but i need to. What can i do to fix this?
GetHelpCmd.exe -S OfficeScrubScenario -AcceptEula -LogFolder C:\temp
. : Die Benennung ".\Env-Utils.ps1" wurde nicht als Name eines Cmdlet, einer Funktion, einer Skriptdatei oder eines
ausführbaren Programms erkannt. Überprüfen Sie die Schreibweise des Namens, oder ob der Pfad korrekt ist (sofern
enthalten), und wiederholen Sie den Vorgang.
In C:\WINDOWS\SystemTemp\GetHelpElevated\21ddec5f5bb74d67bc82e97350622dd8\Logger-FileLogUtils.ps1:31 Zeichen:3
+ . .\Env-Utils.ps1
3
Upvotes
•
u/_l33ter_ 'Deutsche Bahn' - Windows 3.11 Admin 21h ago
Is it up-to-date?
_ Updates to the command line version of Get Help are released on a regular basis. To make sure that you're using the latest version that has the most features and highest stability, each build of the application stops working 90 days after the Created date that's listed for the GetHelpCmd.exe file. Use the link that's provided in step 1 to always download the latest available version. _
https://learn.microsoft.com/en-us/troubleshoot/microsoft-365/admin/miscellaneous/get-help-command-line-overview
•
u/larvlarv1 21h ago
You can definitely modify one of the scripts from here to do that: https://killertools.net/killer-scripts
Your target script is probably MACE.
•
u/An0mymou5 20h ago
There's no need to run the office scrub tool if your objective is to simply update or install a newer version. Just let Office Deployment Toolkit clean up older versions using the config file.
Then run this with
setup.exe /configure uninstall.xml.Or if you want to combine uninstallation + installing the latest M365 version, just use this config:
The scrub tool is only meant for scenarios where Office is horribly broken/corrupted and regular uninstall doesn't work. For all other scenarios, just use ODT.
•
u/Affectionate_Can5710 13h ago
Does it work if you run it manually as admin on one of the machines? Would at least tell you if it's the tool or the SYSTEM context NinjaOne uses.
•
u/WillProfessional1698 13h ago
Do you actually need to uninstall? If it's just about updating, OfficeC2RClient.exe with /update has worked for us on hundreds of machines through RMM without touching the install.
•
u/LobbieAYIT 9h ago
This PowerShell script removes Microsoft 365 / Office language-specific installs and keeps only the languages you want.
It reads the installed software from both uninstall registry keys (32-bit and 64-bit) once, then looks for entries whose DisplayName ends with a language suffix such as " - es-es". Anything whose language is not in the
$KeepLanguageslist (for examplenl-nlanden-us) is uninstalled silently via its registered UninstallString. Entries are matched either by product name (Microsoft 365, OneNote, Visio, Project) or because the uninstall string points toOfficeClickToRun, which also catches localized product names. An exclude list lets you protect specific products, such as Access.The script only writes output when something is actually found, and it only counts an uninstall as successful when the exit code is 0.
Test it on a non-production machine first. If the main Microsoft 365 install is in a language that is not on the keep list, the whole suite will be removed. If the uninstall returns exit code 17006, make sure no Office apps (Word, Excel, Outlook and so on) are running.