Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :: Released under the GNU General Public License version 3 by J2897.
- @echo OFF
- goto start
- REM Run this on the remote machine to enable the Remote Registry service...
- net start RemoteRegistry
- REM To see whether or not the Remote Registry service is running...
- sc query RemoteRegistry
- :start
- title PsList
- pushd "%~dp0"
- setlocal
- set "PSLIST=%USERPROFILE%\Programs\Sysinternals Suite\pslist.exe"
- call :credentials.bat
- cmdkey /add:"%COMPUTER%" /user:"%COMPUTER%\%NAME%" /pass:"%PASSWORD%" >nul
- echo Press ESC to exit...
- timeout /t 3 >nul
- "%PSLIST%" -s "\\%COMPUTER%"
- cmdkey /delete:"%COMPUTER%"
- cmdkey /list
- endlocal
- popd
- echo.
- pause
- exit /b 0
- REM You can delete these and put them in a separate file called "credentials.bat".
- REM You can then use that same file for other PS Tools too.
- REM Just remember to delete the colon (:) from line 18.
- :credentials.bat
- REM Set the remote computer credentials...
- set "COMPUTER=7x64-VM1"
- set "NAME=J2897"
- set "PASSWORD=abc123"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement