diff --git a/!RunScripts.bat b/!RunScripts.bat new file mode 100644 index 0000000..6f38ec5 --- /dev/null +++ b/!RunScripts.bat @@ -0,0 +1,148 @@ +@echo off + + +:ScriptOptions +cls +mode con: cols=100 lines=30 +title Menu Options +cls +echo. +echo 1. Clean up temp folder +echo. +echo 2. Clean up Windows Update folder +echo. +echo 3. Clear all Event Viewer logs +echo. +echo 4. DISM check health +echo. +echo 5. DISM restore health +echo. +echo 6. DISM scan health +echo. +echo 7. System files check +echo. +echo 8. Hyper-V options +echo. +echo Press Enter to exit +echo. + +set /p a= || set a=0 +IF %a%==0 goto End +IF %a%==1 goto CleanUpTempFolder +IF %a%==2 goto CleanUpWindowsUpdateFolder +IF %a%==3 goto ClearAllEventViewerLogs +IF %a%==4 goto DISMCheckHealth +IF %a%==5 goto DISMRestoreHealth +IF %a%==6 goto DISMScanHealth +IF %a%==7 goto SystemFilesCheck +IF %a%==8 goto HyperVOptions +goto ScriptOptions + +:CleanUpTempFolder +call "C:\Scripts\CleanUpTempFolder.bat" +goto ScriptOptions + +:CleanUpWindowsUpdateFolder +call "C:\Scripts\CleanUpWindowsUpdateFolder.bat" +goto ScriptOptions + +:ClearAllEventViewerLogs +call "C:\Scripts\ClearAllEventViewerLogs.bat" +goto ScriptOptions + +:DISMCheckHealth +call "C:\Scripts\DISMCheckHealth.bat" +goto ScriptOptions + +:DISMRestoreHealth +call "C:\Scripts\DISMRestoreHealth.bat" +goto ScriptOptions + +:DISMScanHealth +call "C:\Scripts\DISMScanHealth.bat" +goto ScriptOptions + +:SystemFilesCheck +call "C:\Scripts\SystemFilesCheck.bat" +goto ScriptOptions + + +:HyperVOptions +cls +mode con: cols=70 lines=40 +title Hyper-V Options +cls +echo. +echo 1. Check all VMs autostart +echo. +echo 2. Disable all VMs autostart +echo. +echo 3. Enable all VMs autostart +echo. +echo 4. List VMs = Off +echo. +echo 5. List VMs = Running +echo. +echo 6. List VMs = ShuttingDown +echo. +echo 7. List VMs = Starting +echo. +echo 8. Shut down all VMs +echo. +echo 9. Start all VMs +echo. +echo Press Enter to go back +echo. + +set /p a= || set a=0 +IF %a%==0 goto ScriptOptions +IF %a%==1 goto CheckAutoStart +IF %a%==2 goto DisableAllVMsAutoStart +IF %a%==3 goto EnableAllVMsAutoStart +IF %a%==4 goto ListAllVMsOff +IF %a%==5 goto ListAllVMsRunning +IF %a%==6 goto ListAllVMsShuttingDown +IF %a%==7 goto ListAllVMsStartingUp +IF %a%==8 goto ShutdownAllVMs +IF %a%==9 goto StartAllVMs +goto HyperVOptions + +:CheckAllVMsAutoStart +call "C:\Scripts\HyperV\CheckAllVMsAutoStart.bat" +goto HyperVOptions + +:DisableAllVMsAutoStart +call "C:\Scripts\HyperV\DisableAllVMsAutoStart.bat" +goto HyperVOptions + +:EnableAllVMsAutoStart +call "C:\Scripts\HyperV\EnableAllVMsAutoStart.bat" +goto HyperVOptions + +:ListAllVMsOff +call "C:\Scripts\HyperV\ListAllVMsOff.bat" +goto HyperVOptions + +:ListAllVMsRunning +call "C:\Scripts\HyperV\ListAllVMsRunning.bat" +goto HyperVOptions + +:ListAllVMsShuttingDown +call "C:\Scripts\HyperV\ListAllVMsShuttingDown.bat" +goto HyperVOptions + +:ListAllVMsStartingUp +call "C:\Scripts\HyperV\ListAllVMsStartingUp.bat" +goto HyperVOptions + +:ShutdownAllVMs +call "C:\Scripts\HyperV\ShutdownAllVMs.bat" +goto HyperVOptions + +:StartAllVMs +call "C:\Scripts\HyperV\StartUpAllVMs.bat" +goto HyperVOptions + + +:End +exit \ No newline at end of file diff --git a/AddWindowsSecurityApp.ps1 b/AddWindowsSecurityApp.ps1 new file mode 100644 index 0000000..d2e412c --- /dev/null +++ b/AddWindowsSecurityApp.ps1 @@ -0,0 +1 @@ +Add-AppxPackage -Register -DisableDevelopmentMode "C:\Windows\SystemApps\Microsoft.Windows.SecHealthUI_cw5n1h2txyewy\AppXManifest.xml" \ No newline at end of file diff --git a/AutomaticallyInstallDefenderUpdates.bat b/AutomaticallyInstallDefenderUpdates.bat new file mode 100644 index 0000000..ca73ef8 --- /dev/null +++ b/AutomaticallyInstallDefenderUpdates.bat @@ -0,0 +1,3 @@ +"%ProgramFiles%\Windows Defender\MpCmdRun.exe" -removedefinitions -dynamicsignatures +"%ProgramFiles%\Windows Defender\MpCmdRun.exe" -SignatureUpdate +exit diff --git a/AutomaticallyInstallDefenderUpdates/AutomaticallyInstallDefenderUpdates.bat b/AutomaticallyInstallDefenderUpdates/AutomaticallyInstallDefenderUpdates.bat new file mode 100644 index 0000000..ca73ef8 --- /dev/null +++ b/AutomaticallyInstallDefenderUpdates/AutomaticallyInstallDefenderUpdates.bat @@ -0,0 +1,3 @@ +"%ProgramFiles%\Windows Defender\MpCmdRun.exe" -removedefinitions -dynamicsignatures +"%ProgramFiles%\Windows Defender\MpCmdRun.exe" -SignatureUpdate +exit diff --git a/AutomaticallyInstallDefenderUpdates/CopyScriptAndCreateScheduledTask.bat b/AutomaticallyInstallDefenderUpdates/CopyScriptAndCreateScheduledTask.bat new file mode 100644 index 0000000..24a44be --- /dev/null +++ b/AutomaticallyInstallDefenderUpdates/CopyScriptAndCreateScheduledTask.bat @@ -0,0 +1,6 @@ +pushd %~dp0 +if not exist "C:\Scripts" mkdir "C:\Scripts" +copy /y "\\WINSRVR2019-01\PackageShare\Installers\AutomaticallyInstallDefenderUpdates\AutomaticallyInstallDefenderUpdates.bat" "C:\Scripts" +schtasks /ru "SYSTEM" /create /sc hourly /mo 1 /st 23:00 /tn "Install Windows Defender Updates" /tr C:\Scripts\AutomaticallyInstallDefenderUpdates.bat /f +popd +exit 0 diff --git a/AutomaticallyInstallDefenderUpdates/InstallAutomaticallyInstallDefenderUpdatesScripts.bat b/AutomaticallyInstallDefenderUpdates/InstallAutomaticallyInstallDefenderUpdatesScripts.bat new file mode 100644 index 0000000..eca4d64 --- /dev/null +++ b/AutomaticallyInstallDefenderUpdates/InstallAutomaticallyInstallDefenderUpdatesScripts.bat @@ -0,0 +1,6 @@ +pushd %~dp0 +if not exist "C:\Scripts" mkdir "C:\Scripts" +copy /y AutomaticallyInstallDefenderUpdates.bat "C:\Scripts" +schtasks /ru "SYSTEM" /create /sc hourly /mo 1 /st 23:00 /tn "Install Windows Defender Updates" /tr C:\Scripts\AutomaticallyInstallDefenderUpdates.bat /f +popd +pause diff --git a/BlockAllProgramsInThisFolder.bat b/BlockAllProgramsInThisFolder.bat new file mode 100644 index 0000000..a5da27f --- /dev/null +++ b/BlockAllProgramsInThisFolder.bat @@ -0,0 +1,8 @@ +@ setlocal enableextensions +@ cd /d "%~dp0" + +for /R %%a in (*.exe) do ( + +netsh advfirewall firewall add rule name="Batch File Blocked %%a" dir=out program="%%a" action=block + +) diff --git a/ChangeShortcutPath.ps1 b/ChangeShortcutPath.ps1 new file mode 100644 index 0000000..4797971 --- /dev/null +++ b/ChangeShortcutPath.ps1 @@ -0,0 +1,34 @@ +$oldPrefix = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" +$newPrefix = "C:\Program Files\Google\Chrome\Application\chrome.exe" + +$searchPath = "D:\OneDrive\Twitch" + +$dryRun = $FALSE + +$shell = new-object -com wscript.shell + +if ( $dryRun ) { + write-host "Executing dry run" -foregroundcolor green -backgroundcolor black +} else { + write-host "Executing real run" -foregroundcolor red -backgroundcolor black +} + +dir $searchPath -filter *.lnk -recurse | foreach { + $lnk = $shell.createShortcut( $_.fullname ) + $oldPath= $lnk.targetPath + + $lnkRegex = "^" + [regex]::escape( $oldPrefix ) + + if ( $oldPath -match $lnkRegex ) { + $newPath = $oldPath -replace $lnkRegex, $newPrefix + + write-host "Found: " + $_.fullname -foregroundcolor yellow -backgroundcolor black + write-host " Replace: " + $oldPath + write-host " With: " + $newPath + + if ( !$dryRun ) { + $lnk.targetPath = $newPath + $lnk.Save() + } + } +} \ No newline at end of file diff --git a/ChangeShortcutPath.vbs b/ChangeShortcutPath.vbs new file mode 100644 index 0000000..1ed3191 --- /dev/null +++ b/ChangeShortcutPath.vbs @@ -0,0 +1,455 @@ +'~~Author~~. Rob Dunn +' +'~~Blatently borrowed a little bit of code from~~. Jim de Graff +' +'~~Script_Type~~. vbscript +' +'~~Sub_Type~~. SystemAdministration +' +'~~Keywords~~. change shortcuts, string, migration, +' mapped drive, new server, LNK, target path +' +'~~Comment~~. +'This script searches the given folder (and sub-folders) for shortcuts +' that contains a particular string (i.e. "c:\temp\shortcut_target.exe" +' first it will prompt you to type the string you wish to replace, +' after which, it prompts for the new string. Finally, it will ask +' you for the root folder which you would like to begin the search +' (and replace). If you run in verbose mode, you will be prompted +' to say 'yes' for each shortcut you'd like to change. After it's +' finished, it will present you with an HTM of the changes that +' were made. +' +'This script only works with single instances of a string - if there are +' more than one instance, the script will change the first instance. +' +'A few lines below are variables that you can set to modify the behavior +' of the script. In this form, Silent = 0 (off), which will prompt you +' with each shortcut it finds that meet the criteria specified in the +' initial input boxes. As it finds matching shortcuts, it will prompt +' you to type 'yes' to change the shortcuts. +' +'I just changed a server name at a location, and all the users had a +' TON of shortcuts pointing to the old server name, so I put this +' together to save me time, and it worked great! +' +'At the very end, it will open up an HTM file with the results of the +' shortcuts that it finds (and highlight which ones are updated) +' +'Per Jim de Graff: "also demonstrates how to traverse a directory tree" +' using recursion."' + +'~~Script~~. +Dim Silent, CurTime, sIsDrive +Dim newlink, oldlink, oldfull, fullname, oldfile, bgcolor +Dim CheckFolder, RootFolder + +Dim w, ws + +const ForReading = 1 +const ForWriting = 2 +const ForAppending = 8 + +'On Error Resume Next + +'Find current time that the script runs +set wso = CreateObject("Wscript.Shell") +set fso = CreateObject("Scripting.FileSystemObject") + +'pull the system's process variables (we'll be using TEMP +' for the output file and WINDIR to figure out the default +' location of user's desktop folder - whether 9x or NT/2k/XP) +Set WshSysEnv = wso.Environment("PROCESS") + +'pull the system's profile environment variable +userprofile = wso.ExpandEnvironmentStrings("%userprofile%") + +'set your variables here +'silent = 0/1/2 +' 0 - verbose +' 1 - turns off verification prompts +' 2 - turns off verification and initial config prompts +'ChangePathFrom = string you wish to replace +'ChangePathTo = string you wish to change ChangePathFrom to +' above server vars are needed only for when silent = 2 +'ouputfile = location of output filename, you can use a string in +' place of all the code after the equal sign (i.e. +' outputfile = "x:\temp," etc.) +'curtime = finds time of execution of script +'RootFolder = The folder that you wish to search (silent mode only) +'-------------------------------------------------------------------- +' set your variables below... +'-------------------------------------------------------------------- +Silent = 1 +ChangePathFrom = "\\test1" 'string to search for +ChangePathTo = "\\test2" 'string to replace with +OutputFile = WshSysEnv("TEMP") & "\" & "migrate_shortcuts_log.htm" +RootFolder = "c:\shortcut" +'-------------------------------------------------------------------- + +CurTime = Now +OSType = WshSysEnv("OS") +WinDirectory = WshSysEnv("WINDIR") + + +If Silent > 0 Then + CheckFolder = RootFolder +Else + +End If + +If CheckFolder = "" Then + + If OSType <> "Windows_NT" Then + 'Windows 9x/Me desktop folder + CheckFolder = Windirectory & "\desktop" + Else + 'Windows NT/2k/XP desktop folder + CheckFolder = userprofile & "\desktop" + End If +End If + +'check to see if ouputfile exists or not, deletes it if it does +If CheckFileExists(OutputFile) Then + Set oldfile = fso.GetFile(OutputFile) + oldfile.Delete +Else + 'wscript.echo oldfile & " does not yet exist." +End If + +If Silent <= 1 Then + Call CServer +End If + +'Bring up inputbox for old server string +Sub CServer +ChangePathFrom = InputBox ("Type the string of text that you wish to"_ +& " replace in your shortcuts (LNK Files).","Enter text string to replace",ChangePathFrom) + ChangePathFrom = LCase(ChangePathFrom) + Check4FromSlash = Right(ChangePathFrom,1) + VarLengthCPF = Len(ChangePathFrom) + + If Check4FromSlash = "\" Then + VarLengthCPF = VarLengthCPF - 1 + ChangePathFrom = Left(ChangePathFrom, VarLengthCPF) + If Silent = 0 Then + wscript.echo "Now Removing trailing '\' from " & ChangePathFrom & "." + End If + End If + + + If ChangePathFrom = "" Then + wscript.quit + Else + Call NServer + End If + +End Sub + +'Bring up inputbox for new server string +Sub NServer +'wscript.echo changepathfrom +ChangePathTo = InputBox ("Enter the string of text you would like to " & ""_ +& " replace instances of " & Chr(34) & ChangePathFrom & Chr(34) & ""_ +& " with.","Enter new text string" & ".",ChangePathTo) + ChangePathTo = LCase(ChangePathTo) + Check4ToSlash = Right(ChangePathTo,1) + VarLengthCPT = Len(ChangePathTo) + + If Check4ToSlash = "\" Then + VarLengthCPT = VarLengthCPT - 1 + ChangePathTo = Left(ChangePathTo, VarLengthCPT) + If Silent = 0 Then + wscript.echo "Now Removing trailing '\' from " & ChangePathTo & "." + End If + End If + If ChangePathTo = "" Then + Call CServer + Else + Call CFolder + End If +End Sub + +'Bring up inputbox for root folder to search (recursive) +Sub CFolder +CheckFolder = InputBox ("Type the root folder path that you wish to"_ +& "start your scan from (recursive).","Begin shortcut (lnk) scan"_ +& "from:",CheckFolder) + If CheckFolder = "" Then + Call NServer + + End If +End Sub + +'Start writing the HTM Log file... +Set w = fso.OpenTextFile (OutputFile, ForAppending, True) + w.Writeline ("") + w.Writeline ("Changing Shortcuts in root folder "_ + & CheckFolder & "") + w.Writeline ("") + w.Writeline ("") + w.Writeline ("") + w.Writeline ("") + w.Writeline (""_ + & "Shortcuts located in: "_ + & CheckFolder & " ,"_ + & " searching recursively at " & CurTime & "") + w.WriteLine ("") + w.WriteLine ("") + w.WriteLine ("") + w.WriteLine ("") + w.WriteLine ("") + +If ChangePathFrom = "" Then + wscript.echo "You have not specified a source string to change." + Call Cserver +ElseIf ChangePathTo = "" Then + wscript.echo "You have not specified a new string name to"_ + & " replace" & Chr(34) & ChangePathFrom & Chr(34) & " with." + Call Nserver +ElseIf CheckFolder = "" Then + wscript.echo "You must specify a root folder to begin your"_ + & " search from." + Call CFolder +End If + +'process the shortcuts +ModifyLinks CheckFolder + +Sub ModifyLinks (foldername) + + dim file 'for stepping through the files collection ' + dim folder 'for stepping through the subfolders collection ' + dim fullname 'fully qualified link file name ' + dim link 'object connected to the link file ' + + 'process all the files in the folder + For each file in fso.GetFolder(foldername).Files + + 'check only link files + If strcomp(right(file.name,4),".lnk",vbTexctCompare) = 0 then + + 'Find full path of shortcut + fullname = fso.GetAbsolutePathName(file) + + 'Find full path of target within shortcut + set link = wso.CreateShortcut(fullname) + targetpath = LCase(link.targetpath) + + oldfull = fullname + oldlink = targetpath + newlink = "Not Updated" + + 'Displays current shortcut that is being checked (good for + ' troubleshooting the script). + 'If Silent = 0 Then + 'MsgBox "Checking shortcut: " & fullname & "." & VBCrlf_ + '& "Shortcut target: " & targetpath + 'End If + + 'If the current server (one you want to change) is found in the + ' target path, then run the following code + If InStr(1, targetpath, ChangePathFrom) > 0 Then + sChangeTargetTo = "" + sChangePathTo = "" + + 'Set numerical length of full target path + VarLengthPath = Len(targetpath) + 'Set numerical length of ChangePathFrom + VarLengthCPF = Len(ChangePathFrom) + + 'Find out what's between character 0 and where changepathfrom starts + VarBeginPath = InStr(1, targetpath, ChangePathFrom) + + 'Subtract 1 from where it begins (all text begins at 1 in a string) + 'This is so you will have a '0' value if you type in a root drive or + 'UNC to replace - there shouldn't be anything that appears before + ''c:\' or '\\server' etc. + VarBeginPath = VarBeginPath - 1 + + 'Parse actual text prior to search string to replace + BeginPath = Null + BeginPath = Left(targetpath, VarBeginPath) + + 'wscript.echo "VarBeginPath is: " & VarBeginPath & ". " & BeginPath + + 'Find out how many characters are left after subtracting the beginpath + 'and search strings from the whole path + VarEndPath = VarLengthPath - (VarBeginPath + VarLengthCPF) + + 'Find out what text appears after the search string + EndPath = Right(targetpath, VarEndPath) + 'wscript.echo EndPath + + workingpath = link.workingdirectory + + 'Set variable to text before/search string/text after, so you get + 'something like: c:\stuffbeforestring\mysearchstring\stuffafterstring + 'or c:\temp\docs\mysearchstring\test.doc + sChangePathTo = BeginPath & ChangePathTo & EndPath + 'wscript.echo "ChangePathTo is: " & ChangePathTo + + 'If there is no working directory, then text will show 'not set' during + 'script execution + If workingpath = "" Then + workingpath = "not set" + End If + + + 'if you are running in verbose mode, you will be prompted with + 'each shortcut and working folder. + If Silent = 0 Then + MyVar = MsgBox ("Path contains " & Chr(34) & ChangePathFrom & "." & Chr(34) & ""_ + & " LNK file's full target path is: "_ + & targetpath & "." & " Working path is "_ + & workingpath & ".",64, fullname) + End If + + 'Sometimes shortcuts don't have working dirs (not sure why) + 'If there is a working dir, then run following code + If workingpath <> "not set" Then + + VarBeginPath = InStr(1, workingpath, ChangePathFrom) + If VarBeginPath > 0 Then + VarBeginPath = VarBeginPath - 1 + End If + + 'Parse actual text prior to search string to replace + BeginPath = Null + 'wscript.echo "VarBeginPath " & VarBeginPath + BeginPath = Left(workingpath, VarBeginPath) + 'wscript.echo "Working beginpath is: " & BeginPath + + 'Set numerical length of working directory + VarLengthWorking = Len(link.workingdirectory) + + VarEndPath = VarLengthWorking - (VarBeginPath + VarLengthCPF) + 'wscript.echo "Working path number count is: " & varlengthworking & ""_ + '& VBCRLF & "working path end + 'wscript.echo "VarEndPath = " & VarEndPath & " = " & VarLengthWorking & ""_ + '& " - (" & VarBeginPath & " + " & VarLengthCPF & ")" + 'Find out what text appears after the search string + + If VarEndPath >= 0 Then + EndPath = Right(workingpath, VarEndPath) + sChangeTargetTo = BeginPath & ChangePathTo & EndPath + + 'wscript.echo "ChangeTargetTo is: " & sChangeTargetTo + WorkingMSG = "Also change working directory to " & sChangeTargetTo & "?" + End If + + 'wscript.echo "End of working folder :" & EndPath + + Else + link.workingdirectory = "" + WorkingMSG = "No working directory will be set at this time." + End If + + 'wscript.echo "Path of shortcut is " & targetpath & ""_ + '& VBCRLF & ". Working folder is " & workingpath & "." + + 'Display input box to modify each shortcut as the script finds them + If Silent = 0 Then + ModifyPath = InputBox ("Modifying " & fullname & "." & VBCRLF & ""_ + & VBCRLF & "Modify path for " & targetpath & " "_ + & "and replace with " & sChangePathTo & "?" & VBCRLF & VBCRLF & ""_ + & WorkingMSG,""_ + & "Type 'yes' to modify") + ElseIf Silent >= 1 Then + ModifyPath = "yes" + End If + If ModifyPath = "yes" Then + bgcolor = "#99CCFF" + 'Set link target path attribute to + link.targetpath = Chr(34) & sChangePathTo & Chr(34) + + newlink = link.targetpath + + 'wscript.echo newlink + If VarLengthWorking <> "" Then + 'Set link working dir attribute to + ' \\ChangePathToname\workingpath + link.workingdirectory = Chr(34) & sChangeTargetTo & Chr(34) + End If + + 'Save the shortcut with the new information + link.save + + 'If answer above is anything but yes, the script will proceed + ' to the next shortcut + + Else + + End if + + 'Clear link variable + MyPos = 0 + MyPosEnd = 0 + End if + + 'write output to logfile + Call WriteEntry +End If + + Next + + 'process all the subfolders in the folder + For each folder in fso.GetFolder(foldername).Subfolders + call ModifyLinks(folder.path) + + Next +End Sub + +'-------------------------------------------------------------------------- +' Function WriteEntry to write change history to logfile in outputfile path +'-------------------------------------------------------------------------- + +Function WriteEntry + If newlink <> "0" Then + w.WriteLine ("") + w.WriteLine ("") + w.WriteLine ("") + w.WriteLine ("") + w.WriteLine ("") + oldfull = "0" + newlink = "0" + oldlink = "0" + bgcolor = "white" + End If +End Function + +'---------------------------------------------------------------------------- +'Function to see if outputfile already exists +'---------------------------------------------------------------------------- + +Function CheckFileExists(sFileName) + +Dim FileSystemObject +Set FileSystemObject = CreateObject("Scripting.FileSystemObject") +If (FileSystemObject.FileExists(sFileName)) Then + CheckFileExists = True +Else + CheckFileExists = False +End If +Set FileSystemObject = Nothing +End Function + +w.Writeline ("") + +'if silent = 2, then it will not open the log file +If Silent <= 1 Then + 'set command variable with path in quotes (for long filenames) + Command = Chr(34) & OutputFile & Chr(34) + + 'run htm file in your default browser + wso.Run Command +End If +'~~[/script]~~ \ No newline at end of file diff --git a/CheckOneDrive.bat b/CheckOneDrive.bat new file mode 100644 index 0000000..48e128d --- /dev/null +++ b/CheckOneDrive.bat @@ -0,0 +1,9 @@ +tasklist /FI "IMAGENAME eq onedrive.exe" 2>NUL | find /I /N "onedrive.exe">NUL +if "%ERRORLEVEL%"=="1" goto StartOneDrive +goto End + +:StartOneDrive +start "" "C:\Program Files (x86)\Microsoft OneDrive\OneDrive.exe" /background + +:End +exit diff --git a/CheckRemoteVMStatus.bat b/CheckRemoteVMStatus.bat new file mode 100644 index 0000000..8d80372 --- /dev/null +++ b/CheckRemoteVMStatus.bat @@ -0,0 +1,2 @@ +vboxmanage list -l runningvms +pause diff --git a/CleanAdministratorWebCache.bat b/CleanAdministratorWebCache.bat new file mode 100644 index 0000000..b072429 --- /dev/null +++ b/CleanAdministratorWebCache.bat @@ -0,0 +1,2 @@ +del /f /s /q "C:\Users\Administrator\AppData\Local\Microsoft\Windows\WebCache\*.*" +pause diff --git a/CleanUpStartMenuShortcuts/CleanUpStartMenuShortcuts.bat b/CleanUpStartMenuShortcuts/CleanUpStartMenuShortcuts.bat new file mode 100644 index 0000000..3b0166f --- /dev/null +++ b/CleanUpStartMenuShortcuts/CleanUpStartMenuShortcuts.bat @@ -0,0 +1,9 @@ +pushd "%~dp0" +rem Move and rename files and folders + + +rem Delete files and folders +for /F "tokens=*" %%A in (Files.txt) do del /f /s /q %%A +for /F "tokens=*" %%A in (Folders.txt) do rmdir /s /q %%A +popd +pause diff --git a/CleanUpStartMenuShortcuts/Files.txt b/CleanUpStartMenuShortcuts/Files.txt new file mode 100644 index 0000000..134c4a3 --- /dev/null +++ b/CleanUpStartMenuShortcuts/Files.txt @@ -0,0 +1,3 @@ +"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\AIMP\AudioConverter.lnk" +"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\AIMP\TagEditor.lnk" +"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\AIMP\Uninstall.lnk" diff --git a/CleanUpStartMenuShortcuts/Folders.txt b/CleanUpStartMenuShortcuts/Folders.txt new file mode 100644 index 0000000..9399119 --- /dev/null +++ b/CleanUpStartMenuShortcuts/Folders.txt @@ -0,0 +1,2 @@ +"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\AIMP\Test1" +"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\AIMP\Test2" \ No newline at end of file diff --git a/CleanUpTempFolder.bat b/CleanUpTempFolder.bat new file mode 100644 index 0000000..7c0eab4 --- /dev/null +++ b/CleanUpTempFolder.bat @@ -0,0 +1,7 @@ +pushd %temp% +RMDIR /S /Q . +popd +pushd C:\Windows\Temp +RMDIR /S /Q . +popd +pause diff --git a/CleanUpWSUSServer.bat b/CleanUpWSUSServer.bat new file mode 100644 index 0000000..e35b1ff --- /dev/null +++ b/CleanUpWSUSServer.bat @@ -0,0 +1,6 @@ +@echo on +c: +cd "C:\Program Files\WindowsPowerShell\Scripts" +powershell -ExecutionPolicy Bypass -command .\Wsus-Maintenance.ps1 -LogPath C:\Logs -WSUSServer WinSrvr2019-01 +pause +exit diff --git a/CleanUpWindowsUpdateFolder.bat b/CleanUpWindowsUpdateFolder.bat new file mode 100644 index 0000000..c609d57 --- /dev/null +++ b/CleanUpWindowsUpdateFolder.bat @@ -0,0 +1,9 @@ +net stop BITS +net stop wuauserv +net stop cryptsvc +del /f /s /q "C:\Windows\SoftwareDistribution\*.*" +rd /s /q "C:\Windows\SoftwareDistribution" +del /f /s /q "C:\Windows\System32\catroot2\*.*" +net start BITS +net start wuauserv +net start cryptsvc \ No newline at end of file diff --git a/CleanupNewPC.bat b/CleanupNewPC.bat new file mode 100644 index 0000000..d070fe9 --- /dev/null +++ b/CleanupNewPC.bat @@ -0,0 +1,22 @@ +rmdir /s /q "C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Maintenance" +rmdir /s /q "C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Administrative Tools" +rmdir /s /q "C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Windows PowerShell" +del /f /s /q "C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\System Tools\Administrative Tools.lnk" +del /f /s /q "C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\SendTo\Bluetooth File Transfer.LNK" +del /f /s /q "C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\SendTo\Documents.mydocs" +del /f /s /q "C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\SendTo\Fax Recipient.lnk" +del /f /s /q "C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\SendTo\Mail Recipient.MAPIMail" +rmdir /s /q "C:\Users\Administrator\AppData\Local\Microsoft\OneDrive" +del /f /s /q "C:\Users\Default\AppData\Roaming\Microsoft\Windows\SendTo\Mail Recipient.MAPIMail" +del /f /s /q "C:\Users\Default\AppData\Roaming\Microsoft\Windows\SendTo\Fax Recipient.lnk" +rmdir /s /q "C:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Maintenance" +rmdir /s /q "C:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Windows PowerShell" +del /f /s /q "C:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\System Tools\Administrative Tools.lnk" +rmdir /s /q "C:\ProgramData\Microsoft OneDrive" +rmdir /s /q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Maintenance" +rmdir /s /q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Administrative Tools" +del /f /s /q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Dell\Command Update\Dell Command Update User Guide.lnk" +move "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Dell\Command Update\Dell Command Update.lnk" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Dell" +rmdir /s /q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Dell\Command Update" +del /f /s /q "C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Recent" +pause diff --git a/CleanupTempFolderDaily.bat b/CleanupTempFolderDaily.bat new file mode 100644 index 0000000..87979c3 --- /dev/null +++ b/CleanupTempFolderDaily.bat @@ -0,0 +1,6 @@ +pushd %temp% +RMDIR /S /Q . +popd +pushd C:\Windows\Temp +RMDIR /S /Q . +popd diff --git a/ClearAllEventViewerLogs.bat b/ClearAllEventViewerLogs.bat new file mode 100644 index 0000000..57b8b7d --- /dev/null +++ b/ClearAllEventViewerLogs.bat @@ -0,0 +1,15 @@ +@echo off + +rem IF /I "%EVENTVIEWER%" NEQ "Y" GOTO END +for /F "tokens=*" %%G in ('wevtutil.exe el') DO (call :do_clear "%%G") +echo. +echo All Event Logs have been cleared! +goto end + +:do_clear +echo clearing %1 +wevtutil.exe cl %1 +goto :eof + +:end +pause diff --git a/CopyRemoteDesktopFiles.bat b/CopyRemoteDesktopFiles.bat new file mode 100644 index 0000000..de7c2eb --- /dev/null +++ b/CopyRemoteDesktopFiles.bat @@ -0,0 +1,9 @@ +copy %SystemRoot%\System32\mstsc.exe \\hypervhost-03\c$\windows\system32\ +copy %SystemRoot%\System32\mstscax.dll \\hypervhost-03\c$\windows\system32\ +copy %SystemRoot%\System32\msacm32.dll \\hypervhost-03\c$\windows\system32\ +copy %SystemRoot%\System32\d2d1.dll \\hypervhost-03\c$\windows\system32\ +copy %SystemRoot%\System32\d3d11.dll \\hypervhost-03\c$\windows\system32\ +copy %SystemRoot%\System32\dxgi.dll \\hypervhost-03\c$\windows\system32\ +copy %SystemRoot%\System32\en-US\mstsc.exe.mui \\hypervhost-03\c$\windows\system32\en-US +copy %SystemRoot%\System32\en-US\mstscax.dll.mui \\hypervhost-03\c$\windows\system32\en-US +pause diff --git a/CustomWinPE/capturewindowsimage.bat b/CustomWinPE/capturewindowsimage.bat new file mode 100644 index 0000000..a784def --- /dev/null +++ b/CustomWinPE/capturewindowsimage.bat @@ -0,0 +1,17 @@ +T: +cd Captured +dir + +:SetImage +@echo off +cd. +echo Enter name of image to capture +set /p ImageName= +if exist %ImageName%.wim goto SetImage +if %errorlevel%==1 goto SetImage + +:CaptureImage +@echo on +Dism /Capture-Image /ImageFile:"%ImageName%.wim" /CaptureDir:C:\ /Name:%ImageName% /Compress:fast +pause +wpeutil shutdown diff --git a/CustomWinPE/installwindowsimage.bat b/CustomWinPE/installwindowsimage.bat new file mode 100644 index 0000000..7e7c4fc --- /dev/null +++ b/CustomWinPE/installwindowsimage.bat @@ -0,0 +1,20 @@ +T: +cd Installers +dir + +:SetImage +@echo off +set ImageName=0 +echo Enter name of image to install +set /p ImageName= +if not exist %ImageName% goto SetImage + +:RestoreImage +@echo on +diskpart /s CreatePartitions.txt +Dism /apply-image /imagefile:%ImageName% /index:1 /applydir:C:\ +bcdboot C:\Windows /s B:\ /f ALL +X: +net use /d T: /y +pause +wpeutil shutdown diff --git a/CustomWinPE/launch.bat b/CustomWinPE/launch.bat new file mode 100644 index 0000000..48c80a3 --- /dev/null +++ b/CustomWinPE/launch.bat @@ -0,0 +1,38 @@ +@echo off +powercfg /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c +Wpeutil InitializeNetwork +net use T: \\192.168.1.41\ipxe\remote-install\images /user:truenas\akanealw 8ung1e1! + +:ImageOptions +cls +title Image Options +cls +echo. +echo 1. Install Windows image +echo. +echo 2. Restore Windows image +echo. +echo 3. Capture Windows image +echo. + +set /p a= || set a=0 +IF %a%==0 goto End +IF %a%==1 goto InstallWindowsImage +IF %a%==2 goto RestoreWindowsImage +IF %a%==3 goto CaptureWindowsImage +goto ImageOptions + +:InstallWindowsImage +start "" cmd /k %systemdrive%\installwindowsimage.bat +goto ImageOptions + +:RestoreWindowsImage +start "" cmd /k %systemdrive%\restorewindowsimage.bat +goto ImageOptions + +:CaptureWindowsImage +start "" cmd /k %systemdrive%\capturewindowsimage.bat +goto ImageOptions + +:End +wpeutil shutdown \ No newline at end of file diff --git a/CustomWinPE/restorewindowsimage.bat b/CustomWinPE/restorewindowsimage.bat new file mode 100644 index 0000000..0554795 --- /dev/null +++ b/CustomWinPE/restorewindowsimage.bat @@ -0,0 +1,20 @@ +T: +cd Captured +dir + +:SetImage +@echo off +set ImageName=0 +echo Enter name of image to restore +set /p ImageName= +if not exist %ImageName% goto SetImage + +:RestoreImage +@echo on +diskpart /s CreatePartitions.txt +Dism /apply-image /imagefile:%ImageName% /index:1 /applydir:C:\ +bcdboot C:\Windows /s B:\ /f ALL +X: +net use /d T: /y +pause +wpeutil shutdown diff --git a/CustomWinPE/winpeshl.ini b/CustomWinPE/winpeshl.ini new file mode 100644 index 0000000..170944b --- /dev/null +++ b/CustomWinPE/winpeshl.ini @@ -0,0 +1,2 @@ +[LaunchApps] +"%SYSTEMDRIVE%\launch.bat" \ No newline at end of file diff --git a/DISMCheckHealth.bat b/DISMCheckHealth.bat new file mode 100644 index 0000000..dedc9a3 --- /dev/null +++ b/DISMCheckHealth.bat @@ -0,0 +1,3 @@ +cd %~dp0 +DISM /Online /Cleanup-Image /CheckHealth +pause diff --git a/DISMRestoreHealth.bat b/DISMRestoreHealth.bat new file mode 100644 index 0000000..f934528 --- /dev/null +++ b/DISMRestoreHealth.bat @@ -0,0 +1,3 @@ +cd %~dp0 +DISM /Online /Cleanup-Image /RestoreHealth +pause diff --git a/DISMScanHealth.bat b/DISMScanHealth.bat new file mode 100644 index 0000000..e016928 --- /dev/null +++ b/DISMScanHealth.bat @@ -0,0 +1,3 @@ +cd %~dp0 +DISM /Online /Cleanup-Image /ScanHealth +pause diff --git a/DISM_Split_Image.bat b/DISM_Split_Image.bat new file mode 100644 index 0000000..cb95156 --- /dev/null +++ b/DISM_Split_Image.bat @@ -0,0 +1,12 @@ +@echo off +:SetInstallWIM +echo Set the path to the parent folder +set /p Source= +C:\Windows\System32\Dism.exe /Split-Image /ImageFile:%Source%\Sources\install.wim /SWMFile:%Source%\Sources\install.swm /FileSize:4000 /CheckIntegrity +SET /P AREYOUSURE=Split another install.wim? (Y/[N]) +IF /I "%AREYOUSURE%" NEQ "Y" GOTO end +goto SetInstallWIM + +:End +set Source= +exit diff --git a/Device_Manager_Show_Unplugged_Devices.bat b/Device_Manager_Show_Unplugged_Devices.bat new file mode 100644 index 0000000..0f6e6e9 --- /dev/null +++ b/Device_Manager_Show_Unplugged_Devices.bat @@ -0,0 +1,3 @@ +c: +set devmgr_show_nonpresent_devices=1 +start devmgmt.msc \ No newline at end of file diff --git a/DisableCortana.bat b/DisableCortana.bat new file mode 100644 index 0000000..01ec8c1 --- /dev/null +++ b/DisableCortana.bat @@ -0,0 +1,6 @@ +taskkill /f /im "SearchUI.exe" +taskkill /f /im "SearchUI.exe" +taskkill /f /im "SearchUI.exe" +taskkill /f /im "SearchUI.exe" +move %windir%\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy %windir%\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy.000 +pause \ No newline at end of file diff --git a/DisableDellServices.bat b/DisableDellServices.bat new file mode 100644 index 0000000..1f63622 --- /dev/null +++ b/DisableDellServices.bat @@ -0,0 +1,9 @@ +rem net stop DellClientManagementService +rem sc config DellClientManagementService start= delayed-auto + +net stop DellDigitalDelivery +sc config DellDigitalDelivery start= disabled + +net stop SupportAssistAgent +sc config SupportAssistAgent start= disabled + \ No newline at end of file diff --git a/DisableDellSupportAssistTask.bat b/DisableDellSupportAssistTask.bat new file mode 100644 index 0000000..0aab5a9 --- /dev/null +++ b/DisableDellSupportAssistTask.bat @@ -0,0 +1 @@ +schtasks.exe /change /tn "Dell SupportAssistAgent AutoUpdate" /disable \ No newline at end of file diff --git a/DisableHibernateDesktopOnly.bat b/DisableHibernateDesktopOnly.bat new file mode 100644 index 0000000..f6c37de --- /dev/null +++ b/DisableHibernateDesktopOnly.bat @@ -0,0 +1,3 @@ +cd %~dp0 +powercfg /h off +pause diff --git a/DisableLocalAdminPasswordExpiration.bat b/DisableLocalAdminPasswordExpiration.bat new file mode 100644 index 0000000..0fbcf6a --- /dev/null +++ b/DisableLocalAdminPasswordExpiration.bat @@ -0,0 +1,6 @@ +net user administrator /active:yes +WMIC USERACCOUNT WHERE Name='js72osp' SET PasswordExpires=FALSE +WMIC USERACCOUNT WHERE Name='TCLocalAdmin' SET PasswordExpires=FALSE +WMIC USERACCOUNT WHERE Name='Administrator' SET PasswordExpires=FALSE +net user administrator /active:no +pause diff --git a/DisablePDFOpenSaveInternetExplorer.bat b/DisablePDFOpenSaveInternetExplorer.bat new file mode 100644 index 0000000..5f124bf --- /dev/null +++ b/DisablePDFOpenSaveInternetExplorer.bat @@ -0,0 +1,3 @@ +reg delete "HKCR\AcroPDF.FDF.1" /f +reg delete "HKCR\AcroPDF.PDF.1" /v EditFlags /f +reg add "HKCR\AcroPDF.PDF.1" /v EditFlags /t REG_BINARY /d "00 01 00" /f \ No newline at end of file diff --git a/DisableWindowsDefender.ps1 b/DisableWindowsDefender.ps1 new file mode 100644 index 0000000..56cefb3 --- /dev/null +++ b/DisableWindowsDefender.ps1 @@ -0,0 +1 @@ +Set-MpPreference -DisableRealtimeMonitoring $true \ No newline at end of file diff --git a/DisconnectCurrentSession.bat b/DisconnectCurrentSession.bat new file mode 100644 index 0000000..862552f --- /dev/null +++ b/DisconnectCurrentSession.bat @@ -0,0 +1,2 @@ +tsdiscon +exit \ No newline at end of file diff --git a/DisconnectRD.bat b/DisconnectRD.bat new file mode 100644 index 0000000..ac078bc --- /dev/null +++ b/DisconnectRD.bat @@ -0,0 +1,23 @@ +@echo off +Call :YesNoBox "Do you want to disconnect?" +if "%YesNo%"=="6" ( +FOR /f %%G IN ('D:\Scripts\FindActiveSessions.bat') DO tsdiscon %%G +) + +exit /b +:YesNoBox +REM returns 6 = Yes, 7 = No. Type=4 = Yes/No +set YesNo= +set MsgType=4 +set heading=%~2 +set message=%~1 +echo wscript.echo msgbox(WScript.Arguments(0),%MsgType%,WScript.Arguments(1)) >"%temp%\input.vbs" +for /f "tokens=* delims=" %%a in ('cscript //nologo "%temp%\input.vbs" "%message%" "%heading%"') do set YesNo=%%a +exit /b + +:MessageBox +set heading=%~2 +set message=%~1 +echo msgbox WScript.Arguments(0),0,WScript.Arguments(1) >"%temp%\input.vbs" +cscript //nologo "%temp%\input.vbs" "%message%" "%heading%" +exit /b diff --git a/EnableAdminSharesOnWorkstations.bat b/EnableAdminSharesOnWorkstations.bat new file mode 100644 index 0000000..c66b67a --- /dev/null +++ b/EnableAdminSharesOnWorkstations.bat @@ -0,0 +1 @@ +reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 00000001 /f \ No newline at end of file diff --git a/EnableDisableHeadphones/EnableArctisHeadphones.bat b/EnableDisableHeadphones/EnableArctisHeadphones.bat new file mode 100644 index 0000000..5ec6aae --- /dev/null +++ b/EnableDisableHeadphones/EnableArctisHeadphones.bat @@ -0,0 +1,10 @@ +pushd "%~dp0" +SoundVolumeView.exe /Disable "Realtek(R) Audio\Device\Speakers\Render" +SoundVolumeView.exe /Disable "Creative BT-W3\Device\Speakers\Render" +SoundVolumeView.exe /Disable "Creative BT-W3\Device\Microphone\Capture" +SoundVolumeView.exe /Enable "Arctis 7 Chat\Device\Headset Earphone\Render" +SoundVolumeView.exe /Enable "Arctis 7 Game\Device\Headphones\Render" +SoundVolumeView.exe /Enable "Arctis 7 Chat\Device\Headset Microphone\Capture" +SoundVolumeView.exe /SetDefault "Arctis 7 Chat\Device\Headset Earphone\Render" Communications +SoundVolumeView.exe /SetDefault "Arctis 7 Game\Device\Headphones\Render" Console +popd \ No newline at end of file diff --git a/EnableDisableHeadphones/EnableRealtekSpeakers.bat b/EnableDisableHeadphones/EnableRealtekSpeakers.bat new file mode 100644 index 0000000..56f6bc3 --- /dev/null +++ b/EnableDisableHeadphones/EnableRealtekSpeakers.bat @@ -0,0 +1,9 @@ +pushd "%~dp0" +SoundVolumeView.exe /Disable "Arctis 7 Game\Device\Headphones\Render" +SoundVolumeView.exe /Disable "Arctis 7 Chat\Device\Headset Earphone\Render" +SoundVolumeView.exe /Disable "Arctis 7 Chat\Device\Headset Microphone\Capture" +SoundVolumeView.exe /Disable "Creative BT-W3\Device\Speakers\Render" +SoundVolumeView.exe /Disable "Creative BT-W3\Device\Microphone\Capture" +SoundVolumeView.exe /Enable "Realtek(R) Audio\Device\Speakers\Render" +SoundVolumeView.exe /SetDefault "Realtek(R) Audio\Device\Speakers\Render" Multimedia +popd \ No newline at end of file diff --git a/EnableDisableHeadphones/SoundVolumeView.cfg b/EnableDisableHeadphones/SoundVolumeView.cfg new file mode 100644 index 0000000..0c8fda7 --- /dev/null +++ b/EnableDisableHeadphones/SoundVolumeView.cfg @@ -0,0 +1,32 @@ +[General] +MarkOddEvenRows=0 +ShowGridLines=0 +SaveFilterIndex=0 +ShowInfoTip=1 +AutoRefresh=1 +TrayIcon=0 +StartAsHidden=0 +SortOnEveryUpdate=0 +MainFont=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +AlwaysOnTop=0 +AutoSizeColumnsOnUpdate=0 +MouseWheelMode=2 +MouseWheelPercentChange=5 +ShowDisabledDevices=0 +ShowUnpluggedDevices=0 +AlignNumbersToRight=0 +SelectedChannel=0 +WinPos=2C 00 00 00 02 00 00 00 03 00 00 00 00 83 FF FF 00 83 FF FF FF FF FF FF FF FF FF FF 99 09 00 00 4D 00 00 00 BE 0D 00 00 84 03 00 00 +Columns=C8 01 00 00 78 00 01 00 5A 00 02 00 AE 00 03 00 92 00 04 00 C4 00 05 00 E2 00 06 00 CC 00 07 00 64 00 08 00 78 00 09 00 78 00 0A 00 78 00 0B 00 78 00 0C 00 78 00 0D 00 5E 01 0E 00 5E 01 0F 00 5E 01 10 00 96 00 11 00 96 00 12 00 2C 01 13 00 64 00 14 00 96 00 15 00 FA 00 16 00 +Sort=3 +[RecentFiles] +0= +1= +2= +3= +4= +5= +6= +7= +8= +9= diff --git a/EnableLinkedConnections.bat b/EnableLinkedConnections.bat new file mode 100644 index 0000000..0e98835 --- /dev/null +++ b/EnableLinkedConnections.bat @@ -0,0 +1,2 @@ +reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableLinkedConnections /t REG_DWORD /d 1 /f +pause \ No newline at end of file diff --git a/FindActiveSessions.bat b/FindActiveSessions.bat new file mode 100644 index 0000000..6b4e141 --- /dev/null +++ b/FindActiveSessions.bat @@ -0,0 +1 @@ +query session /sm | find "Active" \ No newline at end of file diff --git a/GamingModeOff.bat b/GamingModeOff.bat new file mode 100644 index 0000000..e142f99 --- /dev/null +++ b/GamingModeOff.bat @@ -0,0 +1,14 @@ +c: +cd \ +cd "C:\Program Files\Everything" +start "" everything.exe -startup +timeout 2 >nul +cd "C:\Users\nwettstein\AppData\Local\FluxSoftware\Flux" +start "" flux.exe /noshow +timeout 2 >nul +taskkill /f /im "explorer.exe" +cd c:\windows +start "" explorer.exe +timeout 2 >nul +start "" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\ueli.lnk" && exit + diff --git a/GamingModeOn.bat b/GamingModeOn.bat new file mode 100644 index 0000000..3e429fc --- /dev/null +++ b/GamingModeOn.bat @@ -0,0 +1,6 @@ +taskkill /f /im "everything.exe" +taskkill /f /im "flux.exe" +taskkill /f /im "msedge.exe" +taskkill /f /im "openvpn-gui.exe" +taskkill /f /im "ueli.exe" +exit diff --git a/HardDriveCheck.bat b/HardDriveCheck.bat new file mode 100644 index 0000000..86d3a58 --- /dev/null +++ b/HardDriveCheck.bat @@ -0,0 +1,3 @@ +cd %~dp0 +chkdsk /f +pause diff --git a/HyperV/CheckAllVMsAutoStart.bat b/HyperV/CheckAllVMsAutoStart.bat new file mode 100644 index 0000000..121a520 --- /dev/null +++ b/HyperV/CheckAllVMsAutoStart.bat @@ -0,0 +1,3 @@ +mode con: cols=120 lines=30 +powershell -command "Get-VM | Select-Object VMname,AutomaticStartAction" +pause \ No newline at end of file diff --git a/HyperV/DisableAllVMsAutoStart.bat b/HyperV/DisableAllVMsAutoStart.bat new file mode 100644 index 0000000..278c309 --- /dev/null +++ b/HyperV/DisableAllVMsAutoStart.bat @@ -0,0 +1,4 @@ +mode con: cols=120 lines=30 +powershell -command "Get-VM | Set-VM -AutomaticStartAction Nothing -Verbose" +powershell -command "Get-VM | Select-Object VMname,AutomaticStartAction" +pause \ No newline at end of file diff --git a/HyperV/EnableAllVMsAutoStart.bat b/HyperV/EnableAllVMsAutoStart.bat new file mode 100644 index 0000000..589fe72 --- /dev/null +++ b/HyperV/EnableAllVMsAutoStart.bat @@ -0,0 +1,4 @@ +mode con: cols=120 lines=30 +powershell -command "Get-VM | Set-VM -AutomaticStartAction Start -Verbose" +powershell -command "Get-VM | Select-Object VMname,AutomaticStartAction" +pause \ No newline at end of file diff --git a/HyperV/ListAllVMsOff.bat b/HyperV/ListAllVMsOff.bat new file mode 100644 index 0000000..3e511fd --- /dev/null +++ b/HyperV/ListAllVMsOff.bat @@ -0,0 +1,3 @@ +mode con: cols=120 lines=30 +powershell -command "Get-VM | Where-Object {$_.State -eq 'Off'}" +pause diff --git a/HyperV/ListAllVMsRunning.bat b/HyperV/ListAllVMsRunning.bat new file mode 100644 index 0000000..15b59cf --- /dev/null +++ b/HyperV/ListAllVMsRunning.bat @@ -0,0 +1,3 @@ +mode con: cols=120 lines=30 +powershell -command "Get-VM | Where-Object {$_.State -eq 'Running'}" +pause diff --git a/HyperV/ListAllVMsShuttingDown.bat b/HyperV/ListAllVMsShuttingDown.bat new file mode 100644 index 0000000..a4aed7d --- /dev/null +++ b/HyperV/ListAllVMsShuttingDown.bat @@ -0,0 +1,3 @@ +mode con: cols=120 lines=30 +powershell -command "Get-VM | Where-Object {$_.State -eq 'ShuttingDown'}" +pause diff --git a/HyperV/ListAllVMsStartingUp.bat b/HyperV/ListAllVMsStartingUp.bat new file mode 100644 index 0000000..9a2d68c --- /dev/null +++ b/HyperV/ListAllVMsStartingUp.bat @@ -0,0 +1,3 @@ +mode con: cols=120 lines=30 +powershell -command "Get-VM | Where-Object {$_.State -eq 'Starting'}" +pause diff --git a/HyperV/ShutDownAllVMs.bat b/HyperV/ShutDownAllVMs.bat new file mode 100644 index 0000000..4566237 --- /dev/null +++ b/HyperV/ShutDownAllVMs.bat @@ -0,0 +1,3 @@ +mode con: cols=100 lines=30 +powershell -command "Get-VM | Stop-VM -Verbose" +pause diff --git a/HyperV/StartUpAllVMs.bat b/HyperV/StartUpAllVMs.bat new file mode 100644 index 0000000..9e8719b --- /dev/null +++ b/HyperV/StartUpAllVMs.bat @@ -0,0 +1,3 @@ +mode con: cols=70 lines=40 +powershell -command "Get-VM | Start-VM -Verbose" +pause diff --git a/IPConfigReleaseRenew.bat b/IPConfigReleaseRenew.bat new file mode 100644 index 0000000..f573d2c --- /dev/null +++ b/IPConfigReleaseRenew.bat @@ -0,0 +1,3 @@ +ipconfig /release +timeout 10 >nul +ipconfig /renew diff --git a/InstallSoftware.bat b/InstallSoftware.bat new file mode 100644 index 0000000..c451e06 --- /dev/null +++ b/InstallSoftware.bat @@ -0,0 +1,741 @@ +@echo off +rem Check if network drive is mapped +:CheckMappedDrive +if %computername% == OSPIT08 goto Start +if exist o: goto Start +net use o: \\ospit08\storage$ +cls + +rem #Start +:Start +cls +mode con: cols=75 lines=45 +color 1F +title Start +o: +cd \ +cls +echo. +echo 1. Before sysprep / After sysprep / After domain join +echo 2. Install individual software +echo 3. Miscellaneous +echo 4. Add printers for all users +echo 5. Remove printers for all users +echo. +echo Press Enter to exit +echo. + +set /p a= || set a=0 +IF %a%==0 goto End +IF %a%==1 goto BeforeSysprep/AfterSysprep/DomainJoin +IF %a%==2 goto InstallIndividualSoftware +IF %a%==3 goto Miscellaneous +IF %a%==4 goto AddPrinter +IF %a%==5 goto RemovePrinter +goto CheckMappedDrive + +rem #Before Sysprep / After Sysprep / After Domain Join +:BeforeSysprep/AfterSysprep/DomainJoin +cls +color 1E +title Before Sysprep / After Sysprep / After Domain Join +o: +cd \ +cls +echo. +echo 1. Enable admin prompt on shares +echo 2. Install Dell command update +echo 3. Copy sysprep files (Curtis group) +echo 4. Copy sysprep files (OSP only) +echo 5. Apply custom computer settings +echo 6. Install software on desktop +echo 7. Install software on laptop +echo 8. Disable local admin password expiration (Curtis group) +echo 9. Disable local admin password expiration (OSP only) +echo. +echo Press Enter to go back +echo. + +set /p a= || set a=0 +IF %a%==0 goto CheckMappedDrive +IF %a%==1 goto EnableAdminPromptOnShares +IF %a%==2 goto InstallDellCommandUpdate +IF %a%==3 goto CopySysprepFilesCurtisGroup +IF %a%==4 goto CopySysprepFilesOSPOnly +IF %a%==5 goto ApplyCustomComputerSettings +IF %a%==6 goto InstallSoftwareDesktop +IF %a%==7 goto InstallSoftwareLaptop +IF %a%==8 goto DisableLocalAdminPasswordExpirationCurtisGroup +IF %a%==9 goto DisableLocalAdminPasswordExpirationOSPOnly +goto BeforeSysprep/AfterSysprep/DomainJoin + +:EnableAdminPromptOnShares +start .\Scripts\EnableAdminPromptOnShares.bat +goto BeforeSysprep/AfterSysprep/DomainJoin + +:InstallDellCommandUpdate +start /wait .\Files\DellCommandUpdate\Dell-Command-Update_DDVDP_WIN_2.4.0_A00.EXE /s +goto BeforeSysprep/AfterSysprep/DomainJoin + +:CopySysprepFilesCurtisGroup +start .\Files\Sysprep\CopySysprepFilesCurtisGroup.bat +goto BeforeSysprep/AfterSysprep/DomainJoin + +:CopySysprepFilesOSPOnly +start .\Files\Sysprep\CopySysprepFilesOSPOnly.bat +goto BeforeSysprep/AfterSysprep/DomainJoin + +:ApplyCustomComputerSettings +start /wait .\Files\RegistryEdits\ApplyRegedits.bat +start /wait .\Files\RemoveApps\RemoveAppsPowerShell.bat +start /wait .\Scripts\DisableHibernate.bat +start /wait .\Scripts\DisableServices.bat +start /wait .\Scripts\EnableSystemRestoreOnC.bat +goto BeforeSysprep/AfterSysprep/DomainJoin + +:InstallSoftwareDesktop +start /wait .\Files\OpenShell\InstallOpenShell.bat +start /wait .\Files\VCRedistributables\InstallVCRedistributables.bat +start /wait .\Files\AdobeReaderDC\InstallAdobeReaderDC.bat +start /wait .\Files\CutePDFWriter\InstallCutePDFWriter.bat +start /wait .\Files\GoogleChrome\InstallGoogleChrome.bat +start /wait .\Files\MicrosoftEdge\InstallMicrosoftEdge.bat +start /wait .\Files\MicrosoftTeams\InstallMicrosoftTeams.bat +start /wait .\Files\DameWareAgentInstall\InstallDameWareAgentOnImage.bat +start /wait .\Files\DesktopCentralAgent\InstallDesktopCentralAgentOnImage.bat +start /wait .\Files\SnowInventory\InstallSnowInventoryOnImage.bat +start /wait .\Files\SymantecClient\InstallSymantecClient.bat +start .\Files\MicrosoftOffice2019\MicrosoftOffice2019Standard\InstallMicrosoftOffice2019StandardNetwork.bat +goto BeforeSysprep/AfterSysprep/DomainJoin + +:InstallSoftwareLaptop +start /wait .\Files\OpenShell\InstallOpenShell.bat +start /wait .\Files\VCRedistributables\InstallVCRedistributables.bat +start /wait .\Files\AdobeReaderDC\InstallAdobeReaderDC.bat +start /wait .\Files\CutePDFWriter\InstallCutePDFWriter.bat +start /wait .\Files\GoogleChrome\InstallGoogleChrome.bat +start /wait .\Files\MicrosoftEdge\InstallMicrosoftEdge.bat +start /wait .\Files\MicrosoftTeams\InstallMicrosoftTeams.bat +start /wait .\Files\DameWareAgentInstall\InstallDameWareAgentOnImage.bat +start /wait .\Files\DesktopCentralAgent\InstallDesktopCentralAgentOnImage.bat +start /wait .\Files\SnowInventory\InstallSnowInventoryOnImage.bat +start /wait .\Files\TaylorVPN\InstallCiscoAnyConnectVPNClient.bat +start /wait .\Files\SymantecClient\InstallSymantecClient.bat +start .\Files\MicrosoftOffice2019\MicrosoftOffice2019Standard\InstallMicrosoftOffice2019StandardNetwork.bat +goto BeforeSysprep/AfterSysprep/DomainJoin + +:DisableLocalAdminPasswordExpirationCurtisGroup +start .\Scripts\DisableLocalAdminPasswordExpirationCurtisGroup.bat +goto BeforeSysprep/AfterSysprep/DomainJoin + +:DisableLocalAdminPasswordExpirationOSPOnly +start .\Scripts\DisableLocalAdminPasswordExpirationOSPOnly.bat +goto BeforeSysprep/AfterSysprep/DomainJoin + +rem Install Individual Software +:InstallIndividualSoftware +cls +color 1E +title Install Individual Software +o: +cd \ +cls +echo. +echo 1. Install Adobe Reader DC +echo 2. Install Caffeine +echo 3. Install Chocolatey +echo 4. Install Cisco AnyConnect VPN Client +echo 5. Install CutePDF Writer +echo 6. Install DameWare Agent +echo 7. Install DameWare Agent on image +echo 8. Install Dell Command Update +echo 9. Install Desktop Central Agent +echo 10. Install Desktop Central Agent on image +echo 11. Install Don't Sleep +echo 12. Install Everything Search +echo 13. Install Google Chrome +echo 14. Install Java JDK +echo 15. Install Java JRE +echo 16. Install Microsoft Edge +echo 17. Install Microsoft Office 2019 Standard +echo 18. Install Microsoft Office 2019 Standard x64 +echo 19. Install Microsoft Project 2016 Pro +echo 20. Install Microsoft Project 2016 Pro x64 +echo 21. Install Microsoft Project 2016 Standard +echo 22. Install Microsoft Project 2016 Standard x64 +echo 23. Install Microsoft Visio 2016 Pro +echo 24. Install Microsoft Visio 2016 Pro x64 +echo 25. Install Microsoft Visio 2016 Standard +echo 26. Install Microsoft Visio 2016 Standard x64 +echo 27. Install Microsoft Teams +echo 28. Install OpenShell +echo 29. Install Snow Inventory +echo 30. Install Snow Inventory on image +echo 31. Install Symantec Client +echo 32. Install Taylor VPN software +echo 33. Install Timeclock software +echo 34. Install VC redistributables +echo 35. Install Windows 10 1903 updates +echo 36. Install Windows 10 1909 updates +echo. +echo Press Enter to go back +echo. + +set /p a= || set a=0 +IF %a%==0 goto CheckMappedDrive +IF %a%==1 goto InstallAdobeReaderDC +IF %a%==2 goto InstallCaffeine +IF %a%==3 goto InstallChocolatey +IF %a%==4 goto InstallCiscoAnyConnectVPNClient +IF %a%==5 goto InstallCutePDFWriter +IF %a%==6 goto InstallDameWareAgent +IF %a%==7 goto InstallDameWareAgentOnImage +IF %a%==8 goto InstallDellCommandUpdate +IF %a%==9 goto InstallDesktopCentralAgent +IF %a%==10 goto InstallDesktopCentralAgentOnImage +IF %a%==11 goto InstallDontSleep +IF %a%==12 goto InstallEverythingSearch +IF %a%==13 goto InstallGoogleChrome +IF %a%==14 goto InstallJavaJDK +IF %a%==15 goto InstallJavaJRE +IF %a%==16 goto InstallMicrosoftEdge +IF %a%==17 goto InstallMicrosoftOffice2019StandardNetwork +IF %a%==18 goto InstallMicrosoftOffice2019Standardx64Network +IF %a%==19 goto InstallMicrosoftProject2016Pro +IF %a%==20 goto InstallMicrosoftProject2016Prox64 +IF %a%==21 goto InstallMicrosoftProject2016Standard +IF %a%==22 goto InstallMicrosoftProject2016Standardx64 +IF %a%==23 goto InstallMicrosoftVisio2016Pro +IF %a%==24 goto InstallMicrosoftVisio2016Prox64 +IF %a%==25 goto InstallMicrosoftVisio2016Standard +IF %a%==26 goto InstallMicrosoftVisio2016Standardx64 +IF %a%==27 goto InstallMicrosoftTeams +IF %a%==28 goto InstallOpenShell +IF %a%==29 goto InstallSnowInventory +IF %a%==30 goto InstallSnowInventoryOnImage +IF %a%==31 goto InstallSymantecClient +IF %a%==32 goto InstallTaylorVPNSoftware +IF %a%==33 goto InstallTimeclockSoftware +IF %a%==34 goto InstallVCRedistributables +IF %a%==35 goto InstallWindowsUpdates1903 +IF %a%==36 goto InstallWindowsUpdates1909 +goto InstallIndividualSoftware + +:InstallAdobeReaderDC +start .\Files\AdobeReaderDC\InstallAdobeReaderDC.bat +goto InstallIndividualSoftware + +:InstallCaffeine +start .\Files\Caffeine\InstallCaffeine.bat +goto InstallIndividualSoftware + +:InstallChocolatey +start .\Scripts\InstallChocolatey.bat +goto InstallIndividualSoftware + +:InstallCiscoAnyConnectVPNClient +start .\Files\TaylorVPN\InstallCiscoAnyConnectVPNClient.bat +goto InstallIndividualSoftware + +:InstallCutePDFWriter +start .\Files\CutePDFWriter\InstallCutePDFWriter.bat +goto InstallIndividualSoftware + +:InstallDameWareAgent +start .\Files\DameWareAgentInstall\InstallDameWareAgent.bat +goto InstallIndividualSoftware + +:InstallDameWareAgentOnImage +start .\Files\DameWareAgentInstall\InstallDameWareAgentOnImage.bat +goto InstallIndividualSoftware + +:InstallDellCommandUpdate +start .\Files\DellCommandUpdate\Dell-Command-Update_DDVDP_WIN_2.4.0_A00.EXE /s +goto InstallIndividualSoftware + +:InstallDesktopCentralAgent +start .\Files\DesktopCentralAgent\InstallDesktopCentralAgent.bat +goto InstallIndividualSoftware + +:InstallDesktopCentralAgentOnImage +start .\Files\DesktopCentralAgent\InstallDesktopCentralAgentOnImage.bat +goto InstallIndividualSoftware + +:InstallDontSleep +start .\Files\DontSleep\InstallDontSleep.bat +goto InstallIndividualSoftware + +:InstallEverythingSearch +start .\Files\EverythingSearch\InstallEverythingSearch.bat +goto InstallIndividualSoftware + +:InstallGoogleChrome +start .\Files\GoogleChrome\InstallGoogleChrome.bat +goto InstallIndividualSoftware + +:InstallJavaJDK +start .\Files\Java\InstallJavaJDK.bat +goto InstallIndividualSoftware + +:InstallJavaJRE +start .\Files\Java\InstallJavaJRE.bat +goto InstallIndividualSoftware + +:InstallMicrosoftEdge +start .\Files\MicrosoftEdge\InstallMicrosoftEdge.bat +goto InstallIndividualSoftware + +:InstallMicrosoftOffice2019StandardNetwork +start .\Files\MicrosoftOffice2019\MicrosoftOffice2019Standard\InstallMicrosoftOffice2019StandardNetwork.bat +goto InstallIndividualSoftware + +:InstallMicrosoftOffice2019Standardx64Network +start .\Files\MicrosoftOffice2019\MicrosoftOffice2019Standardx64\InstallMicrosoftOffice2019Standardx64Network.bat +goto InstallIndividualSoftware + +:InstallMicrosoftProject2016Pro +start .\Files\MicrosoftProject2016\MicrosoftProject2016Pro\InstallMicrosoftProject2016Pro.bat +goto InstallIndividualSoftware + +:InstallMicrosoftProject2016Prox64 +start .\Files\MicrosoftProject2016\MicrosoftProject2016Prox64\InstallMicrosoftProject2016Prox64.bat +goto InstallIndividualSoftware + +:InstallMicrosoftProject2016Standard +start .\Files\MicrosoftProject2016\MicrosoftProject2016Standard\InstallMicrosoftProject2016Standard.bat +goto InstallIndividualSoftware + +:InstallMicrosoftProject2016Standardx64 +start .\Files\MicrosoftProject2016\MicrosoftProject2016Standardx64\InstallMicrosoftProject2016Standardx64.bat +goto InstallIndividualSoftware + +:InstallMicrosoftVisio2016Pro +start .\Files\MicrosoftVisio2016\MicrosoftVisio2016Pro\InstallMicrosoftVisio2016Pro.bat +goto InstallIndividualSoftware + +:InstallMicrosoftVisio2016Prox64 +start .\Files\MicrosoftVisio2016\MicrosoftVisio2016Prox64\InstallMicrosoftVisio2016Prox64.bat +goto InstallIndividualSoftware + +:InstallMicrosoftVisio2016Standard +start .\Files\MicrosoftVisio2016\MicrosoftVisio2016Standard\InstallMicrosoftVisio2016Standard.bat +goto InstallIndividualSoftware + +:InstallMicrosoftVisio2016Standardx64 +start .\Files\MicrosoftVisio2016\MicrosoftVisio2016Standardx64\InstallMicrosoftVisio2016Standardx64.bat +goto InstallIndividualSoftware + +:InstallMicrosoftTeams +start .\Files\MicrosoftTeams\InstallMicrosoftTeams.bat +goto InstallIndividualSoftware + +:InstallOpenShell +start .\Files\OpenShell\InstallOpenShell.bat +goto InstallIndividualSoftware + +:InstallSnowInventory +start .\Files\SnowInventory\InstallSnowInventory.bat +goto InstallIndividualSoftware + +:InstallSnowInventoryOnImage +start .\Files\SnowInventory\InstallSnowInventoryOnImage.bat +goto InstallIndividualSoftware + +:InstallSymantecClient +start .\Files\SymantecClient\InstallSymantecClient.bat +goto InstallIndividualSoftware + +:InstallTaylorVPNSoftware +start .\Files\TaylorVPN\InstallTaylorVPNSoftware.bat +goto InstallIndividualSoftware + +:InstallTimeclockSoftware +start .\Files\TimeclockSoftware\InstallTimeClock.bat +goto InstallIndividualSoftware + +:InstallVCRedistributables +start .\Files\VCRedistributables\InstallVCRedistributables.bat +goto InstallIndividualSoftware + +:InstallWindowsUpdates1903 +start .\Files\Windows10Updates\InstallUpdates1903.bat +goto InstallIndividualSoftware + +:InstallWindowsUpdates1909 +start .\Files\Windows10Updates\InstallUpdates1909.bat +goto InstallIndividualSoftware + +rem Miscellaneous +:Miscellaneous +cls +color 1E +title Miscellaneous +o: +cd \ +cls +echo. +echo 1. Apply Regedits +echo 2. Clean all Event Viewer logs +echo 3. Clean shortcuts and copy files +echo 4. Clean temp folder +echo 5. Clean user accounts +echo 6. Clean Windows update folder +echo 7. Copy Non-Domain Profile to Default +echo 8. Copy Install Software shortcut +echo 9. Delete excess shortcuts (only after passing sfcscan) +echo 10. Disable hibernate +echo 11. Disk cleanup tool +echo 12. DISM check health +echo 13. DISM scan health +echo 14. DISM restore health +echo 15. Enable admin prompt on shares +echo 16. Enable hibernate +echo 17. Hard drive check +echo 18. Move and create Office and Teams shortcuts +echo 19. Remove apps with Powershell +echo 20. Robocopy files with progress +echo 21. Run gpupdate /force +echo 22. System files check +echo 23. Uninstall Passcode +echo 24. Update VPN Profile +echo. +echo Press Enter to go back +echo. + +set /p a= || set a=0 +IF %a%==0 goto CheckMappedDrive +IF %a%==1 goto ApplyRegedits +IF %a%==2 goto CleanAllEventViewerLogs +IF %a%==3 goto CleanShortcutsAndCopyFiles +IF %a%==4 goto CleanTempFolder +IF %a%==5 goto CleanUserAccounts +IF %a%==6 goto CleanWindowsUpdateFolder +IF %a%==7 goto CopyNonDomainProfileToDefault +IF %a%==8 goto CopyInstallSoftwareShortcut +IF %a%==9 goto DeleteExcessShortcuts +IF %a%==10 goto DisableHibernate +IF %a%==11 goto DiskCleanUp +IF %a%==12 goto DISMCheckHealth +IF %a%==13 goto DISMScanHealth +IF %a%==14 goto DISMRestoreHealth +IF %a%==15 goto EnableAdminPromptOnShares +IF %a%==16 goto EnableHibernate +IF %a%==17 goto HardDriveCheck +IF %a%==18 goto MoveAndCreateOfficeAndTeamsShortcuts +IF %a%==19 goto RemoveAppsWithPowershell +IF %a%==20 goto RoboCopyFilesWithProgress +IF %a%==21 goto RunGpupdateForce +IF %a%==22 goto SystemFilesCheck +IF %a%==23 goto UninstallPasscode +IF %a%==24 goto UpdateVPNProfile +goto Miscellaneous + +:ApplyRegedits +start .\Files\RegistryEdits\ApplyRegedits.bat +goto Miscellaneous + +:CleanAllEventViewerLogs +start .\Scripts\CleanAllEventViewerLogs.bat +goto Miscellaneous + +:CleanShortcutsAndCopyFiles +start .\Scripts\CleanShortcutsAndCopyFiles.bat +goto Miscellaneous + +:CleanTempFolder +start .\Scripts\CleanTempFolder.bat +goto Miscellaneous + +:CleanUserAccounts +start .\Scripts\CleanUserAccounts.bat +goto Miscellaneous + +:CleanWindowsUpdateFolder +start .\Scripts\CleanWindowsUpdateFolder.bat +goto Miscellaneous + +:CopyNonDomainProfileToDefault +start .\Files\CopyNonDomainProfileToDefault\CopyNonDomainProfileToDefault.bat +goto Miscellaneous + +:CopyInstallSoftwareShortcut +start .\Scripts\CopyInstallSoftwareShortcut.bat +goto Miscellaneous + +:DeleteExcessShortcuts +start .\Scripts\DeleteExcessShortcuts.bat +goto Miscellaneous + +:DisableHibernate +start .\Scripts\DisableHibernate.bat +goto Miscellaneous + +:DiskCleanUp +start .\Scripts\DiskCleanUp.bat +goto Miscellaneous + +:DISMCheckHealth +start .\Scripts\DISMCheckHealth.bat +goto Miscellaneous + +:DISMRestoreHealth +start .\Scripts\DISMRestoreHealth.bat +goto Miscellaneous + +:DISMScanHealth +start .\Scripts\DISMScanHealth.bat +goto Miscellaneous + +:EnableAdminPromptOnShares +start .\Scripts\EnableAdminPromptOnShares.bat +goto Miscellaneous + +:EnableHibernate +start .\Scripts\EnableHibernate.bat +goto Miscellaneous + +:HardDriveCheck +start .\Scripts\HardDriveCheck.bat +goto Miscellaneous + +:MoveAndCreateOfficeAndTeamsShortcuts +start .\Scripts\MoveAndCreateOfficeAndTeamsShortcuts.bat +goto Miscellaneous + +:RemoveAppsWithPowershell +start .\Files\RemoveApps\RemoveAppsPowerShell.bat +goto Miscellaneous + +:RoboCopyFilesWithProgress +start .\Scripts\RoboCopyFilesWithProgress.bat +goto Miscellaneous + +:RunGpupdateForce +start .\Scripts\RunGpupdateForce.bat +goto Miscellaneous + +:SystemFilesCheck +start .\Scripts\SystemFilesCheck.bat +goto Miscellaneous + +:UninstallPasscode +start .\Files\TaylorVPN\UninstallPasscode.bat +goto Miscellaneous + +:UpdateVPNProfile +start .\Files\TaylorVPN\UpdateVPNProfile.bat +goto Miscellaneous + +rem Add Printer for all users +:AddPrinter +cls +color 1E +title Add Printer +o: +cd \ +cls +echo. +echo 1. C1K_IL_Abbvie_Cage +echo 2. C1K_IL_Bindery +echo 3. C1K_IL_Careforward +echo 4. C1K_IL_PressRoom +echo 5. OSP Accounting +echo 6. OSP CSS +echo 7. OSP EPP +echo 8. OSP Main_Office +echo 9. OSP Press_Office +echo 10. OSP Quest +echo 11. OSP Shipping +echo. +echo Press Enter to go back +echo. + +set /p a= || set a=0 +IF %a%==0 goto CheckMappedDrive +IF %a%==1 goto C1K_IL_Abbvie_Cage +IF %a%==2 goto C1K_IL_Bindery +IF %a%==3 goto C1K_IL_Careforward +IF %a%==4 goto C1K_IL_PressRoom +IF %a%==5 goto OSP_Accounting +IF %a%==6 goto OSP_CSS +IF %a%==7 goto OSP_EPP +IF %a%==8 goto OSP_Main_Office +IF %a%==9 goto OSP_Press_Office +IF %a%==10 goto OSP_Quest +IF %a%==11 goto OSP_Shipping +goto AddPrinter + +:C1K_IL_Abbvie_Cage +@echo on +RUNDLL32 PRINTUI.DLL,PrintUIEntry /ga /z /n"\\OSPFS02\C1K_IL_Abbvie_Cage" +@echo off +goto AddPrinter + +:C1K_IL_Bindery +@echo on +RUNDLL32 PRINTUI.DLL,PrintUIEntry /ga /z /n"\\OSPFS02\C1K_IL_Bindery" +@echo off +goto AddPrinter + +:C1K_IL_Careforward +@echo on +RUNDLL32 PRINTUI.DLL,PrintUIEntry /ga /z /n"\\OSPFS02\C1K_IL_Careforward" +@echo off +goto AddPrinter + +:C1K_IL_PressRoom +@echo on +RUNDLL32 PRINTUI.DLL,PrintUIEntry /ga /z /n"\\OSPFS02\C1K_IL_PressRoom" +@echo off +goto AddPrinter + +:OSP_Accounting +@echo on +RUNDLL32 PRINTUI.DLL,PrintUIEntry /ga /z /n"\\OSPFS02\OSP Accounting" +@echo off +goto AddPrinter + +:OSP_CSS +@echo on +RUNDLL32 PRINTUI.DLL,PrintUIEntry /ga /z /n"\\OSPFS02\OSP CSS" +@echo off +goto AddPrinter + +:OSP_EPP +@echo on +RUNDLL32 PRINTUI.DLL,PrintUIEntry /ga /z /n"\\OSPFS02\OSP EPP" +@echo off +goto AddPrinter + +:OSP_Main_Office +@echo on +RUNDLL32 PRINTUI.DLL,PrintUIEntry /ga /z /n"\\OSPFS02\OSP Main_Office" +@echo off +goto AddPrinter + +:OSP_Press_Office +@echo on +RUNDLL32 PRINTUI.DLL,PrintUIEntry /ga /z /n"\\OSPFS02\OSP Press_Office" +@echo off +goto AddPrinter + +:OSP_Quest +@echo on +RUNDLL32 PRINTUI.DLL,PrintUIEntry /ga /z /n"\\OSPFS02\OSP Quest" +@echo off +goto AddPrinter + +:OSP_Shipping +@echo on +RUNDLL32 PRINTUI.DLL,PrintUIEntry /ga /z /n"\\OSPFS02\OSP Shipping" +@echo off +goto AddPrinter + +rem Remove Printer for all users +:RemovePrinter +cls +color 1E +title Remove Printer +o: +cd \ +cls +echo. +echo 1. C1K_IL_Abbvie_Cage +echo 2. C1K_IL_Bindery +echo 3. C1K_IL_Careforward +echo 4. C1K_IL_PressRoom +echo 5. OSP Accounting +echo 6. OSP CSS +echo 7. OSP EPP +echo 8. OSP Main_Office +echo 9. OSP Press_Office +echo 10. OSP Quest +echo 11. OSP Shipping +echo. +echo Press Enter to go back +echo. + +set /p a= || set a=0 +IF %a%==0 goto CheckMappedDrive +IF %a%==1 goto C1K_IL_Abbvie_Cage +IF %a%==2 goto C1K_IL_Bindery +IF %a%==3 goto C1K_IL_Careforward +IF %a%==4 goto C1K_IL_PressRoom +IF %a%==5 goto OSP_Accounting +IF %a%==6 goto OSP_CSS +IF %a%==7 goto OSP_EPP +IF %a%==8 goto OSP_Main_Office +IF %a%==9 goto OSP_Press_Office +IF %a%==10 goto OSP_Quest +IF %a%==11 goto OSP_Shipping +goto RemovePrinter + +:C1K_IL_Abbvie_Cage +@echo on +RUNDLL32 PRINTUI.DLL,PrintUIEntry /gd /z /n"\\OSPFS02\C1K_IL_Abbvie_Cage" +@echo off +goto RemovePrinter + +:C1K_IL_Bindery +@echo on +RUNDLL32 PRINTUI.DLL,PrintUIEntry /gd /z /n"\\OSPFS02\C1K_IL_Bindery" +@echo off +goto RemovePrinter + +:C1K_IL_Careforward +@echo on +RUNDLL32 PRINTUI.DLL,PrintUIEntry /gd /z /n"\\OSPFS02\C1K_IL_Careforward" +@echo off +goto RemovePrinter + +:C1K_IL_PressRoom +@echo on +RUNDLL32 PRINTUI.DLL,PrintUIEntry /gd /z /n"\\OSPFS02\C1K_IL_PressRoom" +@echo off +goto RemovePrinter + +:OSP_Accounting +@echo on +RUNDLL32 PRINTUI.DLL,PrintUIEntry /gd /z /n"\\OSPFS02\OSP Accounting" +@echo off +goto RemovePrinter + +:OSP_CSS +@echo on +RUNDLL32 PRINTUI.DLL,PrintUIEntry /gd /z /n"\\OSPFS02\OSP CSS" +@echo off +goto RemovePrinter + +:OSP_EPP +@echo on +RUNDLL32 PRINTUI.DLL,PrintUIEntry /gd /z /n"\\OSPFS02\OSP EPP" +@echo off +goto RemovePrinter + +:OSP_Main_Office +@echo on +RUNDLL32 PRINTUI.DLL,PrintUIEntry /gd /z /n"\\OSPFS02\OSP Main_Office" +@echo off +goto RemovePrinter + +:OSP_Press_Office +@echo on +RUNDLL32 PRINTUI.DLL,PrintUIEntry /gd /z /n"\\OSPFS02\OSP Press_Office" +@echo off +goto RemovePrinter + +:OSP_Quest +@echo on +RUNDLL32 PRINTUI.DLL,PrintUIEntry /gd /z /n"\\OSPFS02\OSP Quest" +@echo off +goto RemovePrinter + +:OSP_Shipping +@echo on +RUNDLL32 PRINTUI.DLL,PrintUIEntry /gd /z /n"\\OSPFS02\OSP Shipping" +@echo off +goto RemovePrinter + +rem End +:End +exit diff --git a/InternetCheck.bat b/InternetCheck.bat new file mode 100644 index 0000000..432fe0f --- /dev/null +++ b/InternetCheck.bat @@ -0,0 +1,10 @@ +@echo off +set Address=google.com +:Loop +PING -n 5 127.0.0.1>nul +echo Pinging %Address% +%SystemRoot%\system32\ping.exe -n 1 %Address% | %SystemRoot%\system32\find.exe "TTL=" > NUL +if %ERRORLEVEL% EQU 0 goto :Loop +echo Trace route %Address% at %date% %time% >> D:\Scripts\InternetCheck\tracert.log +tracert %Address% >> D:\Scripts\InternetCheck\tracert.log +goto Loop \ No newline at end of file diff --git a/KerberosSingleSignOnPowershell.ps1 b/KerberosSingleSignOnPowershell.ps1 new file mode 100644 index 0000000..51f97f6 --- /dev/null +++ b/KerberosSingleSignOnPowershell.ps1 @@ -0,0 +1,26 @@ +# Add and import AD PowerShell +Add-WindowsFeature RSAT-AD-PowerShell +Import-Module ActiveDirectory + +# Host name of Windows Admin Center +$wac = "WinSrvr2019-01" + +# Server names and Cluster names that you want to manage with Windows Admin Center in your domain +$servers = "HyperVHost-01", "HyperVHost-02", "HyperVHost-03", "HyperVHost-04", "ADServer-01", "ADServer-02", "VeeamServer", "WinSrvr2019-01", "WinSrvr2019-02", "WinSrvr2019-03", "WinSrvr2004-01", "GamingPC", "LaptopPC", "MediaPC", "Win1020H2-01" + +# Get the identity object of WAC +$wacobject = Get-ADComputer -Identity $WAC + +# Set the resource-based kerberos constrained delegation for each node +foreach ($server in $servers) +{ +$serverObject = Get-ADComputer -Identity $server +Set-ADComputer -Identity $serverObject -PrincipalsAllowedToDelegateToAccount $wacobject +} + +pause + +# Clear KDC Cache +Invoke-Command -ComputerName $Servers -ScriptBlock { + klist purge -li 0x3e7 +} diff --git a/KillDellSupportAssist.bat b/KillDellSupportAssist.bat new file mode 100644 index 0000000..a53ea2a --- /dev/null +++ b/KillDellSupportAssist.bat @@ -0,0 +1 @@ +taskkill /f /im supportassist* \ No newline at end of file diff --git a/ListDirectoryNames.bat b/ListDirectoryNames.bat new file mode 100644 index 0000000..361d3f8 --- /dev/null +++ b/ListDirectoryNames.bat @@ -0,0 +1 @@ +dir /s/b/o:n/A:D > directorys.txt \ No newline at end of file diff --git a/LogReboots.bat b/LogReboots.bat new file mode 100644 index 0000000..1702802 --- /dev/null +++ b/LogReboots.bat @@ -0,0 +1 @@ +echo Rebooted = %time% %date%>> "D:\RebootLog.txt" \ No newline at end of file diff --git a/MoveAndCreateMicrosoftOfficeShortcuts.bat b/MoveAndCreateMicrosoftOfficeShortcuts.bat new file mode 100644 index 0000000..477963c --- /dev/null +++ b/MoveAndCreateMicrosoftOfficeShortcuts.bat @@ -0,0 +1,20 @@ +@echo on +mkdir "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office" +mkdir "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office\Microsoft Office Tools" +copy /y "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office Tools\*.*" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office\Microsoft Office Tools" +move /y "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Excel*.lnk" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office" +move /y "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\OneNote*.lnk" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office" +move /y "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Outlook*.lnk" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office" +move /y "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\PowerPoint*.lnk" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office" +move /y "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Publisher*.lnk" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office" +move /y "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Word*.lnk" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office" +move /y "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visio*.lnk" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office" +move /y "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Access*.lnk" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office" +move /y "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Project*.lnk" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office" +move /y "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Skype for Business.lnk" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office" +rem copy /y "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office\Excel.lnk" "C:\Users\Public\Desktop" +rem copy /y "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office\Outlook.lnk" "C:\Users\Public\Desktop" +rem copy /y "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office\PowerPoint.lnk" "C:\Users\Public\Desktop" +rem copy /y "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office\Word.lnk" "C:\Users\Public\Desktop" +del /f /s /q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office Tools" +rmdir /s /q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office Tools" diff --git a/NZBHycra2ClearDatabase.bat b/NZBHycra2ClearDatabase.bat new file mode 100644 index 0000000..e92983c --- /dev/null +++ b/NZBHycra2ClearDatabase.bat @@ -0,0 +1,6 @@ +net stop NzbHydra2 +timeout 3 >nul +copy /y "C:\NZBHydra2\data\database\nzbhydra.mv.db" "C:\NZBHydra2\data\database\nzbhydra.mv.db.bak" +del /f /s /q "C:\NZBHydra2\data\database\nzbhydra.mv.db" +net start NzbHydra2 +pause diff --git a/OpenVPNGUI.bat b/OpenVPNGUI.bat new file mode 100644 index 0000000..c37e222 --- /dev/null +++ b/OpenVPNGUI.bat @@ -0,0 +1,4 @@ +net stop FreeDNSUpdater +taskkill /f /im "FreeDNSUpdater.exe" + +start "" "C:\Program Files\OpenVPN\bin\openvpn-gui.exe" \ No newline at end of file diff --git a/PingDC.bat b/PingDC.bat new file mode 100644 index 0000000..570d5bc --- /dev/null +++ b/PingDC.bat @@ -0,0 +1 @@ +ping PIIDC01 /t \ No newline at end of file diff --git a/RebuildIconCache.bat b/RebuildIconCache.bat new file mode 100644 index 0000000..2cc64f2 --- /dev/null +++ b/RebuildIconCache.bat @@ -0,0 +1,29 @@ +@echo off +set iconcache=%localappdata%\IconCache.db + +echo The Explorer process must be killed to delete the Icon DB. +echo. +echo Please SAVE ALL OPEN WORK before continuing. +echo. +pause +echo. +If exist "%iconcache%" goto delID +echo. +echo Icon DB has already been deleted. +echo. +pause +exit /B + +:delID +echo Attempting to delete Icon DB... +echo. +ie4uinit.exe -ClearIconCache +taskkill /IM explorer.exe /F +del "%iconcache%" /A +del "%localappdata%\Microsoft\Windows\Explorer\iconcache*" /A +echo. +echo Icon DB has been successfully deleted. Please "restart your PC" now to rebuild your icon cache. +echo. +start explorer.exe +pause +exit /B diff --git a/RebuildThumbnailCache.bat b/RebuildThumbnailCache.bat new file mode 100644 index 0000000..491eace --- /dev/null +++ b/RebuildThumbnailCache.bat @@ -0,0 +1,29 @@ +@echo off +set thumbcache=%localappdata%\thumbCache.db + +echo The Explorer process must be killed to delete the Thumbnail DB. +echo. +echo Please SAVE ALL OPEN WORK before continuing. +echo. +pause +echo. +If exist "%thumbcache%" goto delID +echo. +echo Thumbnail DB has already been deleted. +echo. +pause +exit /B + +:delID +echo Attempting to delete Thumbnail DB... +echo. +ie4uinit.exe -ClearthumbCache +taskkill /IM explorer.exe /F +del "%thumbcache%" /A +del "%localappdata%\Microsoft\Windows\Explorer\thumbcache*" /A +echo. +echo thumb DB has been successfully deleted. Please "restart your PC" now to rebuild your thumb cache. +echo. +start explorer.exe +pause +exit /B diff --git a/RemoveAdobeServices.bat b/RemoveAdobeServices.bat new file mode 100644 index 0000000..5516d0e --- /dev/null +++ b/RemoveAdobeServices.bat @@ -0,0 +1,14 @@ +net stop AdobeARMservice +sc delete AdobeARMservice +net stop AGMService +sc delete AGMService +net stop AGSService +sc delete AGSService +taskkill /f /im "armsvc.exe" +rmdir /s /q "C:\Program Files (x86)\Common Files\Adobe\ARM" +schtasks /delete /tn "Adobe Acrobat Update Task" /f +reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v "AdobeAAMUpdater-1.0" /f +reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v "AdobeGCInvoker-1.0" /f +reg delete HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Run /v "Acrobat Assistant 8.0" /f +reg delete HKEY_CLASSES_ROOT\CLSID\{0E270DAA-1BE6-48F2-AC49-9B3763C629CE} /f +pause diff --git a/RemoveAllWindowsAppsButStore.ps1 b/RemoveAllWindowsAppsButStore.ps1 new file mode 100644 index 0000000..5aff27d --- /dev/null +++ b/RemoveAllWindowsAppsButStore.ps1 @@ -0,0 +1 @@ +Get-AppxPackage -AllUsers | where-object {$_.name notlike *store*} | Remove-AppxPackage \ No newline at end of file diff --git a/RemovePastDrives.bat b/RemovePastDrives.bat new file mode 100644 index 0000000..457995b --- /dev/null +++ b/RemovePastDrives.bat @@ -0,0 +1,2 @@ +mountvol /r +pause diff --git a/RemoveSafelyRemoveHardwareIcon/RemoveSafelyRemoveHardwareIcon.bat b/RemoveSafelyRemoveHardwareIcon/RemoveSafelyRemoveHardwareIcon.bat new file mode 100644 index 0000000..b2ec907 --- /dev/null +++ b/RemoveSafelyRemoveHardwareIcon/RemoveSafelyRemoveHardwareIcon.bat @@ -0,0 +1,4 @@ +REG ADD "HKLM\SYSTEM\CurrentControlSet\Enum\SCSI\Disk&Ven_WDC&Prod_WD60EZAZ-00ZGHB0\4&57848b2&0&020000" /v Capabilities /t REG_DWORD /d 96 /f +REG ADD "HKLM\SYSTEM\CurrentControlSet\Enum\SCSI\Disk&Ven_WDC&Prod_WD60EZAZ-00ZGHB0\5&b2ad9f5&0&020000" /v Capabilities /t REG_DWORD /d 96 /f +REG ADD "HKLM\SYSTEM\CurrentControlSet\Enum\SCSI\Disk&Ven_WDC&Prod_WD60EZAZ-00ZGHB0\5&b2ad9f5&0&030000" /v Capabilities /t REG_DWORD /d 96 /f +REG ADD "HKLM\SYSTEM\CurrentControlSet\Enum\SCSI\Disk&Ven_WDC&Prod_WD60EZRZ-00GZ5B1\4&57848b2&0&010000" /v Capabilities /t REG_DWORD /d 96 /f diff --git a/RemoveSafelyRemoveHardwareIcon/RemoveSafelyRemoveHardwareIcon.reg b/RemoveSafelyRemoveHardwareIcon/RemoveSafelyRemoveHardwareIcon.reg new file mode 100644 index 0000000..14a5d5f --- /dev/null +++ b/RemoveSafelyRemoveHardwareIcon/RemoveSafelyRemoveHardwareIcon.reg @@ -0,0 +1,13 @@ +Windows Registry Editor Version 5.00 + +[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\SCSI\Disk&Ven_WDC&Prod_WD60EZAZ-00ZGHB0\4&57848b2&0&020000] +"Capabilities"=dword:00000060 + +[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\SCSI\Disk&Ven_WDC&Prod_WD60EZAZ-00ZGHB0\5&b2ad9f5&0&020000] +"Capabilities"=dword:00000060 + +[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\SCSI\Disk&Ven_WDC&Prod_WD60EZAZ-00ZGHB0\5&b2ad9f5&0&030000] +"Capabilities"=dword:00000060 + +[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\SCSI\Disk&Ven_WDC&Prod_WD60EZRZ-00GZ5B1\4&57848b2&0&010000] +"Capabilities"=dword:00000060 diff --git a/RestartChatty.bat b/RestartChatty.bat new file mode 100644 index 0000000..c065dc7 --- /dev/null +++ b/RestartChatty.bat @@ -0,0 +1,7 @@ +@echo on +cd %~dp0 +taskkill /f /im "chatty.exe" +c: +cd "C:\Program Files (x86)\Chatty" +start "" Chatty.exe +exit diff --git a/RestartComputer.bat b/RestartComputer.bat new file mode 100644 index 0000000..b9ae87c --- /dev/null +++ b/RestartComputer.bat @@ -0,0 +1,3 @@ +taskkill /f /im "dontsleep.exe" +shutdown /r /t 10 +exit diff --git a/RestartDisplayFusion.bat b/RestartDisplayFusion.bat new file mode 100644 index 0000000..098eec3 --- /dev/null +++ b/RestartDisplayFusion.bat @@ -0,0 +1,38 @@ +::[Bat To Exe Converter] +:: +::YAwzoRdxOk+EWAjk +::fBw5plQjdCuDJHaK8WYiIQ1RcDSLP3+vFLAP1MH44OSUnmkUR/IzeZb9z6eHL+5d40brFQ== +::YAwzuBVtJxjWCl3EqQJgSA== +::ZR4luwNxJguZRRnk +::Yhs/ulQjdF+5 +::cxAkpRVqdFKZSzk= +::cBs/ulQjdF+5 +::ZR41oxFsdFKZSDk= +::eBoioBt6dFKZSDk= +::cRo6pxp7LAbNWATEpCI= +::egkzugNsPRvcWATEpCI= +::dAsiuh18IRvcCxnZtBJQ +::cRYluBh/LU+EWAnk +::YxY4rhs+aU+JeA== +::cxY6rQJ7JhzQF1fEqQJQ +::ZQ05rAF9IBncCkqN+0xwdVs0 +::ZQ05rAF9IAHYFVzEqQJQ +::eg0/rx1wNQPfEVWB+kM9LVsJDGQ= +::fBEirQZwNQPfEVWB+kM9LVsJDGQ= +::cRolqwZ3JBvQF1fEqQJQ +::dhA7uBVwLU+EWDk= +::YQ03rBFzNR3SWATElA== +::dhAmsQZ3MwfNWATElA== +::ZQ0/vhVqMQ3MEVWAtB9wSA== +::Zg8zqx1/OA3MEVWAtB9wSA== +::dhA7pRFwIByZRRnk +::Zh4grVQjdCuDJHaK8WYiIQ1RcDeBLmKqEqYgzfD+7P+To08RUfEDSorIzrWcNMQa+VXodI8Lw2lTl8VCCQNdHg== +::YB416Ek+ZW8= +:: +:: +::978f952a14a936cc963da21a135fa983 +taskkill /f /im "DisplayFusion.exe" +taskkill /f /im "DisplayFusionHookApp32.exe" +taskkill /f /im "DisplayFusionHookApp64.exe" +taskkill /f /im "DisplayFusionService.exe" +start "" "C:\Program Files (x86)\DisplayFusion\DisplayFusion.exe" diff --git a/RestartEmby.bat b/RestartEmby.bat new file mode 100644 index 0000000..d9f8f80 --- /dev/null +++ b/RestartEmby.bat @@ -0,0 +1,6 @@ +net stop EmbyServer +taskkill /f /im "EmbyServer.exe" +taskkill /f /im "embytray.exe" +net start EmbyServer +taskkill /f /im "embytray.exe" +exit diff --git a/RestartExplorer.bat b/RestartExplorer.bat new file mode 100644 index 0000000..55e2470 --- /dev/null +++ b/RestartExplorer.bat @@ -0,0 +1,3 @@ +taskkill /f /im "explorer.exe" +start explorer.exe +exit diff --git a/RestartExplorerAtLogin.bat b/RestartExplorerAtLogin.bat new file mode 100644 index 0000000..46e5d89 --- /dev/null +++ b/RestartExplorerAtLogin.bat @@ -0,0 +1,7 @@ +tasklist /FI "IMAGENAME eq explorer.exe" /NH | find /I /N "explorer.exe" >NUL +if "%ERRORLEVEL%"=="0" goto end +taskkill /f /im "explorer.exe" +start explorer.exe + +:end +exit diff --git a/RestartPlex.bat b/RestartPlex.bat new file mode 100644 index 0000000..7190df5 --- /dev/null +++ b/RestartPlex.bat @@ -0,0 +1,9 @@ +net stop "Plex Media Server" +net stop "PlexUpdateService" +taskkill /f /im "Plex Media Server.exe" +taskkill /f /im "PlexScriptHost.exe" +taskkill /f /im "Plex Tuner Service.exe" +taskkill /f /im "Plex Update Service.exe" +net start "Plex Media Server" +net start "PlexUpdateService" +exit diff --git a/RestartPowerPanelPersonal.bat b/RestartPowerPanelPersonal.bat new file mode 100644 index 0000000..25b8e07 --- /dev/null +++ b/RestartPowerPanelPersonal.bat @@ -0,0 +1,10 @@ +net stop "PowerPanel Personal Service Monitor" +net stop "PowerPanel Personal Service" +taskkill /f /im "PowerPanel Personal.exe" +taskkill /f /im "ppuser.exe" +timeout 5 >nul +c: +start "" "C:\Program Files (x86)\CyberPower PowerPanel Personal\PowerPanel Personal.exe" +start "" "C:\Program Files (x86)\CyberPower PowerPanel Personal\bin\ppuser.exe" +net start "PowerPanel Personal Service Monitor" +net start "PowerPanel Personal Service" \ No newline at end of file diff --git a/RestartRadarr.bat b/RestartRadarr.bat new file mode 100644 index 0000000..48c55a3 --- /dev/null +++ b/RestartRadarr.bat @@ -0,0 +1,3 @@ +net stop radarr +net start radarr +exit diff --git a/RestartSabnzbd.bat b/RestartSabnzbd.bat new file mode 100644 index 0000000..faec82a --- /dev/null +++ b/RestartSabnzbd.bat @@ -0,0 +1,7 @@ +net stop SABnzbd +taskkill /f /im "SABnzbd.exe" +net stop SABhelper +taskkill /f /im "SABnzbdhelper.exe" +net start SABnzbd +net start SABhelper +exit diff --git a/RestartSonarr.bat b/RestartSonarr.bat new file mode 100644 index 0000000..6f30d50 --- /dev/null +++ b/RestartSonarr.bat @@ -0,0 +1,3 @@ +net stop nzbdrone +net start nzbdrone +exit diff --git a/RestartqBittorrent.bat b/RestartqBittorrent.bat new file mode 100644 index 0000000..0b60c1d --- /dev/null +++ b/RestartqBittorrent.bat @@ -0,0 +1,5 @@ +net stop qBittorrent +taskkill /f /im "qbittorrent.exe" +net start qBittorrent +pause +exit diff --git a/RoboCopyFilesWithProgress.bat b/RoboCopyFilesWithProgress.bat new file mode 100644 index 0000000..c01760e --- /dev/null +++ b/RoboCopyFilesWithProgress.bat @@ -0,0 +1,10 @@ +@echo off +echo Set the source path +set /p Source= +echo Set the destination path +set /p Destination= +robocopy "%Source%" "%Destination%" /E /V /ETA /R:0 /W:0 /COPYALL +set Source= +set Destination= +pause +exit diff --git a/RobocopyDeleteFolder.bat b/RobocopyDeleteFolder.bat new file mode 100644 index 0000000..bb34200 --- /dev/null +++ b/RobocopyDeleteFolder.bat @@ -0,0 +1,14 @@ +@echo off +echo Path of folder to delete +set /p Destination= +cd /d %Destination% +cd .. +if not exist RobocopyDelete mkdir RobocopyDelete +@echo on +robocopy RobocopyDelete %Destination% /mir +rmdir /s /q RobocopyDelete +rmdir /s /q %Destination% +@echo off +set Destination= +pause +exit diff --git a/StartDellSupportAssistant.bat b/StartDellSupportAssistant.bat new file mode 100644 index 0000000..181943f --- /dev/null +++ b/StartDellSupportAssistant.bat @@ -0,0 +1,3 @@ +sc config SupportAssistAgent start= auto +net start SupportAssistAgent + diff --git a/StartOpenSSHAgent.bat b/StartOpenSSHAgent.bat new file mode 100644 index 0000000..f6f01ef --- /dev/null +++ b/StartOpenSSHAgent.bat @@ -0,0 +1,2 @@ +net start ssh-agent +exit \ No newline at end of file diff --git a/StartOpenSSHServer.bat b/StartOpenSSHServer.bat new file mode 100644 index 0000000..c926e33 --- /dev/null +++ b/StartOpenSSHServer.bat @@ -0,0 +1,2 @@ +net start sshd +exit \ No newline at end of file diff --git a/StartOpenVPN.bat b/StartOpenVPN.bat new file mode 100644 index 0000000..0ba1a07 --- /dev/null +++ b/StartOpenVPN.bat @@ -0,0 +1,16 @@ +start /wait cmd /c "D:\Scripts\StopDownloaders.bat" +cd \ +openvpn-gui.exe --command disconnect_all +taskkill /f /im "openvpn-gui.exe" +taskkill /f /im "openvpn.exe" +taskkill /f /im "openvpnserv.exe" +net stop "OpenVPNServiceInteractive" +net stop "OpenVPNServiceLegacy" +net stop "OpenVPNService" +timeout 10 >nul +ipconfig /flushdns +start openvpn-gui.exe --connect "USMidwest.ovpn" +timeout 30 >nul +ipconfig /flushdns +start /wait cmd /c "D:\Scripts\StartDownloaders.bat" +exit diff --git a/StartOpenVPNatBoot.bat b/StartOpenVPNatBoot.bat new file mode 100644 index 0000000..dec503e --- /dev/null +++ b/StartOpenVPNatBoot.bat @@ -0,0 +1,17 @@ +timeout 30 >nul +start /wait cmd /c "D:\Scripts\StopDownloaders.bat" +cd \ +openvpn-gui.exe --command disconnect_all +taskkill /f /im "openvpn-gui.exe" +taskkill /f /im "openvpn.exe" +taskkill /f /im "openvpnserv.exe" +net stop "OpenVPNServiceInteractive" +net stop "OpenVPNServiceLegacy" +net stop "OpenVPNService" +timeout 10 >nul +ipconfig /flushdns +start openvpn-gui.exe --connect "USMidwest.ovpn" +timeout 30 >nul +ipconfig /flushdns +start /wait cmd /c "D:\Scripts\StartDownloaders.bat" +exit diff --git a/StartPowerPanelPersonal.bat b/StartPowerPanelPersonal.bat new file mode 100644 index 0000000..69983bb --- /dev/null +++ b/StartPowerPanelPersonal.bat @@ -0,0 +1,43 @@ +::[Bat To Exe Converter] +:: +::YAwzoRdxOk+EWAjk +::fBw5plQjdCuDJHaK8WYiIQ1RcDSLP3+vFLAP1MH44OSUnn8YR/Y+apuV07eBQA== +::YAwzuBVtJxjWCl3EqQJgSA== +::ZR4luwNxJguZRRnk +::Yhs/ulQjdF+5 +::cxAkpRVqdFKZSzk= +::cBs/ulQjdF+5 +::ZR41oxFsdFKZSDk= +::eBoioBt6dFKZSDk= +::cRo6pxp7LAbNWATEpCI= +::egkzugNsPRvcWATEpCI= +::dAsiuh18IRvcCxnZtBJQ +::cRYluBh/LU+EWAnk +::YxY4rhs+aU+JeA== +::cxY6rQJ7JhzQF1fEqQJQ +::ZQ05rAF9IBncCkqN+0xwdVs0 +::ZQ05rAF9IAHYFVzEqQJQ +::eg0/rx1wNQPfEVWB+kM9LVsJDGQ= +::fBEirQZwNQPfEVWB+kM9LVsJDGQ= +::cRolqwZ3JBvQF1fEqQJQ +::dhA7uBVwLU+EWDk= +::YQ03rBFzNR3SWATElA== +::dhAmsQZ3MwfNWATElA== +::ZQ0/vhVqMQ3MEVWAtB9wSA== +::Zg8zqx1/OA3MEVWAtB9wSA== +::dhA7pRFwIByZRRnk +::Zh4grVQjdCuDJHaK8WYiIQ1RcDeBLmKqEqYgzfD+7P+To08RUfEDS5vayKC+L/cW+HXle5Mh5n9Ii8QCDRcWewquDg== +::YB416Ek+ZW8= +:: +:: +::978f952a14a936cc963da21a135fa983 +c: +taskkill /f /im "ppuser.exe" +taskkill /f /im "PowerPanel Personal.exe" +net stop "PowerPanel Personal Service" +net stop "PowerPanel Personal Service Monitor" +timeout 5 >nul +net start "PowerPanel Personal Service" +net start "PowerPanel Personal Service Monitor" +start "" "C:\Program Files (x86)\CyberPower PowerPanel Personal\PowerPanel Personal.exe" +start "" "C:\Program Files (x86)\CyberPower PowerPanel Personal\bin\ppuser.exe" diff --git a/StartPowerPanelPersonal.lnk b/StartPowerPanelPersonal.lnk new file mode 100644 index 0000000..22fcf04 Binary files /dev/null and b/StartPowerPanelPersonal.lnk differ diff --git a/StartSymantec.bat b/StartSymantec.bat new file mode 100644 index 0000000..be2c5a6 --- /dev/null +++ b/StartSymantec.bat @@ -0,0 +1,2 @@ +cd "C:\Program Files (x86)\Symantec\Symantec Endpoint Protection" +start smc -start \ No newline at end of file diff --git a/StopChrome.bat b/StopChrome.bat new file mode 100644 index 0000000..ddff2c3 --- /dev/null +++ b/StopChrome.bat @@ -0,0 +1 @@ +taskkill /f /im "chrome.exe" \ No newline at end of file diff --git a/StopDellSupportAssistant.bat b/StopDellSupportAssistant.bat new file mode 100644 index 0000000..f9d4244 --- /dev/null +++ b/StopDellSupportAssistant.bat @@ -0,0 +1,2 @@ +net stop SupportAssistAgent +sc config SupportAssistAgent start= disabled diff --git a/StopOpenSSHAgent.bat b/StopOpenSSHAgent.bat new file mode 100644 index 0000000..eb4c512 --- /dev/null +++ b/StopOpenSSHAgent.bat @@ -0,0 +1,2 @@ +net stop ssh-agent +exit \ No newline at end of file diff --git a/StopOpenSSHServer.bat b/StopOpenSSHServer.bat new file mode 100644 index 0000000..fea109c --- /dev/null +++ b/StopOpenSSHServer.bat @@ -0,0 +1,2 @@ +net stop sshd +exit \ No newline at end of file diff --git a/StopPlex.bat b/StopPlex.bat new file mode 100644 index 0000000..9b14d2f --- /dev/null +++ b/StopPlex.bat @@ -0,0 +1,7 @@ +net stop "Plex Media Server" +net stop "PlexUpdateService" +taskkill /f /im "Plex Media Server.exe" +taskkill /f /im "PlexScriptHost.exe" +taskkill /f /im "Plex Tuner Service.exe" +taskkill /f /im "Plex Update Service.exe" +exit diff --git a/StopPowerPanelPersonal.bat b/StopPowerPanelPersonal.bat new file mode 100644 index 0000000..9efed5a --- /dev/null +++ b/StopPowerPanelPersonal.bat @@ -0,0 +1,4 @@ +net stop "PowerPanel Personal Service Monitor" +net stop "PowerPanel Personal Service" +taskkill /f /im "PowerPanel Personal.exe" +taskkill /f /im "ppuser.exe" diff --git a/StopSymantec.bat b/StopSymantec.bat new file mode 100644 index 0000000..b226127 --- /dev/null +++ b/StopSymantec.bat @@ -0,0 +1,2 @@ +cd "C:\Program Files (x86)\Symantec\Symantec Endpoint Protection" +start smc -stop \ No newline at end of file diff --git a/SystemFilesCheck.bat b/SystemFilesCheck.bat new file mode 100644 index 0000000..38ff422 --- /dev/null +++ b/SystemFilesCheck.bat @@ -0,0 +1,3 @@ +cd %~dp0 +sfc /scannow +pause diff --git a/TakeOwnershipAndFullPermissions/TakeOwnershipAndFullPermissionsWindowsImageBackupDarthvader78.bat b/TakeOwnershipAndFullPermissions/TakeOwnershipAndFullPermissionsWindowsImageBackupDarthvader78.bat new file mode 100644 index 0000000..c3af7a7 --- /dev/null +++ b/TakeOwnershipAndFullPermissions/TakeOwnershipAndFullPermissionsWindowsImageBackupDarthvader78.bat @@ -0,0 +1,2 @@ +takeown /f D:\WindowsImageBackup /r /d y +icacls D:\WindowsImageBackup /grant akanealw\nwettstein:F /t diff --git a/TakeOwnershipAndFullPermissions/TakeOwnershipAndFullPermissionsWindowsImageBackupKodiPC.bat b/TakeOwnershipAndFullPermissions/TakeOwnershipAndFullPermissionsWindowsImageBackupKodiPC.bat new file mode 100644 index 0000000..c3af7a7 --- /dev/null +++ b/TakeOwnershipAndFullPermissions/TakeOwnershipAndFullPermissionsWindowsImageBackupKodiPC.bat @@ -0,0 +1,2 @@ +takeown /f D:\WindowsImageBackup /r /d y +icacls D:\WindowsImageBackup /grant akanealw\nwettstein:F /t diff --git a/VeeamBR-VeeamZIP/VeeamPowerShell.reg b/VeeamBR-VeeamZIP/VeeamPowerShell.reg new file mode 100644 index 0000000..08d36db --- /dev/null +++ b/VeeamBR-VeeamZIP/VeeamPowerShell.reg @@ -0,0 +1,12 @@ +Windows Registry Editor Version 5.00 + +[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellSnapIns\VeeamPSSnapIn] +"PowerShellVersion"="5.0" +"Vendor"="Veeam" +"Description"="This is a PowerShell snap-in that includes the Veeam's cmdlet." +"VendorIndirect"="VeeamPSSnapIn, Veeam" +"DescriptionIndirect"="VeeamPSSnapIn,This is a PowerShell snap-in that includes the Veeam's cmdlet." +"Version"="11.0.0.837" +"ApplicationBase"="C:\\Program Files\\Veeam\\Backup and Replication\\Backup" +"AssemblyName"="Veeam.Backup.PowerShell, Version=11.0.0.837, Culture=neutral, PublicKeyToken=bfd684de2276783a" +"ModuleName"="C:\\Program Files\\Veeam\\Backup and Replication\\Backup\\Veeam.Backup.PowerShell.dll" diff --git a/VeeamBR-VeeamZIP/VeeamPowerShell2.reg b/VeeamBR-VeeamZIP/VeeamPowerShell2.reg new file mode 100644 index 0000000..3f9d841 --- /dev/null +++ b/VeeamBR-VeeamZIP/VeeamPowerShell2.reg @@ -0,0 +1,12 @@ +Windows Registry Editor Version 5.00 + +[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellSnapIns\VeeamPSSnapIn] +"PowerShellVersion"="2.0" +"Vendor"="Veeam" +"Description"="This is a PowerShell snap-in that includes the Veeam's cmdlet." +"VendorIndirect"="VeeamPSSnapIn, Veeam" +"DescriptionIndirect"="VeeamPSSnapIn,This is a PowerShell snap-in that includes the Veeam's cmdlet." +"Version"="8.0.0.0" +"ApplicationBase"="C:\\Program Files\\Veeam\\Backup and Replication\\Backup" +"AssemblyName"="Veeam.Backup.PowerShell, Version=8.0.0.0, Culture=neutral, PublicKeyToken=bfd684de2276783a" +"ModuleName"="C:\\Program Files\\Veeam\\Backup and Replication\\Backup\\Veeam.Backup.PowerShell.dll" diff --git a/VeeamBR-VeeamZIP/VeeamZIP-HyperVHost-01-LinuxVMs.bat b/VeeamBR-VeeamZIP/VeeamZIP-HyperVHost-01-LinuxVMs.bat new file mode 100644 index 0000000..0608957 --- /dev/null +++ b/VeeamBR-VeeamZIP/VeeamZIP-HyperVHost-01-LinuxVMs.bat @@ -0,0 +1,3 @@ +cd /d %~dp0 +powershell -ExecutionPolicy Bypass -command .\VeeamZIP-HyperVHost-01-LinuxVMs.ps1 +exit 0 diff --git a/VeeamBR-VeeamZIP/VeeamZIP-HyperVHost-01-LinuxVMs.ps1 b/VeeamBR-VeeamZIP/VeeamZIP-HyperVHost-01-LinuxVMs.ps1 new file mode 100644 index 0000000..ba3fad2 --- /dev/null +++ b/VeeamBR-VeeamZIP/VeeamZIP-HyperVHost-01-LinuxVMs.ps1 @@ -0,0 +1,43 @@ +################################################################## +# User Defined Variables +################################################################## + +# Names of VMs to backup separated by comma (Mandatory). For instance, $VMNames = “VM1”,”VM2” +$VMNames = "HPV-01-DockerServer-01", "HPV-01-PiHoleServer-01", "HPV-01-ZabbixServer" + +# Name of vCenter or standalone host VMs to backup reside on (Mandatory) +$HostName = "HyperVHost-01.ad.akanealw.com" + +# Directory that VM backups should go to (Mandatory; for instance, C:\Backup) +$Directory = "\\hypervhost-01\veeamzipbackups" + +# Desired compression level (Optional; Possible values: 0 - None, 4 - Dedupe-friendly, 5 - Optimal, 6 - High, 9 - Extreme) +$CompressionLevel = "5" + +################################################################## +# End User Defined Variables +################################################################## + +Start-Sleep -Seconds 300 + +$Server = Get-VBRServer -name $HostName + +$VM = Find-VBRHvEntity -Name HPV-01-DockerServer-01 -Server $Server + +Start-VBRZip -Entity $VM -Folder $Directory -Compression $CompressionLevel + +Start-Sleep -Seconds 300 + +$Server = Get-VBRServer -name $HostName + +$VM = Find-VBRHvEntity -Name HPV-01-PiHoleServer-01 -Server $Server + +Start-VBRZip -Entity $VM -Folder $Directory -Compression $CompressionLevel + +Start-Sleep -Seconds 300 + +$Server = Get-VBRServer -name $HostName + +$VM = Find-VBRHvEntity -Name HPV-01-ZabbixServer -Server $Server + +Start-VBRZip -Entity $VM -Folder $Directory -Compression $CompressionLevel diff --git a/VeeamBR-VeeamZIP/VeeamZIP-HyperVHost-02-LinuxVMs.bat b/VeeamBR-VeeamZIP/VeeamZIP-HyperVHost-02-LinuxVMs.bat new file mode 100644 index 0000000..864552c --- /dev/null +++ b/VeeamBR-VeeamZIP/VeeamZIP-HyperVHost-02-LinuxVMs.bat @@ -0,0 +1,3 @@ +cd /d %~dp0 +powershell -ExecutionPolicy Bypass -command .\VeeamZIP-HyperVHost-02-LinuxVMs.ps1 +exit 0 diff --git a/VeeamBR-VeeamZIP/VeeamZIP-HyperVHost-02-LinuxVMs.ps1 b/VeeamBR-VeeamZIP/VeeamZIP-HyperVHost-02-LinuxVMs.ps1 new file mode 100644 index 0000000..25831bb --- /dev/null +++ b/VeeamBR-VeeamZIP/VeeamZIP-HyperVHost-02-LinuxVMs.ps1 @@ -0,0 +1,43 @@ +################################################################## +# User Defined Variables +################################################################## + +# Names of VMs to backup separated by comma (Mandatory). For instance, $VMNames = “VM1”,”VM2” +$VMNames = "HPV-02-DockerServer-02", "HPV-02-PiHoleServer-02", "HPV-02-ProxyServer" + +# Name of vCenter or standalone host VMs to backup reside on (Mandatory) +$HostName = "HyperVHost-02.ad.akanealw.com" + +# Directory that VM backups should go to (Mandatory; for instance, C:\Backup) +$Directory = "\\hypervhost-01\veeamzipbackups" + +# Desired compression level (Optional; Possible values: 0 - None, 4 - Dedupe-friendly, 5 - Optimal, 6 - High, 9 - Extreme) +$CompressionLevel = "5" + +################################################################## +# End User Defined Variables +################################################################## + +Start-Sleep -Seconds 300 + +$Server = Get-VBRServer -name $HostName + +$VM = Find-VBRHvEntity -Name HPV-02-DockerServer-02 -Server $Server + +Start-VBRZip -Entity $VM -Folder $Directory -Compression $CompressionLevel + +Start-Sleep -Seconds 300 + +$Server = Get-VBRServer -name $HostName + +$VM = Find-VBRHvEntity -Name HPV-02-PiHoleServer-02 -Server $Server + +Start-VBRZip -Entity $VM -Folder $Directory -Compression $CompressionLevel + +Start-Sleep -Seconds 300 + +$Server = Get-VBRServer -name $HostName + +$VM = Find-VBRHvEntity -Name HPV-02-ProxyServer -Server $Server + +Start-VBRZip -Entity $VM -Folder $Directory -Compression $CompressionLevel diff --git a/VeeamBR-VeeamZIP/VeeamZIP-HyperVHost-03-LinuxVMs.bat b/VeeamBR-VeeamZIP/VeeamZIP-HyperVHost-03-LinuxVMs.bat new file mode 100644 index 0000000..0a758be --- /dev/null +++ b/VeeamBR-VeeamZIP/VeeamZIP-HyperVHost-03-LinuxVMs.bat @@ -0,0 +1,3 @@ +cd /d %~dp0 +powershell -ExecutionPolicy Bypass -command .\VeeamZIP-HyperVHost-03-LinuxVMs.ps1 +exit 0 diff --git a/VeeamBR-VeeamZIP/VeeamZIP-HyperVHost-03-LinuxVMs.ps1 b/VeeamBR-VeeamZIP/VeeamZIP-HyperVHost-03-LinuxVMs.ps1 new file mode 100644 index 0000000..e8cdb59 --- /dev/null +++ b/VeeamBR-VeeamZIP/VeeamZIP-HyperVHost-03-LinuxVMs.ps1 @@ -0,0 +1,51 @@ +################################################################## +# User Defined Variables +################################################################## + +# Names of VMs to backup separated by comma (Mandatory). For instance, $VMNames = “VM1”,”VM2” +$VMNames = "HPV-03-DebianTest-01", "HPV-03-DebianTest-02", "HPV-03-DockerServer-03", "HPV-03-PiHoleServer-03" + +# Name of vCenter or standalone host VMs to backup reside on (Mandatory) +$HostName = "HyperVHost-03.ad.akanealw.com" + +# Directory that VM backups should go to (Mandatory; for instance, C:\Backup) +$Directory = "\\hypervhost-01\veeamzipbackups" + +# Desired compression level (Optional; Possible values: 0 - None, 4 - Dedupe-friendly, 5 - Optimal, 6 - High, 9 - Extreme) +$CompressionLevel = "5" + +################################################################## +# End User Defined Variables +################################################################## + +Start-Sleep -Seconds 300 + +$Server = Get-VBRServer -name $HostName + +$VM = Find-VBRHvEntity -Name HPV-03-DebianTest-01 -Server $Server + +Start-VBRZip -Entity $VM -Folder $Directory -Compression $CompressionLevel + +Start-Sleep -Seconds 300 + +$Server = Get-VBRServer -name $HostName + +$VM = Find-VBRHvEntity -Name HPV-03-DebianTest-02 -Server $Server + +Start-VBRZip -Entity $VM -Folder $Directory -Compression $CompressionLevel + +Start-Sleep -Seconds 300 + +$Server = Get-VBRServer -name $HostName + +$VM = Find-VBRHvEntity -Name HPV-03-DockerServer-03 -Server $Server + +Start-VBRZip -Entity $VM -Folder $Directory -Compression $CompressionLevel + +Start-Sleep -Seconds 300 + +$Server = Get-VBRServer -name $HostName + +$VM = Find-VBRHvEntity -Name HPV-03-PiHoleServer-03 -Server $Server + +Start-VBRZip -Entity $VM -Folder $Directory -Compression $CompressionLevel \ No newline at end of file diff --git a/VeeamBR-VeeamZIP/VeeamZIPHV_updated.ps1 b/VeeamBR-VeeamZIP/VeeamZIPHV_updated.ps1 new file mode 100644 index 0000000..4116d7f --- /dev/null +++ b/VeeamBR-VeeamZIP/VeeamZIPHV_updated.ps1 @@ -0,0 +1,115 @@ +# Author: Vladimir Eremin +# Created Date: 3/24/2015 +# http://forums.veeam.com/member31097.html +# + +################################################################## +# User Defined Variables +################################################################## + +# Names of VMs to backup separated by comma (Mandatory). For instance, $VMNames = “VM1”,”VM2” +$VMNames = "" + +# Name of vCenter or standalone host VMs to backup reside on (Mandatory) +$HostName = "" + +# Directory that VM backups should go to (Mandatory; for instance, C:\Backup) +$Directory = "" + +# Desired compression level (Optional; Possible values: 0 - None, 4 - Dedupe-friendly, 5 - Optimal, 6 - High, 9 - Extreme) +$CompressionLevel = "5" + +# Quiesce VM when taking snapshot (Optional; VMware Tools are required; Possible values: $True/$False) +$EnableQuiescence = $True + +# Protect resulting backup with encryption key (Optional; $True/$False) +$EnableEncryption = $True + +# Encryption Key (Optional; path to a secure string) +$EncryptionKey = "" + +# Retention settings (Optional; By default, VeeamZIP files are not removed and kept in the specified location for an indefinite period of time. +# Possible values: Never , Tonight, TomorrowNight, In3days, In1Week, In2Weeks, In1Month) +$Retention = "Never" + +################################################################## +# Notification Settings +################################################################## + +# Enable notification (Optional) +$EnableNotification = $True + +# Email SMTP server +$SMTPServer = "" + +# Email FROM +$EmailFrom = "" + +# Email TO +$EmailTo = "" + +# Email subject +$EmailSubject = "" + +################################################################## +# Email formatting +################################################################## + +$style = "" + +################################################################## +# End User Defined Variables +################################################################## + +#################### DO NOT MODIFY PAST THIS LINE ################ +Asnp VeeamPSSnapin + +$Server = Get-VBRServer -name $HostName +$MesssagyBody = @() + +foreach ($VMName in $VMNames) +{ + $VM = Find-VBRHvEntity -Name $VMName -Server $Server + + If ($EnableEncryption) + { + $EncryptionKey = Add-VBREncryptionKey -Password (cat $EncryptionKey | ConvertTo-SecureString) + $ZIPSession = Start-VBRZip -Entity $VM -Folder $Directory -Compression $CompressionLevel -DisableQuiesce:(!$EnableQuiescence) -AutoDelete $Retention -EncryptionKey $EncryptionKey + } + + Else + { + $ZIPSession = Start-VBRZip -Entity $VM -Folder $Directory -Compression $CompressionLevel -DisableQuiesce:(!$EnableQuiescence) -AutoDelete $Retention + } + + If ($EnableNotification) + { + $TaskSessions = $ZIPSession.GetTaskSessions().logger.getlog().updatedrecords + $FailedSessions = $TaskSessions | where {$_.status -eq "EWarning" -or $_.Status -eq "EFailed"} + + if ($FailedSessions -ne $Null) + { + $MesssagyBody = $MesssagyBody + ($ZIPSession | Select-Object @{n="Name";e={($_.name).Substring(0, $_.name.LastIndexOf("("))}} ,@{n="Start Time";e={$_.CreationTime}},@{n="End Time";e={$_.EndTime}},Result,@{n="Details";e={$FailedSessions.Title}}) + } + + Else + { + $MesssagyBody = $MesssagyBody + ($ZIPSession | Select-Object @{n="Name";e={($_.name).Substring(0, $_.name.LastIndexOf("("))}} ,@{n="Start Time";e={$_.CreationTime}},@{n="End Time";e={$_.EndTime}},Result,@{n="Details";e={($TaskSessions | sort creationtime -Descending | select -first 1).Title}}) + } + + } +} +If ($EnableNotification) +{ +$Message = New-Object System.Net.Mail.MailMessage $EmailFrom, $EmailTo +$Message.Subject = $EmailSubject +$Message.IsBodyHTML = $True +$message.Body = $MesssagyBody | ConvertTo-Html -head $style | Out-String +$SMTP = New-Object Net.Mail.SmtpClient($SMTPServer) +$SMTP.Send($Message) +} + diff --git a/WindowsAdminCenterPermissions.ps1 b/WindowsAdminCenterPermissions.ps1 new file mode 100644 index 0000000..5862121 --- /dev/null +++ b/WindowsAdminCenterPermissions.ps1 @@ -0,0 +1,24 @@ +# Add and import AD PowerShell +Add-WindowsFeature RSAT-AD-PowerShell +Import-Module ActiveDirectory + +# Host name of Windows Admin Center +$wac = "WinSrvr2019-02" + +# Server names and Cluster names that you want to manage with Windows Admin Center in your domain +$servers = "ADServer-01", "ADServer-02", "HyperVHost-01", "HyperVHost-02", "WinSrvr2019-01", "WinSrvr2019-02", "WinSrvr2019-03", "Win1020H2-01", "VeeamServer", "GamingPC", "LaptopPC", "MediaPC" + +# Get the identity object of WAC +$wacobject = Get-ADComputer -Identity $WAC + +# Set the resource-based kerberos constrained delegation for each node +foreach ($server in $servers) +{ +$serverObject = Get-ADComputer -Identity $server +Set-ADComputer -Identity $serverObject -PrincipalsAllowedToDelegateToAccount $wacobject +} + +# Clear KDC Cache +Invoke-Command -ComputerName $Servers -ScriptBlock { + klist purge -li 0x3e7 +} diff --git a/WindowsDefender/DisableWindowsDefender.ps1 b/WindowsDefender/DisableWindowsDefender.ps1 new file mode 100644 index 0000000..56cefb3 --- /dev/null +++ b/WindowsDefender/DisableWindowsDefender.ps1 @@ -0,0 +1 @@ +Set-MpPreference -DisableRealtimeMonitoring $true \ No newline at end of file diff --git a/WindowsDefender/EnableWindowsDefender.ps1 b/WindowsDefender/EnableWindowsDefender.ps1 new file mode 100644 index 0000000..c025e68 --- /dev/null +++ b/WindowsDefender/EnableWindowsDefender.ps1 @@ -0,0 +1 @@ +Set-MpPreference -DisableRealtimeMonitoring $false \ No newline at end of file diff --git a/WindowsUpdateDiagnostic.diagcab b/WindowsUpdateDiagnostic.diagcab new file mode 100644 index 0000000..5c17e90 Binary files /dev/null and b/WindowsUpdateDiagnostic.diagcab differ diff --git a/ZipFoldersToSeparateZipFiles/7ZipFolderstoIndividualZipFiles.txt b/ZipFoldersToSeparateZipFiles/7ZipFolderstoIndividualZipFiles.txt new file mode 100644 index 0000000..0647b5f --- /dev/null +++ b/ZipFoldersToSeparateZipFiles/7ZipFolderstoIndividualZipFiles.txt @@ -0,0 +1 @@ +for /D %d in (*.*) do 7z a -tzip "%d.zip" ".\%d\*" \ No newline at end of file diff --git a/ZipFoldersToSeparateZipFiles/UnzipAll.bat b/ZipFoldersToSeparateZipFiles/UnzipAll.bat new file mode 100644 index 0000000..cc67b00 --- /dev/null +++ b/ZipFoldersToSeparateZipFiles/UnzipAll.bat @@ -0,0 +1,8 @@ +@ECHO ON + +SET source=%~dp0 +FOR /F "TOKENS=*" %%F IN ('DIR /S /B "%source%\*.zip"') DO "C:\Program Files\7-Zip\7z.exe" x "%%~fF" -o"%%~pF\" +FOR /F "TOKENS=*" %%F IN ('DIR /S /B "%source%\*.7z"') DO "C:\Program Files\7-Zip\7z.exe" x "%%~fF" -o"%%~pF\" +FOR /F "TOKENS=*" %%F IN ('DIR /S /B "%source%\*.rar"') DO "C:\Program Files\7-Zip\7z.exe" x "%%~fF" -o"%%~pF\" +pause +EXIT
") + w.Writeline ("

") + w.Writeline ("

Shortcut Path"_ + & " Target Path"_ + & " Updated to"_ + & "
" & ""_ + & oldfull & "" & ""_ + & oldlink & "" & ""_ + & newlink & "