- 1 year ago
Run Cleanmgr on remote PC as System user
To run the Disk Cleanup utility (cleanmgr.exe
) on a remote PC as the System user, you can use the PsExec tool provided by Microsoft. PsExec allows you to execute commands on a remote system with specified credentials, including the System account. Here's how you can do it:
Download PsExec: Visit the official Microsoft website and download PsExec (https://docs.microsoft.com/en-us/sysinternals/downloads/psexec).
Open a command prompt: Open a command prompt window on your local machine.
Navigate to the PsExec directory: Use the
cd
command to navigate to the directory where you extracted the PsExec utility.Run Disk Cleanup remotely: Execute the following command to run Disk Cleanup on the remote PC as the System user:
shellpsexec \\RemoteComputerName -s cleanmgr.exe
Replace
RemoteComputerName
with the name or IP address of the remote PC where you want to run Disk Cleanup.PsExec will establish a connection to the remote PC and execute the
cleanmgr.exe
command under the System user context.
Please note that you may need administrative privileges on the remote PC and the appropriate network access to run commands remotely. Also, ensure that you use PsExec in compliance with your organization's policies and guidelines.