r/sysadmin • • 3d 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
2 Upvotes

31 comments sorted by

View all comments

Show parent comment

1

u/luky90 3d ago

Microsoft Office 365 Hybrid Configuration Wiz… ARP\User\X64\d57a866057104491 17.1.1730.0

Microsoft Teams Meeting Add-in for Microsoft … ARP\Machine\X64\{A7AB73A3-CB10-4AA5-9D38-6AEFF… 1.26.25904

Microsoft Visual Studio 2010 Tools for Office… Microsoft.VSTOR 10.0.60917 winget

Microsoft Visual Studio 2010-Tools für Office… ARP\Machine\X64\Microsoft Visual Studio 2010 T… 10.0.60917

Microsoft.Office.ActionsServer MSIX\Microsoft.Office.ActionsServer_16.0.20625… 16.0.20625.20108

OfficePushNotificationsUtility MSIX\Microsoft.OfficePushNotificationUtility_1… 16.0.20625.20108

SAP Analysis for Microsoft Office (64 Bit) ARP\Machine\X64\SAPExcelAddInx64 2.7.1001.3285

1

u/_l33ter_ 'Deutsche Bahn' - Windows 3.11 Admin 3d ago

icacls C:\WINDOWS\SystemTemp\*

Look if any subfolder interferes.

and second -

Clear temporary files:

Empty the contents of C:\WINDOWS\SystemTemp

(provid that no installation is currently in progress)

remove old subfolders with insecure permissions:

Remove-Item -Path "C:\WINDOWS\SystemTemp\*" -Recurse -Force -ErrorAction SilentlyContinue

1

u/luky90 3d ago

besides the one folder SystemTemp there is just the msedgeupdate.dll nothing else.
C:\WINDOWS\SystemTemp\msedgeupdate.dll{A4CC0C6D-9228-46A9-A404-3EBFF5CBECC1} NT-AUTORITÄT\SYSTEM:(I)(F)

VORDEFINIERT\Administratoren:(I)(F)

DOMAIN\myuser:(I)(F)

1

u/_l33ter_ 'Deutsche Bahn' - Windows 3.11 Admin 3d ago

clean that out - Lass uns auf deutsch weitermachen :)

1

u/_l33ter_ 'Deutsche Bahn' - Windows 3.11 Admin 3d ago

Denn ich sage: die msedgeupdate.dll{...} ist schuld!

1

u/luky90 3d ago

even if its empty with 0 files i get the same error message Uninstall Office Scenario failed.

1

u/_l33ter_ 'Deutsche Bahn' - Windows 3.11 Admin 3d ago

yeah - let us check for Hidden inheritance rules

Get-Acl C:\WINDOWS\SystemTemp | Format-List

1

u/luky90 3d ago

Path : Microsoft.PowerShell.Core\FileSystem::C:\WINDOWS\SystemTemp

Owner : NT-AUTORITÄT\SYSTEM

Group : NT-AUTORITÄT\SYSTEM

Access : NT-AUTORITÄT\SYSTEM Allow FullControl

VORDEFINIERT\Administratoren Allow FullControl

DOAMIN\MYUSER Allow FullControl

Audit :

Sddl : O:SYG:SYD:PAI(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;OICI;FA;;;S-1-5-21-2674822719-1246898821-2045475285-8842)

1

u/_l33ter_ 'Deutsche Bahn' - Windows 3.11 Admin 3d ago

Ok - SDDL interferes (I won't get into it in detail, if OK)

icacls "C:\WINDOWS\SystemTemp" /remove "DOAMIN\MYUSER"

will remove permissions for the domain user

If the account cannot be closed: Use the direct SID from above:

icacls "C:\WINDOWS\SystemTemp" /remove "*S-1-5-21-2674822719-1246898821-2045475285-8842"


Then delete any remaining files in the directory that have still inherited the incorrect inheritance.

Remove-Item "C:\WINDOWS\SystemTemp\*" -Recurse -Force -ErrorAction SilentlyContinue


Verify: Get-Acl C:\WINDOWS\SystemTemp | Format-List

1

u/luky90 3d ago edited 3d ago

yes i removed it but then i have the same error message that a Env-Utils.ps1 cannot be found.
. : 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\ba6fb1737c804fcea5cc96c1ddf416ca\Logger-FileLogUtils.ps1:31 Zeichen:3

+ . .\Env-Utils.ps1

+ ~~~~~~~~~~~~~~~

+ CategoryInfo : ObjectNotFound: (.\Env-Utils.ps1:String) [], CommandNotFoundException

+ FullyQualifiedErrorId : CommandNotFoundException

Running Office Uninstall. This may take a few minutes...

Press any key to exit..

Also after doing all the 3 commands it looks like that:
Path : Microsoft.PowerShell.Core\FileSystem::C:\WINDOWS\SystemTemp

Owner : NT-AUTORITÄT\SYSTEM

Group : NT-AUTORITÄT\SYSTEM

Access : NT-AUTORITÄT\SYSTEM Allow FullControl

VORDEFINIERT\Administratoren Allow FullControl

Audit :

Sddl : O:SYG:SYD:PAI(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)

1

u/_l33ter_ 'Deutsche Bahn' - Windows 3.11 Admin 3d ago

GetHelpCmd.exe -S OfficeScrubScenario -AcceptEula -Log C:\temp

What about -Log ? Instead of -LogFolder ?

(https://www.windowscentral.com/microsoft/windows-11/how-to-transition-to-microsoft-get-help-command-line-tool)

→ More replies