Rename C:\Windows\System32\GroupPolicy\Machine\registry.pol registry_BAK.pol
gpupdate /force
%Windir%\Sysmon.exe -u
%Windir%\Sysmonbackup.exe -u
%Windir%\CcmTemp\Sysmonbackup.exe -u
Del %Windir%\Sysmon.exe -u
Del %Windir%\Sysmonbackup.exe -u
Del %Windir%\CcmTemp\Sysmonbackup.exe -u
pause
@echo off
taskkill /f /im explorer.exe
timeout /t 2 /nobreak >nul
if not exist "%UserProfile%\Desktop" mkdir "%UserProfile%\Desktop"
xcopy "%UserProfile%\OneDrive - Company Name, Inc\Desktop" "%UserProfile%\Desktop" /E /H /C /I
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Desktop" /t REG_SZ /d "C:\Users\%USERNAME%\Desktop" /f
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Desktop" /t REG_EXPAND_SZ /d %%USERPROFILE%%"\Desktop" /f
attrib +r -s -h "%USERPROFILE%\Desktop" /S /D
timeout /t 1 /nobreak >nul
if not exist "%UserProfile%\Documents" mkdir "%UserProfile%\Documents"
xcopy "%UserProfile%\OneDrive - Company Name, Inc\Documents" "%UserProfile%\Documents" /E /H /C /I
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Personal" /t REG_SZ /d "C:\Users\%USERNAME%\Documents" /f
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "{f42ee2d3-909f-4907-8871-4c22fc0bf756}" /t REG_EXPAND_SZ /d %%USERPROFILE%%"\Documents" /f
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Personal" /t REG_EXPAND_SZ /d %%USERPROFILE%%"\Documents" /f
attrib +r -s -h "%USERPROFILE%\Documents" /S /D
timeout /t 1 /nobreak >nul
if not exist "%UserProfile%\Pictures" mkdir "%UserProfile%\Pictures"
xcopy "%UserProfile%\OneDrive - Company Name, Inc\Pictures" "%UserProfile%\Pictures" /E /H /C /I
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "My Pictures" /t REG_SZ /d "C:\Users\%USERNAME%\Pictures" /f
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "{0DDD015D-B06C-45D5-8C4C-F59713854639}" /t REG_EXPAND_SZ /d %%USERPROFILE%%"\Pictures" /f
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "My Pictures" /t REG_EXPAND_SZ /d %%USERPROFILE%%"\Pictures" /f
attrib +r -s -h "%USERPROFILE%\Pictures" /S /D
timeout /t 1 /nobreak>null
start explorer.exe
Net User Administrator NewLocalPasswordExample12345!!!
C:\Windows\ccmsetup\ccmsetup.exe /uninstall
:: Automated Backup Script: This script creates a dated backup of an important directory. It uses the xcopy command to copy files from a source directory to a destination directory, creating a new folder with the current date.
@echo off
set source=C:\ImportantData
set destination=D:\Backups
set backupName=Backup_%date:~-4,4%%date:~-10,2%%date:~-7,2%
echo Creating backup of %source% to %destination%\%backupName%
xcopy "%source%" "%destination%\%backupName%" /E /I /H /K /Y
echo Backup complete!
:: Network Drive Mapping: This script maps network drives, making it easier for users to access shared resources. It uses the net use command to map two network drives (Z: and Y:) to specific network shares.
@echo off
net use Z: \\server\share /persistent:yes
net use Y: \\server\applications /persistent:yes
echo Network drives mapped successfully.
:: System Information Gatherer: This script collects detailed system information and saves it to a text file. It uses various commands like systeminfo, wmic, and ipconfig to gather information about the system, installed programs, and network configuration.
@echo off
set output=C:\SystemInfo_%computername%.txt
echo System Information for %computername% > %output%
echo ======================================== >> %output%
systeminfo >> %output%
echo. >> %output%
echo Installed Programs: >> %output%
wmic product get name,version >> %output%
echo. >> %output%
echo Network Configuration: >> %output%
ipconfig /all >> %output%
echo System information gathered in %output%
:: Disk Cleanup: This script performs various disk cleanup operations to free up space on the system. It runs the built-in Disk Cleanup utility, empties the Recycle Bin, and clears temporary files from both the user's temp folder and the Windows temp folder.
@echo off
echo Running Disk Cleanup...
cleanmgr /sagerun:1 /verylowdisk
echo Emptying Recycle Bin...
rd /s /q C:\$Recycle.Bin
echo Clearing temporary files...
del /q /f /s %temp%\*
del /q /f /s C:\Windows\Temp\*
echo Disk cleanup complete!
:: Software Update Checker: This script initiates checks for Windows updates and Microsoft Office updates. It uses the wuauclt command to check for Windows updates and runs the Office Click-to-Run client to check for Office updates.
@echo off
echo Checking for Windows updates...
wuauclt /detectnow
echo Updating Microsoft Office...
"C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeC2RClient.exe" /update user
echo Software update check complete.