├── 3Ware RAID Controller- Enable the Cache └── cache-on.bat ├── AM - Password Leakage └── AM - Password Leakage.amp ├── AV Status ├── AV Status Deployment Fast Track 2_6.pdf ├── AVStatus.vbs ├── Monitoring 3rd Party AV with the AV Status Service.pdf └── Version History.txt ├── AVG - Quick or Full Scan ├── AVG8_Full_Scan.vbs └── AVG8_Quick_Scan.vbs ├── Add or Delete DNS Record ├── AMP_UPLOAD_READ_ME.txt ├── Add or Delete DNS Record.amp └── Add or Delete DNS Record.jpg ├── Agent Deploy ├── Agent Download.amp ├── ReadMe.txt ├── Using the Agent Clean Up Utility.docx ├── agentparam.bat └── installNableAgent.bat ├── Agent_Install ├── Agent_Install.bat └── Workstation.txt ├── Allow SNMP Queries from 127.0.0.1 └── SetSNMP.vbs ├── App - Unins - WinRAR.ps1 ├── Backup Cisco IOS Config └── BackupCiscoStartedConfig.vbs ├── Backup Event Log and Keep Achieves └── Backup Event Log and Keep Achieves.amp ├── Backup Exec Config Script └── BKUPEXEC.vbs ├── Brocade-Copy-to-TFTP └── Brocade Copy to TFTP.AMP ├── CCleaner └── CCleaner.vbs ├── Change Agent ApplianceID ├── Change appliance ID.txt └── ChangeApplianceID.vbs ├── Change Agent Customer ID ├── ChangeCustomerID.txt └── ChangeCustomerID.vbs ├── Change Local User Password └── ChangeLocalUserPassword.vbs ├── Change Windows Probe Password ├── Probe_change_credentials.vbs └── README.txt ├── Check For Windows Updates └── CheckForWindowsUpdates.vbs ├── Clean Temporary Files from All Profiles └── CleanAllProfilesTemp.vbs ├── Clean Windows Update Folder ├── AMP_UPLOAD_READ_ME.txt ├── Clean Windows Update Folder.amp └── Clean Windows Update Folder.jpg ├── Cleanup Windows Update └── CleanupWindowsUpdate.exe ├── Clear Print Spool ├── Clear Print Spool.amp └── Clear Print Spool.jpg ├── Codedrop └── RemoteControl.dll ├── Collect Network Adapter Statistics ├── AMP_UPLOAD_READ_ME.txt ├── Collect Network Statistics.amp └── Collect Network Statistics.jpg ├── Configure Windows SNMP └── ConfigSNMP.vbs ├── Defrag └── Defrag.bat ├── Delete Temporary Windows Files └── DeleteTempFiles.vbs ├── Delete-ultra-vnc-from-start-menu-batch-scripts ├── delete-ultra-vnc-from-start-menu-XP.bat └── delete-ultra-vnc-from-start-menu-win7.bat ├── Deploy LiveVault Agents ├── Installing LiveVault Agents through N-central.docx └── RegisterLiveVaultAgent.vbs ├── DeployTheNCAgent └── DeployTheNCAgent.ps1 ├── Detailed Mailbox Information ├── AMP_UPLOAD_READ_ME.txt ├── Detailed Mailbox Information.amp └── Detailed Mailbox Information.jpg ├── Download and Run File from URL ├── AMP_UPLOAD_READ_ME.txt ├── Download and Run File from URL.amp └── Download and Run File from URL.jpg ├── Enable and Disable UAC ├── DisableUAC.vbs ├── EnableUAC.vbs └── READ ME!.TXT ├── Enable and Reset Firewall └── Enable and Reset Firewall.amp ├── EnableDisable Windows Firewall ├── AMP_UPLOAD_READ_ME.txt ├── EnableDisable Windows Firewall.amp └── EnableDisable Windows Firewall.jpg ├── Exchange 2007 - Start All Services └── StartExchange2k7.bat ├── Exchange 2007 - Stop All Services └── StopExchange2K7.bat ├── Find Exchange Settings └── FindExchSettings.ps1 ├── Find External IP └── Find External IP.vbs ├── Find Mailboxes Larger than ├── AMP_UPLOAD_READ_ME.txt ├── Find Mailboxes Larger than.amp └── Find Mailboxes Larger than.jpg ├── Generic App Log File Maintenance ├── AMP_UPLOAD_READ_ME.txt ├── Trim Oldest Files from Folder.amp └── Trim Oldest Files from Folder.jpg ├── Get AD Users └── GetADUsers.bat ├── Get Domain Information └── Get Domain Information.amp ├── Get File from URL └── Get File from URL.amp ├── Get Script Output Auto ├── GetScriptOutputAuto.ps1 └── README.md ├── Get Wireless Statistics └── Get Wireless Statistics.amp ├── Get-AVDefenderErrorMessage.ps1 ├── Get-PublicIP-JSON.ps1 ├── Get-PublicIPandGeoLocation.amp ├── Get-WindowsCUInstalled.ps1 ├── Huntress Agent └── Get-HuntressOrphanedAgent.ps1 ├── Import Registry File ├── AMP_UPLOAD_READ_ME.txt ├── Import Registry File.amp └── Import Registry File.jpg ├── Install Office 365.amp ├── Install PowerShell 3 └── installPS30.ps1 ├── Install Take Control └── Install-TakeControl-Generic.ps1 ├── Install Windows Update Agent ├── Install Windows Update Agent.amp └── Install Windows Update Agent.zip ├── Install-WindowsUpdates-WUCatalog └── Install-WindowsUpdates-WUSA.ps1 ├── Intel Chipset Upgrade Script ├── IUS-Nablev1.pdf ├── inv.bat └── upg.bat ├── Internet Speedtest └── Get-InternetSpeedTest-Ookla.ps1 ├── Lock and Unlock USB ├── lock.vbs └── unlock.vbs ├── Logoff Users-Lock Workstation ├── AMP_UPLOAD_READ_ME.txt ├── Logoff Users-Lock Workstation.amp └── Logoff Users-Lock Workstation.jpg ├── Mac-Download-and-Install-FF ├── Mac -Download and Install FF.amp └── Mac -Download and Install Firefox.pdf ├── Mac-Download-and-Install-Java ├── Mac - Download and Install Java.amp └── Mac -Download and Install Java.pdf ├── MacEnableRemoteManagement ├── MacEnableRemoteManagement.amp └── MacEnableRemoteManagement.pdf ├── Managed Server Maintenance ├── AMP_UPLOAD_READ_ME.txt ├── Managed Server Maintenance.amp └── Managed Server Maintenance.jpg ├── Managed Workstation Maint ├── AMP_UPLOAD_READ_ME.txt ├── Managed Workstation Maint.amp └── Managed Workstation Maint.jpg ├── Map User Specific Network Drive └── Map User Specific Network Drive.amp ├── McAfee Update └── mcafeeupdate.bat ├── Multiple NC Agents ├── Cleanup-OldNCAgentVersions.ps1 └── Get-NCAgentVersions.amp ├── N-Central PME Services └── Get-PMEServices.ps1 ├── NAbleAgent_GoldImage_Deploy.ps1 ├── Open FTP Ports in Windows Firewall └── OpenFTP.bat ├── Parse Script Output ├── ConcatCSV.ps1 └── README ├── Patch Status - PME Detection └── Get-NCPME-PatchDetectionDetails.ps1 ├── Powershell Set Execution Policy to allow running scripts ├── PowershellAllowRunningScripts.bat └── PowershellAllowRunningScripts.pdf ├── Powershell Version check and update - AMP, service, and templates.7z ├── Purge old files └── Purge old files.amp ├── README.md ├── Reboot Required └── Reboot Required 2.0.amp ├── Reboot Windows └── RebootWindows.vbs ├── Remove AV Entries in WMI └── Remove AV Entries in WMI.vbs ├── Repair-PME ├── LatestVersion.xml ├── README.md └── Repair-PME.ps1 ├── Reset WMI └── ResetWMI.vbs ├── Reset Windows Update └── Reset Windows Update.amp ├── Reset_Probe_Password ├── AMP_UPLOAD_READ_ME.txt ├── Reset_Probe_Password.jpg └── Reset_Probe_Password_v2.amp ├── Restore Point Maintenance └── Restore Point Maintenance.amp ├── Run CleanMgr ├── AMP_UPLOAD_READ_ME.txt ├── Run CleanMgr.amp └── Run CleanMgr.jpg ├── Run MalwareBytes └── RunMalwareBytes.vbs ├── Run Sophos Scan ├── SophosScanXPVistaWin7Srv2k3Srv2k8x32.bat.txt └── SophosScanXPVistaWin7Srv2k3Srv2k8x64.bat.txt ├── Run Trend Micro Disk Cleaner └── RunTMDiskCleaner.vbs ├── Run Windows Defender Scan └── RunDefender.vbs ├── RunSpyBot-Split ├── RunSpyBot.vbs └── RunSpyBotUPD.vbs ├── Runbook - CleanupAndDeploy v3.3 ├── AgentCleanup.exe ├── Using the Agent Clean Up Utility.docx └── installNableAgent.bat ├── Runbook - KaseyaMigrationandRemoval └── KaseyaMigrationandRemoval.exe ├── SQL Optimization ├── AMP_UPLOAD_READ_ME.txt ├── SQL Optimization.amp └── SQL Optimization.jpg ├── Scripting Examples ├── CreateARegistryValue.vbs ├── CreateEventLogEntry.vbs ├── DeleteARegistryValue.vbs ├── ReadARegistryValue.vbs ├── RunAnApplication.vbs ├── WriteARegistryValue.vbs └── WriteDataToATextFile.vbs ├── Security Manager Patch Removal └── Security Manager Patch Removal.amp ├── SentinelOne Agent Status ├── Get-SentinelOneStatusv6.ps1 └── SentinelOne Status v13.amp ├── Server Maintenance ├── AMP_UPLOAD_READ_ME.txt ├── Server Maintenance.amp └── Server Maintenance.jpg ├── Set DNS Scavenging ├── AMP_UPLOAD_READ_ME.txt ├── Set DNS Scavenging.amp └── Set DNS Scavenging.jpg ├── Set Power Plan and Screensaver └── Set Power Plan and Screensaver.amp ├── Set Power Plan ├── AMP_UPLOAD_READ_ME.txt ├── Set Power Plan.amp └── Set Power Plan.jpg ├── Set-Default-Printer ├── AMP_UPLOAD_READ_ME.txt ├── Set Default Printer.amp └── Set Default Printer.jpg ├── Sophos-Removal-Script └── Sophos-Removal-Script.bat ├── Start Blackberry Services └── blackberryStart.bat ├── StaticDNSServer └── StaticDNSServer.vbs ├── Stop Blackberry Services └── BlackberryStop.bat ├── Stop-Run-Start the Windows Agent └── StopRunStart - Win Update Clean.vbs ├── Symantec-Endpoint-Protection-Removal └── Symantec-Endpoint-Protection-Removal.amp ├── Sync Time ├── AMP_UPLOAD_READ_ME.txt ├── Sync Time.amp └── Sync Time.jpg ├── Take Control Agent Info ├── Get-TakeControlAgentInfo (AMP).amp └── Get-TakeControlAgentInfo.ps1 ├── Uninstall Connect2Help └── RemoveConnect2Help.exe ├── Uninstall Google Toolbar (Internet Explorer ONLY) └── Uninstall Google Toolbar IE.vbs ├── Uninstall N-Central Agent └── Uninstall-NCentralAgent.ps1 ├── Uninstall Program └── Uninstall program.amp ├── Uninstall Yahoo Toolbar (for Internet Explorer) └── Uninstall Yahoo Toolbar (for Internet Explorer).vbs ├── Uninstall iTunes and associated services └── Uninstall iTunes and associated services.vbs ├── Uninstall the 'Ask Jeeves' Toolbar └── AskJeeves.vbs ├── Uninstall-AVG-Antivirus └── Uninstall-AVG-Antivirus.amp ├── Uninstall-AVG ├── README.txt └── UninstallAVG.vbs ├── Uninstall-CA └── Uninstall CA.vbs ├── Uninstall-DellSupportAssistant.ps1 ├── Uninstall-Kaspersky └── Uninstall-Kaspersky.amp ├── Uninstall-MalwareBytes └── Uninstall-MalwareBytes.amp ├── Uninstall-McAfee └── Uninstall McAfee.bat ├── Uninstall-Microsoft-Security-Essentials └── UninstallMSSecurityEssentials.vbs ├── Uninstall-Sophos-9 └── Uninstall Sophos 9.bat ├── Uninstall-Symantec-Endpoint-Security-11 └── UninstallSymantecES.vbs ├── Uninstall-Teamviewer └── Uninstall Teamviewer.amp ├── Uninstall-Trend-Micro-Internet-Security-2008 └── UninstallTrend.vbs ├── Uninstall-Trend-Worry-Free └── Uninstall Trend Worry Free.vbs ├── Unlock AD User └── UnlockUser.vbs ├── Update Windows Defender Defs └── UpdateDefender.vbs ├── Upload Agent Logs to N-able Support └── Upload Agent Logs to N-able Support.amp ├── Vipre - Quick or Full Scans ├── Vipre - Deep Scan.vbs └── Vipre - Quick Scan.vbs ├── Vulnerability - CVE-2021-44228 (Log4j) └── get-log4jrcevulnerability.ps1 ├── WSUS - Delete Existing Settings └── wsusdelete.bat ├── WSUS - Display WSUS Settings in Notepad └── wsussettings.bat ├── WSUS - Report to WSUS Server └── wsusrestart.bat ├── WSUS Config Script └── WSUSUpdate.vbs ├── WikiFiles └── Repair-PME │ ├── Patch_Status_v2_Misconfigured.png │ ├── Repair-PME-Demo.gif │ ├── Repair-PME_Logo.png │ ├── Repair-PME_Logo_Small.png │ └── temp ├── Windows 11 22H2 Compatibility ├── Get-Win11-22H2Compatibility.amp └── Get-Win11-22H2Compatibility.ps1 ├── Windows Disk Cleaner └── DiskcCleaner.vbs ├── Windows Support Status ├── Get-WindowsSupportStatus (AMP).amp ├── Get-WindowsSupportStatus.ps1 ├── Service Template - Windows Support Status - Laptops.zip ├── Service Template - Windows Support Status - Servers.zip ├── Service Template - Windows Support Status - Workstations.zip └── Windows Support Status.xml ├── Windows Update - Search Download and Install └── WUA_SearchDownloadInstall.vbs ├── Windows Update Agent Current ├── ReadMe.md └── Windows Update Agent Current.zip ├── Windows-Update-Agent-Upgrade ├── WUAUpgrade-v03.exe └── Windows Update Agent Upgrade Process.pdf ├── Workstation Maintenance ├── AMP_UPLOAD_READ_ME.txt ├── Workstation Maintenance.amp └── Workstation Maintenance.jpg ├── install_net45_ps40 ├── installPS40.ps1 └── installnet45.ps1 ├── mbsa_install └── mbsa_install.vbs └── reconfigWMI └── reconfigWMI.bat /3Ware RAID Controller- Enable the Cache/cache-on.bat: -------------------------------------------------------------------------------- 1 | "C:\program Files\AMCC\CLI\tw_cli" set cache c0 u0 on -------------------------------------------------------------------------------- /AV Status/AV Status Deployment Fast Track 2_6.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/AV Status/AV Status Deployment Fast Track 2_6.pdf -------------------------------------------------------------------------------- /AV Status/Monitoring 3rd Party AV with the AV Status Service.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/AV Status/Monitoring 3rd Party AV with the AV Status Service.pdf -------------------------------------------------------------------------------- /AV Status/Version History.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/AV Status/Version History.txt -------------------------------------------------------------------------------- /AVG - Quick or Full Scan/AVG8_Full_Scan.vbs: -------------------------------------------------------------------------------- 1 | '########################################## 2 | '# Copyright 2009 by N-able Technologies # 3 | '# All Rights Reserved # 4 | '# May not be reproduced or redistributed # 5 | '# Without written consent from N-able # 6 | '# Technologies # 7 | '# www.n-able.com # 8 | '########################################## 9 | 10 | 11 | ' Script Name: AVG - Full Scan.vbs 12 | ' Version: 1.1 13 | ' Author: Chris Reid and Eli Selig 14 | ' Date: Oct. 1st, 2009 15 | ' Description: This script will auto-update AVG 8.x, and then have AVG do a complete scan and auto-clean of the device. 16 | 17 | 18 | dim wshShell, wshSysEnv, ProgramFiles, Executable, updatecmd, scancmd, OSType 19 | 20 | 21 | 22 | 'STEP 1: Determine whether this is a 32-bit machine or a 64-bit machine 23 | Set wshShell = WScript.CreateObject("WScript.Shell") 24 | Set wshSysEnv = wshShell.Environment("PROCESS") 25 | ProgramFiles = wshSysEnv("ProgramFiles") 26 | OsType = WshShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE") 27 | 28 | ' Determine if (x86) 29 | If OSType= "x86" then 30 | Executable = "avgscanx.exe" ' The 32-bit executable for AVG is avgscanx.exe 31 | Else 32 | Executable = "avgscana.exe" ' The 64-bit executable for AVG is avgscana.exe 33 | End If 34 | 35 | 36 | 37 | 38 | ' Get AVG to auto-update 39 | Set wshShell = CreateObject("Wscript.Shell") 40 | updatecmd = chr(34) & ProgramFiles & "\avg\avg8\avgupd.exe" & chr(34) & " /sched=4" 41 | wshShell.Run updatecmd,7,TRUE 42 | Set wshShell = Nothing 43 | 44 | 45 | 46 | ' Scan the entire PC and auto-clean everything 47 | Set wshShell = CreateObject("Wscript.Shell") 48 | scancmd = CHR(34) & ProgramFiles & "\avg\avg8\" & Executable & CHR(34) & " /COMP /CLEAN /PRIORITY HIGH/" 49 | wshShell.Run scancmd,7,TRUE 50 | Set wshShell = Nothing 51 | 52 | 53 | 54 | 'Clear all the variables that were used 55 | Set wshShell = Nothing 56 | Set wshSysEnv = Nothing 57 | Set ProgramFiles = Nothing 58 | Set Executable = Nothing 59 | Set updatecmd = Nothing 60 | Set scancmd = Nothing 61 | Set OSType = Nothing -------------------------------------------------------------------------------- /AVG - Quick or Full Scan/AVG8_Quick_Scan.vbs: -------------------------------------------------------------------------------- 1 | '########################################## 2 | '# Copyright 2009 by N-able Technologies # 3 | '# All Rights Reserved # 4 | '# May not be reproduced or redistributed # 5 | '# Without written consent from N-able # 6 | '# Technologies # 7 | '# www.n-able.com # 8 | '########################################## 9 | 10 | 11 | ' Script Name: AVG - Full Scan.vbs 12 | ' Version: 1.1 13 | ' Author: Chris Reid and Eli Selig 14 | ' Date: Oct. 1st, 2009 15 | ' Description: This script will auto-update AVG 8.x, and then have AVG do a complete scan and auto-clean of the device. 16 | 17 | 18 | 19 | ' Let's declare some variables 20 | Option Explicit 21 | dim wshShell, wshSysEnv, ProgramFiles, Executable, updatecmd, scancmd, OSType 22 | 23 | 24 | 25 | 'STEP 1: Determine whether this is a 32-bit machine or a 64-bit machine 26 | Set wshShell = WScript.CreateObject("WScript.Shell") 27 | Set wshSysEnv = wshShell.Environment("PROCESS") 28 | ProgramFiles = wshSysEnv("ProgramFiles") 29 | OsType = WshShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE") 30 | 31 | ' Determine if (x86) 32 | If OSType= "x86" then 33 | Executable = "avgscanx.exe" ' The 32-bit executable for AVG is avgscanx.exe 34 | Else 35 | Executable = "avgscana.exe" ' The 64-bit executable for AVG is avgscana.exe 36 | End If 37 | 38 | 39 | 40 | 41 | ' Get AVG to auto-update 42 | Set wshShell = CreateObject("Wscript.Shell") 43 | updatecmd = chr(34) & ProgramFiles & "\avg\avg8\avgupd.exe" & chr(34) & " /sched=4" 44 | wshShell.Run updatecmd,7,TRUE 45 | Set wshShell = Nothing 46 | 47 | 48 | 49 | ' Scan the entire PC and auto-clean everything 50 | Set wshShell = CreateObject("Wscript.Shell") 51 | scancmd = chr(34) & ProgramFiles & "\avg\avg8\" & Executable & CHR(34) & " /QT /CLEAN /PRIORITY HIGH/" 52 | wshShell.Run scancmd,7,TRUE 53 | Set wshShell = Nothing 54 | 55 | 56 | 57 | 'Clear all the variables that were used 58 | Set wshShell = Nothing 59 | Set wshSysEnv = Nothing 60 | Set ProgramFiles = Nothing 61 | Set Executable = Nothing 62 | Set updatecmd = Nothing 63 | Set scancmd = Nothing 64 | set OSType= Nothing -------------------------------------------------------------------------------- /Add or Delete DNS Record/AMP_UPLOAD_READ_ME.txt: -------------------------------------------------------------------------------- 1 | There are two methods to upload an Automation Policy (AMP) into N-central. Choose one of the following methods: 2 | 3 | How to upload AMP directly into N-central: 4 | 5 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 6 | 2. Choose on the OS Level from top-left drop down 7 | 3. Expand Configuration Pane -> Scheduled Tasks -> Script/Software Repository 8 | 4. Click Add -> Select Automation Policy 9 | 5. Click Browse -> Select .AMP 10 | 6. Click OK -> OK 11 | 12 | 13 | 14 | How to upload AMP through Automation Designer into N-central: 15 | 16 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 17 | 2. Choose on the OS Level from top-left drop down 18 | 3. From Actions Pane -> Click Start Automation Manager 19 | 4. From within the Automation Manager Designer, choose File -> Open 20 | 5. Browse to .AMP 21 | 6. Click OK 22 | 7. From within the Automation Manager Designer, choose File -> Upload -------------------------------------------------------------------------------- /Add or Delete DNS Record/Add or Delete DNS Record.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Add or Delete DNS Record/Add or Delete DNS Record.jpg -------------------------------------------------------------------------------- /Agent Deploy/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ############################################################### 2 | # Agent Download - A modified Cleanup and Deploy # 3 | # Created by" Evan Morrissey with CommPutercations Inc # 4 | # Last Updated: 2013-06-05 # 5 | ############################################################### 6 | 7 | Refer to N-Able's "Using the Agent Clean Up Utility" document for general setup of the Clean Up and Deploy. This modifies that setup to automate updating the Agent installer and script parameters when the N-Central server is updated. 8 | 9 | To modify your existing Cleanup and Deploy setup: 10 | 11 | - Edit agentparam.bat to include the correct server address, customerID and minVersion for your N-Central server and the customer site. 12 | - Copy agentparam.bat and the provided installNableAgent.bat to the share you are using for your Cleanup and Deploy. 13 | - Open Group Policy and edit the Group Policy Object for Cleanup and Deploy 14 | - Navigate to Computer Configuratino > Windows Settings > Scripts (Startup/Shutdown) > Startup 15 | - Edit the Cleanup and Deploy startup script so the ONLY parameter passed to the script is the share name 16 | - e.g. myservername\netlogon or mydomain.local\netlogon. I recommend you use mydomain.tld\netlogon if this customer has multiple domain controlers at branch offices as the PCs will get the files from the "nearest" DC. 17 | - Upload "Agent Download.amp" to your N-Central and create a task to run this Automation Policy. This can be recurring, or can be run manually after an update to your N-Central server. 18 | - AMP takes 3 parameters: 19 | - Version: enter the current version of your N-Central. Note that this is also used to download the Agent from your server, so if it is not accurate the policy will not work properly. 20 | - Server: your N-Central server address 21 | - Temp Local Path: A folder on the server, this is just to download the Agent to before copying it to the netlogon folder. This is just done to avoid unsightly permissions problems. 22 | 23 | 24 | When you update your N-Central server you will just need to modify the Version parameter and re-run the policy. When devices reboot they should be installing the latest agent! -------------------------------------------------------------------------------- /Agent Deploy/Using the Agent Clean Up Utility.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Agent Deploy/Using the Agent Clean Up Utility.docx -------------------------------------------------------------------------------- /Agent Deploy/agentparam.bat: -------------------------------------------------------------------------------- 1 | SET "server=noc.server.tld" 2 | SET "customerID=100" 3 | SET "minVersion=9.2.0.380" 4 | -------------------------------------------------------------------------------- /Agent Deploy/installNableAgent.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cls 3 | 4 | title Installing N-able Remote Monitoring Software 5 | 6 | REM SET "server=%1" 7 | REM SET "customerID=%2" 8 | SET "installerLocation=%1" 9 | REM SET "minVersion=%4" 10 | CALL \\%installerLocation%\agentparam.bat 11 | 12 | SET "alreadyInstalled=The N-able Agent is installed" 13 | SET "notInstalled=The N-able Agent is not yet installed, installing it now..." 14 | SET "programFiles=c:\program files" 15 | SET "cleanUp=Removing old Agent..." 16 | SET "missingArgs=One or more parameters were not specified" 17 | SET "counter=0" 18 | 19 | 20 | 21 | REM Check to see if its x86 or x64 22 | IF %PROCESSOR_ARCHITECTURE% EQU AMD64 ( SET "programFiles=%programFiles% (x86)" ) 23 | 24 | REM Debug Information 25 | echo %server% 26 | echo %customerID% 27 | echo %installerLocation% 28 | echo %programFiles% 29 | echo %minVersion% 30 | 31 | IF %server% == "" GOTO ERROR 32 | IF %customerID% == "" GOTO ERROR 33 | IF %installerLocation% == "" GOTO ERROR 34 | IF %minVersion% == "" GOTO ERROR 35 | 36 | \\%installerLocation%\AgentCleanup.exe %minVersion% 37 | GOTO CONTINUE 38 | 39 | :CONTINUE 40 | IF %counter% == 2 GOTO END 41 | IF NOT EXIST "%programFiles%\N-Able Technologies\Windows Agent\bin\agent.exe" ( GOTO INSTALL ) else ( GOTO AlreadyInstalled ) 42 | GOTO END 43 | 44 | :INSTALL 45 | echo %notInstalled% 46 | \\%installerLocation%\WindowsAgentSetup.exe /s /v" /qn CUSTOMERID=%customerID% CUSTOMERSPECIFIC=1 SERVERPROTOCOL=HTTPS SERVERADDRESS=%server% SERVERPORT=443" 47 | set /a counter=counter+1 48 | GOTO CONTINUE 49 | 50 | :AlreadyInstalled 51 | echo %AlreadyInstalled% 52 | GOTO END 53 | 54 | :ERROR 55 | echo %missingArgs% 56 | 57 | :END 58 | -------------------------------------------------------------------------------- /Agent_Install/Agent_Install.bat: -------------------------------------------------------------------------------- 1 | '########################################### 2 | '# Written by Mark Mays - KKI Technologies # 3 | '# Free to use for N-Able Parnters # 4 | '########################################### 5 | 6 | 7 | 8 | ' Batch File Name: Agent Install 9 | ' Description: This batch file will install the agent with the following parameters: 10 | ' 11 | ' net use "Drive Letter" - this is mapping a drive letter where you have the agent copied 12 | ' locally on the customer network 13 | ' m="Drive Letter":\Filename.txt - Points to the location where you have the text file created (see 2nd attachment) 14 | ' The last line delets the mapped drive 15 | 16 | 17 | net use o: \\server\sharename 18 | o:\windowsagentsetup.exe /s /m=o:\devicename.txt 19 | net use o: /delete -------------------------------------------------------------------------------- /Agent_Install/Workstation.txt: -------------------------------------------------------------------------------- 1 | '########################################### 2 | '# Written by Mark Mays - KKI Technologies # 3 | '# Free to use for N-Able Parnters # 4 | '########################################### 5 | 6 | 7 | 8 | ' Text File Name: Workstation.txt 9 | ' Description: This text file sets the following parameters to work along with the Agent_Install.bat file 10 | ' 11 | ' key="Key code" --- paste the agent key from the UI here 12 | ' MAINDIR="install path" - This is the path where you want the agent to be installed to. 13 | 14 | 15 | KEY=aHR0cHM6Ly9tb25pdG9yaW5nLmtraXRlY2hub2xvZ2llcy5jb206NDQzfDUyMzM0fDF8MA== 16 | MAINDIR=%PROGRAMFILES%\nable_agent\ -------------------------------------------------------------------------------- /Allow SNMP Queries from 127.0.0.1/SetSNMP.vbs: -------------------------------------------------------------------------------- 1 | '########################################## 2 | '# Copyright 2009 by N-able Technologies # 3 | '# All Rights Reserved # 4 | '# May not be reproduced or redistributed # 5 | '# Without written consent from N-able # 6 | '# Technologies # 7 | '# www.n-able.com # 8 | '########################################## 9 | 10 | 11 | ' Script Name: SetSNMP.vbs 12 | ' Author: Chris Reid 13 | ' Date: March 5th, 2009 14 | ' Description: This VBS script will add localhost (127.0.0.1) as a host from which the device will accept SNMP queries. 15 | ' Version: 1.0 16 | 17 | 18 | 'Let's declare some variables 19 | option explicit 20 | dim strComputer, Host, strKeyPath, Count, arrValueNames,arrValueTypes, objReg, KeyPresenceTest 21 | Const HKEY_LOCAL_MACHINE = &H80000002 22 | strComputer = "." 23 | strKeyPath = "SYSTEM\CurrentControlSet\Services\SNMP\Parameters\PermittedManagers" 24 | Host = "127.0.0.1" 25 | 26 | 27 | 'Access the registry through WMI 28 | Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv") 29 | 30 | 31 | 'Find out how many hosts already exist, so that the script creates an entry with the right Name 32 | '(each entry has a numerical Name in the registry, starting with 1) 33 | objReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,1,KeyPresenceTest 34 | 35 | 'This next line tests to see whether the entry (define by KeyPresenceTest) is null or not 36 | If isNull (KeyPresenceTest) Then 37 | 'Because the value is null, the registry entry we create needs to have a Name of 1 38 | Count = 1 39 | Else 40 | 'Get the entries, and stick it into an array 41 | objReg.EnumValues HKEY_LOCAL_MACHINE, strKeyPath,arrValueNames, arrValueTypes 42 | 'Grab the upper value of the array, and add 2 so that it creates a sequential Name value 43 | Count = Ubound(arrValueNames) + 2 44 | End if 45 | 46 | 'Add the entry into the registry 47 | objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,Count,Host 48 | 49 | 'Clear the variables 50 | objReg=Null 51 | Count=Null 52 | arrValueNames=Null 53 | arrValueTypes=Null -------------------------------------------------------------------------------- /App - Unins - WinRAR.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | App - Unins - WinRAR.ps1 3 | 4 | This script uninstalls WinRAR, and if 5 | successful, removes the program folder to get rid of any 6 | remnants 7 | 8 | Created by: Jon Czerwinski, Cohn Consulting Corporation 9 | Date: 20190319 10 | Version: 11 | 1.0 Initial release 12 | 13 | #> 14 | 15 | #region Functions 16 | Function Get-InstalledApp($Target) { 17 | $Apps = @() 18 | 19 | $Apps += Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall | 20 | Get-ItemProperty | Where-Object {$_.DisplayName -like "*$Target*" } | Select-Object -Property DisplayName, UninstallString 21 | 22 | # If 64-bit OS, then search Wow6432Node Uninstall as well 23 | If ($(Get-WmiObject Win32_OperatingSystem).OSArchitecture -eq "64-bit") { 24 | $Apps += Get-ChildItem -Path HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall | 25 | Get-ItemProperty | Where-Object {$_.DisplayName -like "*$Target*" } | Select-Object -Property DisplayName, UninstallString 26 | } 27 | 28 | $Apps 29 | } 30 | #endregion Functions 31 | 32 | #region Main 33 | 34 | Write-Output "Getting uninstall string for 'WinRAR'" 35 | $WinRAR = Get-InstalledApp("WinRAR") 36 | 37 | if ($WinRAR -ne $null) { 38 | Write-Output "WinRAR Found. Uninstalling" 39 | 40 | ForEach ($item in $WinRAR) { 41 | 42 | Write-Output "Removing $($item.DisplayName) via $($item.UninstallString)" 43 | 44 | If ($item.UninstallString) { 45 | 46 | $uninst = $item.UninstallString 47 | 48 | Write-Output "Running $uninst" 49 | Start-Process $uninst -ArgumentList "/S" -NoNewWindow 50 | 51 | $Timeout = 0 52 | $MaxWait = 10 # Wait up to 5 minutes for the application to uninstall 53 | 54 | While (($ChkWinRAR -ne $null) -and ($Timeout -lt $MaxWait)) { 55 | Start-Sleep -Seconds 30 56 | $Timeout++ 57 | 58 | $ChkWinRAR = Get-InstalledApp("WinRAR") 59 | } 60 | 61 | If ($ChkWinRAR -eq $null) { 62 | Write-Output "WinRAR removed" 63 | } else { 64 | Write-Output "ERROR: WinRAR not successfully removed." 65 | } 66 | } 67 | } 68 | } else { 69 | Write-Output "WinRAR not present. Nothing to do." 70 | } 71 | #endregion Main -------------------------------------------------------------------------------- /CCleaner/CCleaner.vbs: -------------------------------------------------------------------------------- 1 | '########################################## 2 | '# Copyright 2008 by N-able Technologies # 3 | '# All Rights Reserved # 4 | '# May not be reproduced or redistributed # 5 | '# Without written consent from N-able # 6 | '# Technologies # 7 | '# www.n-able.com # 8 | '########################################## 9 | 10 | 11 | ' Script Name: CCCleaner.vbs 12 | ' Description: This Visual Basic script will run the CCCleaner application in silent mode. 13 | 14 | 15 | 'Run the command 16 | Set Shell = CreateObject("Wscript.Shell") 17 | cmdline = "" & chr(34) & "C:\Program Files\CCleaner\CCleaner.exe" & chr(34) & " /AUTO" 18 | Shell.Run cmdline,7,TRUE 19 | Set Shell = Nothing -------------------------------------------------------------------------------- /Change Agent ApplianceID/Change appliance ID.txt: -------------------------------------------------------------------------------- 1 | 2 | The 'ChangeApplianceID.vbs' script must be run via the Probe in N-central. It accepts a single 3 | parameter which is the new appliance ID code. 4 | 5 | ChangeApplianceID.vbs /new:[APPLIANCE_ID_CODE] 6 | 7 | 8 | The agent will be stopped and started during execution, so the script will NOT work if you run 9 | it using the agent. 10 | 11 | 12 | 13 | Written by Tim Wiser, Orchid IT (twiser@orchidit.com) 14 | 13th August 2012 15 | 16 | -------------------------------------------------------------------------------- /Change Agent ApplianceID/ChangeApplianceID.vbs: -------------------------------------------------------------------------------- 1 | 2 | ' Change appliance ID of a Windows agent 3 | ' by Tim Wiser, Orchid IT (August 2012) 4 | 5 | ' This script MUST be launched using the Probe, not the Agent 6 | 7 | 8 | strComputer = "." 9 | 10 | ' Create the objects 11 | Set objFSO = CreateObject("Scripting.FileSystemObject") 12 | Set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") 13 | Set objShell = CreateObject("WScript.Shell") 14 | Set output = WScript.StdOut 15 | 16 | ' Get the architecture of the device and adjust the location of the agent folder accordingly 17 | strEnvironment = objShell.ExpandEnvironmentStrings("%PROCESSOR_ARCHITECTURE%") 18 | If strEnvironment = "AMD64" Then 19 | strProgramsPath = "C:\Program Files (x86)" 20 | output.writeline "This is a 64 bit device" & vbCrLf 21 | Else 22 | strProgramsPath = "C:\Program Files" 23 | output.writeline "This is a 32 bit device" & vbCrLf 24 | End If 25 | 26 | 27 | 28 | ' Get the parameter which should be the new appliance ID number 29 | Set objArgs = WScript.Arguments 30 | Set objArguments = objArgs.Named 31 | strNewApplianceID = objArguments("new") 32 | If strNewApplianceID = "" Then 33 | output.writeline "No new appliance ID specified! Use /new:" 34 | WScript.Quit 1 35 | End If 36 | output.writeline "Changing the appliance ID of this device to " & strNewApplianceID 37 | 38 | 39 | 40 | ' Check to see if the config file is actually where we expect it to be 41 | If objFSO.FileExists(strProgramsPath & "\N-able Technologies\Windows Agent\config\ApplianceConfig.xml")=False Then 42 | output.writeline "XML configuration file could not be found!" & vbCrLf 43 | WScript.Quit 1 44 | Else 45 | output.writeline "XML configuration file was found" & vbCrLf 46 | End If 47 | 48 | 49 | 50 | Set objNewConfigFile = objFSO.CreateTextFile("C:\Windows\Temp\ApplianceConfig.xml") 51 | Set objConfigFile = objFSO.OpenTextFile(strProgramsPath & "\N-able Technologies\Windows Agent\config\ApplianceConfig.xml") 52 | strLine = "" 53 | 54 | Do Until objConfigFile.AtEndOfStream 55 | strLine = objConfigFile.ReadLine 56 | If Left(strLine, 14)=" " & strNewApplianceID & "" 58 | Else 59 | objNewConfigFile.Writeline strLine 60 | End If 61 | Loop 62 | 63 | 64 | ' Close the files 65 | objConfigFile.Close 66 | objNewConfigFile.Close 67 | 68 | output.writeline "Stopping the N-able agent..." 69 | Set objServices = objWMI.ExecQuery("SELECT Name FROM Win32_Service WHERE Name LIKE 'Windows Agent%'") 70 | For Each service in objServices 71 | output.writeline "Stopping service: " & service.Name & vbCrLf 72 | service.StopService 73 | Next 74 | 75 | ' Wait for the agent service to finish stopping 76 | AgentCount=0 77 | AgentStopped = 0 78 | Do Until AgentStopped = 1 79 | Set objService = objWMI.ExecQuery("SELECT Name,State FROM Win32_Service WHERE Name='Windows Agent Service'") 80 | 81 | For Each service in objService 82 | ' Is the agent stopped, if so then bug out of the loop 83 | If service.State = "Stopped" Then 84 | output.writeline "The agent has finished stopping" & vbCrLf 85 | AgentStopped = 1 86 | End If 87 | 88 | ' This bit prevents the script going into an endless loop if the agent cannot be detected as being stopped 89 | AgentCount = AgentCount + 1 90 | If AgentCount > 10000 Then 91 | output.writeline "Could not detect the agent stopping!" & vbCrLf 92 | WScript.Quit 1 93 | End If 94 | Next 95 | Loop 96 | 97 | 98 | ' Copy the config file across into the agent folder 99 | objFSO.CopyFile "C:\Windows\Temp\ApplianceConfig.xml", strProgramsPath & "\N-able Technologies\Windows Agent\config\ApplianceConfig.xml" 100 | 101 | 102 | ' Start the agent up 103 | output.writeline "Starting the N-able agent..." 104 | Set objServices = objWMI.ExecQuery("SELECT Name, State FROM Win32_Service WHERE Name LIKE 'Windows Agent%'") 105 | For Each service in objServices 106 | output.writeline "Starting service: " & service.Name & vbCrLf 107 | service.StartService 108 | Next 109 | 110 | 111 | output.writeline "This device is now appliance ID " & strNewApplianceID & "" 112 | WScript.Quit 0 113 | -------------------------------------------------------------------------------- /Change Agent Customer ID/ChangeCustomerID.txt: -------------------------------------------------------------------------------- 1 | The 'ChangeCustomerID.vbs' script must be run via the Probe in N-central. It accepts a single parameter which is the new customer ID code. 2 | 3 | ChangeCustomerID.vbs /new:[CUSTOMER_ID_CODE] 4 | 5 | 6 | The agent will be stopped and started during execution, so the script will NOT work if you run it using the agent. 7 | 8 | 9 | By Chris Feldhaus, Systeem Medical Information Systems (cfeldhaus@systeem-medical.com) (October 2013) 10 | Derived from Change Appliance ID of a Windows agent written by Tim Wiser, Orchid IT (twiser@orchidit.com) (13th August 2012) 11 | 12 | Modified again by James Weakley, Diamond Technology Group (jweakley@diamondgroup.net.au) (January 2014) 13 | Will now work when ran by the agent, so ignore the above warning. -------------------------------------------------------------------------------- /Change Local User Password/ChangeLocalUserPassword.vbs: -------------------------------------------------------------------------------- 1 | '********************************************************** 2 | ' Script: ChangeLocalUserPassword.vbs 3 | ' Version: 1.1 4 | ' Author: Chris Reid 5 | ' Date: Nov. 27th, 2009 6 | ' Usage: cscript ChangeLocalUserPassword.vbs USER PASSWORD 7 | '********************************************************** 8 | 9 | ' Version History 10 | 11 | ' 1.1 - Feb 17th, 2010 - Fixed an issue where the objUser variable was not being defined (thanks Steve Grabowski!) 12 | ' 1.0 - Nov. 27th 2009 - Initial Release 13 | 14 | 15 | 16 | 17 | 'Let's declare some variables 18 | Option explicit 19 | dim User, Password, WshNetwork, Device, objUser 20 | 21 | 22 | 23 | 'Let's make sure that the person running this script specified the User and Password 24 | If WScript.Arguments.Count = 2 Then 25 | User = WScript.Arguments.Item(0) 26 | Password = WScript.Arguments.Item(1) 27 | Else 28 | wscript.Quit(1) 29 | End If 30 | 31 | 32 | 'Let's get the name of this device (it's needed for changing the user account) 33 | Set WshNetwork = WScript.CreateObject("WScript.Network") 34 | Device = WshNetwork.ComputerName 35 | 36 | 37 | 38 | 'Let's bind to the user's account, and change his password 39 | Set objUser = GetObject("WinNT://"& Device & "/"& User) 40 | objUser.SetPassword("" & Password) -------------------------------------------------------------------------------- /Change Windows Probe Password/Probe_change_credentials.vbs: -------------------------------------------------------------------------------- 1 | '############################### 2 | '# Copyright 2009 by Cougar Ridge Computer Systems 3 | '# All Rights Reserved 4 | '############################### 5 | '# 6 | '# Required Parameters: 7 | '# 8 | '# /u - domain\username 9 | '# /p - Password 10 | '# 11 | '# Sample 12 | '# Probe_change_credentials.vbs /u:domain\administrator /p:Password 13 | 14 | '# Create Objects 15 | set WshShell = CreateObject("WScript.Shell") 16 | Set objShell = CreateObject("Shell.Application" ) 17 | Set objFSO = CreateObject("Scripting.FileSystemObject") 18 | 19 | '# Set Variables 20 | strUser = WScript.Arguments.Named.Item("u") 21 | strPassword = WScript.Arguments.Named.Item("p") 22 | strComputer = "." 23 | const HKEY_LOCAL_MACHINE = &H80000002 24 | 25 | '# The following code elevates the script if we're using an operating system requiring elevation. 26 | If WScript.Arguments.Named.Item("uac") = "" Then 27 | '#Check for Vista or XP. 28 | dim Vistaver, dwvalue, UACStatus, UACValue 29 | Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") 30 | Set colItems = objWMIService.ExecQuery("Select * From Win32_OperatingSystem") 31 | For Each objItem in colItems 32 | If Instr(objItem.Caption, "Vista") Then 33 | OperatingSystem = "UAC" 34 | ElseIf Instr(objItem.Caption, "Windows 7") Then 35 | OperatingSystem = "UAC" 36 | End If 37 | Next 38 | if (OperatingSystem = "UAC") Then 39 | answer = MsgBox("This script is being run to change the Windows Software Probe password on your system. If you have questions or are concerned that this may be a virus please contact us at 000-000-0000.",0,"IT Support") 40 | objShell.ShellExecute "wscript.exe", Chr(34) & _ 41 | WScript.ScriptFullName & Chr(34) & " /uac:1 /u:" & strUser & " /p:" & strPassword, "", "runas", 1 42 | Else 43 | change_credentials 44 | End If 45 | Else 46 | change_credentials 47 | End if 48 | 49 | sub change_credentials() 50 | '# Stop Services 51 | cmd = "cmd.exe /c net stop ""Windows Software Probe Maintenance Service""" 52 | Return = WshShell.Run(cmd,0,true) 53 | cmd = "cmd.exe /c net stop ""Windows Software Probe Service""" 54 | Return = WshShell.Run(cmd,0,true) 55 | cmd = "cmd.exe /c net stop ""Windows Software Probe Syslog Service""" 56 | Return = WshShell.Run(cmd,0,true) 57 | 58 | 'Set working directory 59 | 60 | if objFSO.FolderExists("c:\Program Files (x86)\N-Able Technologies\Windows Software Probe\bin") then 61 | strNableDirectory = "c:\Program Files (x86)\N-Able Technologies\Windows Software Probe\bin" 62 | else 63 | strNableDirectory = "c:\Program Files\N-Able Technologies\Windows Software Probe\bin" 64 | end if 65 | 66 | 'Create startup.ini File 67 | set Nablefilestream = objFSO.CreateTextFile(strNableDirectory & "\startup.ini", True, 0) 68 | With Nablefilestream 69 | .WriteLine "username=" & strUser 70 | .WriteLine "password=" & strPassword 71 | .WriteLine "" 72 | .Close 73 | End With 74 | 75 | ' # Adjust service login information 76 | Set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") 77 | set objService = objWMI.Get("Win32_Service.Name='Windows Software Probe Maintenance Service'") 78 | ChangeServ = objservice.Change(Null, Null, Null, Null, Null, FALSE, struser, strPassword) 79 | set objService = objWMI.Get("Win32_Service.Name='Windows Software Probe Service'") 80 | ChangeServ = objservice.Change(Null, Null, Null, Null, Null, FALSE, struser, strPassword) 81 | set objService = objWMI.Get("Win32_Service.Name='Windows Software Probe Syslog Service'") 82 | ChangeServ = objservice.Change(Null, Null, Null, Null, Null, FALSE, struser, strPassword) 83 | 84 | '# Start Services 85 | cmd = "cmd.exe /c net start ""Windows Software Probe Maintenance Service""" 86 | Return = WshShell.Run(cmd,0,true) 87 | cmd = "cmd.exe /c net start ""Windows Software Probe Service""" 88 | Return = WshShell.Run(cmd,0,true) 89 | cmd = "cmd.exe /c net start ""Windows Software Probe Syslog Service""" 90 | Return = WshShell.Run(cmd,0,true) 91 | 92 | End Sub -------------------------------------------------------------------------------- /Change Windows Probe Password/README.txt: -------------------------------------------------------------------------------- 1 | Required Parameters: 2 | 3 | /u - domain\username 4 | /p - Password 5 | 6 | Sample 7 | 8 | Probe_change_credentials.vbs /u:domain\administrator /p:Password -------------------------------------------------------------------------------- /Check For Windows Updates/CheckForWindowsUpdates.vbs: -------------------------------------------------------------------------------- 1 | ' Script Name: CheckForWindowsUpdates.vbs 2 | ' Description: This will run a Windows Defender scan. 3 | 4 | 5 | 'Run the command 6 | Set Shell = CreateObject("Wscript.Shell") 7 | Set filesys = CreateObject("Scripting.FileSystemObject") 8 | SRoot=Shell.ExpandEnvironmentStrings("%SystemRoot%") 9 | Comspec=Shell.ExpandEnvironmentStrings("%COMSPEC%") 10 | path = SRoot & "\System32\wuauclt.exe" 11 | If filesys.FileExists(path) Then 12 | cmdline = Comspec & " /c """ & path & """ /detectnow" 13 | Shell.Run cmdline,7,TRUE 14 | End If 15 | 16 | Set filesys = Nothing 17 | Set Shell = Nothing -------------------------------------------------------------------------------- /Clean Windows Update Folder/AMP_UPLOAD_READ_ME.txt: -------------------------------------------------------------------------------- 1 | There are two methods to upload an Automation Policy (AMP) into N-central. Choose one of the following methods: 2 | 3 | How to upload AMP directly into N-central: 4 | 5 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 6 | 2. Choose on the OS Level from top-left drop down 7 | 3. Expand Configuration Pane -> Scheduled Tasks -> Script/Software Repository 8 | 4. Click Add -> Select Automation Policy 9 | 5. Click Browse -> Select .AMP 10 | 6. Click OK -> OK 11 | 12 | 13 | 14 | How to upload AMP through Automation Designer into N-central: 15 | 16 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 17 | 2. Choose on the OS Level from top-left drop down 18 | 3. From Actions Pane -> Click Start Automation Manager 19 | 4. From within the Automation Manager Designer, choose File -> Open 20 | 5. Browse to .AMP 21 | 6. Click OK 22 | 7. From within the Automation Manager Designer, choose File -> Upload -------------------------------------------------------------------------------- /Clean Windows Update Folder/Clean Windows Update Folder.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Clean Windows Update Folder/Clean Windows Update Folder.jpg -------------------------------------------------------------------------------- /Cleanup Windows Update/CleanupWindowsUpdate.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Cleanup Windows Update/CleanupWindowsUpdate.exe -------------------------------------------------------------------------------- /Clear Print Spool/Clear Print Spool.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Clear Print Spool/Clear Print Spool.jpg -------------------------------------------------------------------------------- /Codedrop/RemoteControl.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Codedrop/RemoteControl.dll -------------------------------------------------------------------------------- /Collect Network Adapter Statistics/AMP_UPLOAD_READ_ME.txt: -------------------------------------------------------------------------------- 1 | There are two methods to upload an Automation Policy (AMP) into N-central. Choose one of the following methods: 2 | 3 | How to upload AMP directly into N-central: 4 | 5 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 6 | 2. Choose on the OS Level from top-left drop down 7 | 3. Expand Configuration Pane -> Scheduled Tasks -> Script/Software Repository 8 | 4. Click Add -> Select Automation Policy 9 | 5. Click Browse -> Select .AMP 10 | 6. Click OK -> OK 11 | 12 | 13 | 14 | How to upload AMP through Automation Designer into N-central: 15 | 16 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 17 | 2. Choose on the OS Level from top-left drop down 18 | 3. From Actions Pane -> Click Start Automation Manager 19 | 4. From within the Automation Manager Designer, choose File -> Open 20 | 5. Browse to .AMP 21 | 6. Click OK 22 | 7. From within the Automation Manager Designer, choose File -> Upload -------------------------------------------------------------------------------- /Collect Network Adapter Statistics/Collect Network Statistics.amp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 331,380 11 | Assembly references and imported namespaces serialized as XML namespaces 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Collect Network Adapter Statistics/Collect Network Statistics.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Collect Network Adapter Statistics/Collect Network Statistics.jpg -------------------------------------------------------------------------------- /Configure Windows SNMP/ConfigSNMP.vbs: -------------------------------------------------------------------------------- 1 | '########################################## 2 | '# Copyright 2009 by N-able Technologies # 3 | '# All Rights Reserved # 4 | '# May not be reproduced or redistributed # 5 | '# Without written consent from N-able # 6 | '# Technologies # 7 | '# www.n-able.com # 8 | '########################################## 9 | 10 | 11 | ' Script Name: SetSNMP.vbs 12 | ' Author: Chris Reid 13 | ' Date: Septh. 17th, 2009 14 | ' Description: This VBS script will add localhost (127.0.0.1) as a host from which the device will accept SNMP queries, and will add an SNMP community string using the one specified. 15 | ' Version: 1.0 16 | 17 | 'NOTE: The SNMP service does not need to be restarted for these changes to take effect 18 | 19 | 20 | 21 | 'Let's declare some variables 22 | option explicit 23 | dim strComputer, Host, strHostKeyPath, strCommunityKeyPath, Count, arrValueNames,arrValueTypes, objReg, KeyPresenceTest, CommunityString, CommunityType 24 | Const HKEY_LOCAL_MACHINE = &H80000002 25 | strComputer = "." 26 | strHostKeyPath = "SYSTEM\CurrentControlSet\Services\SNMP\Parameters\PermittedManagers" 27 | strCommunityKeyPath = "SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ValidCommunities" 28 | Host = "127.0.0.1" 29 | CommunityType = "4" 'According to http://technet.microsoft.com/en-us/library/cc736898%28WS.10%29.aspx this will set the community string to be Read Only. 4=ReadOnly, 8=Read/Write 30 | 31 | 32 | 33 | 'Let's make sure that we got the SNMP community string as a command line parameter 34 | If WScript.Arguments.Count = 1 Then 35 | CommunityString = WScript.Arguments.Item(0) 36 | Else 37 | wscript.Quit(1) 38 | End If 39 | 40 | 41 | 'STEP 1: ADD 127.0.0.1 as an accepted SNMP Host 42 | 43 | 'Access the registry through WMI 44 | Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv") 45 | 46 | 'Find out how many hosts already exist, so that the script creates an entry with the right Name 47 | '(each entry has a numerical Name in the registry, starting with 1) 48 | objReg.GetStringValue HKEY_LOCAL_MACHINE,strHostKeyPath,1,KeyPresenceTest 49 | 50 | 'This next line tests to see whether the entry (define by KeyPresenceTest) is null or not 51 | If isNull (KeyPresenceTest) Then 52 | 'Because the value is null, the registry entry we create needs to have a Name of 1 53 | Count = 1 54 | Else 55 | 'Get the entries, and stick it into an array 56 | objReg.EnumValues HKEY_LOCAL_MACHINE, strHostKeyPath,arrValueNames, arrValueTypes 57 | 'Grab the upper value of the array, and add 2 so that it creates a sequential Name value 58 | Count = Ubound(arrValueNames) + 2 59 | End if 60 | 61 | 'Add the entry into the registry 62 | objReg.SetStringValue HKEY_LOCAL_MACHINE,strHostKeyPath,Count,Host 63 | 64 | 'Clear the variables 65 | objReg=Null 66 | Count=Null 67 | arrValueNames=Null 68 | arrValueTypes=Null 69 | 70 | 71 | 72 | 'STEP 2: Add the specified SNMP Community String 73 | Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv") 74 | objReg.SetDWordValue HKEY_LOCAL_MACHINE,strCommunityKeyPath,CommunityString,CommunityType 75 | 76 | 77 | 'Clear the variable 78 | objReg=Null -------------------------------------------------------------------------------- /Defrag/Defrag.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem ########################################## 3 | rem # Copyright 2006 by N-able Technologies # 4 | rem # All Rights Reserved # 5 | rem # May not be reproduced or redistributed # 6 | rem # Without written consent from N-able # 7 | rem # Technologies # 8 | rem # www.n-able.com # 9 | rem ########################################## 10 | rem # 11 | rem # Defrag.bat 12 | rem # 13 | rem # This batch file will execute a command line 14 | rem # defrag of the specified drive. 15 | rem # 16 | rem # It must be run on the device who's service 17 | rem # you wish to control. 18 | rem # 19 | rem # This script is suitable for remote execution 20 | rem # as no UI interaction is required. 21 | rem # 22 | rem # note the command line parameters. 23 | rem # Parameter 1: Drive to defrag. 24 | rem # ALL PARAMETERS ARE REQUIRED. 25 | rem # 26 | rem # ex: defrag.bat c: 27 | rem 28 | defrag %1 -------------------------------------------------------------------------------- /Delete Temporary Windows Files/DeleteTempFiles.vbs: -------------------------------------------------------------------------------- 1 | '########################################## 2 | '# Copyright 2008 by N-able Technologies # 3 | '# All Rights Reserved # 4 | '# May not be reproduced or redistributed # 5 | '# Without written consent from N-able # 6 | '# Technologies # 7 | '# www.n-able.com # 8 | '########################################## 9 | 10 | 11 | ' Script Name: DeleteTempFiles.vbs 12 | ' Description: This Visual Basic script will delete all of the Windows Temp files (found in the %temp% directory) on a device 13 | 14 | 15 | 'Run the command 16 | Set Shell = CreateObject("Wscript.Shell") 17 | cmdline = "del /q /f /s %temp%\*" 18 | Shell.Run cmdline,7,TRUE 19 | Set Shell = Nothing -------------------------------------------------------------------------------- /Delete-ultra-vnc-from-start-menu-batch-scripts/delete-ultra-vnc-from-start-menu-XP.bat: -------------------------------------------------------------------------------- 1 | rd /S /Q "C:\Documents and Settings\All Users\Start Menu\Programs\UltraVNC" 2 | -------------------------------------------------------------------------------- /Delete-ultra-vnc-from-start-menu-batch-scripts/delete-ultra-vnc-from-start-menu-win7.bat: -------------------------------------------------------------------------------- 1 | rd /S /Q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\UltraVNC" 2 | -------------------------------------------------------------------------------- /Deploy LiveVault Agents/Installing LiveVault Agents through N-central.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Deploy LiveVault Agents/Installing LiveVault Agents through N-central.docx -------------------------------------------------------------------------------- /Deploy LiveVault Agents/RegisterLiveVaultAgent.vbs: -------------------------------------------------------------------------------- 1 | '################################################################## 2 | '# Copyright 2008 by N-able Technologies # 3 | '# All Rights Reserved # 4 | '# May not be reproduced or redistributed # 5 | '# Without written consent from N-able Technologies # 6 | '# www.n-able.com # 7 | '################################################################## 8 | 9 | 10 | 11 | 12 | '########################################################################################### 13 | '# USER CONFIGURABLE SECTION 14 | 15 | Option Explicit 16 | Dim WshShell, HostnameCMD, Hostname, RegisterCMD, Username, Password, EncryptionKey, LiveVaultServer 17 | 18 | 19 | Username = "LIVEVAULTUSERNAME" 20 | Password = "LIVEVAULTPASSWORD" 21 | EncryptionKey = "ENCRYPTIONKEY" 22 | LiveVaultServer = "https://provisioning.livevault.com" 23 | '########################################################################################### 24 | 25 | 26 | 27 | 'Get the hostname of the device 28 | Set WshShell = CreateObject("Wscript.Shell") 29 | Set HostnameCMD = WshShell.Exec("%COMSPEC% /c hostname") 30 | Hostname = HostnameCMD.StdOut.ReadLine 31 | Set WshShell = Nothing 32 | 33 | 34 | ' Run the registration command 35 | Set WshShell = CreateObject("Wscript.Shell") 36 | RegisterCMD = "" & chr(34) & "C:\Program Files\LiveVault Corporation\backupengine\LVRegister" & chr(34) & " -n -i -u " & chr(34) & Username & chr(34) & " -p " & Password & " -s " & LiveVaultServer & " -k " & EncryptionKey & " -l " & Hostname & " -w " & LiveVaultServer & "" 37 | WshShell.Run RegisterCMD,7,TRUE 38 | Set WshShell = Nothing 39 | -------------------------------------------------------------------------------- /DeployTheNCAgent/DeployTheNCAgent.ps1: -------------------------------------------------------------------------------- 1 | # DeployTheNcentralAgent.ps1 2 | # 3 | # This script outputs the customer list, as well as the Registration Token for each customer. The script prompts for parameters: 4 | # - N-Central server FQDN 5 | # - The JWT to be used to authenticate to N-central 6 | # - The CustomerID to be queried 7 | # 8 | # Created by: Chris Reid, Solarwinds MSP, with credit to Jon Czerwinksi and Kelvin Telegaar 9 | # Date: Feb. 1st, 2021 10 | # Version: 1.1 11 | 12 | # Define the command-line parameters to be used by the script 13 | [CmdletBinding()] 14 | Param( 15 | [Parameter(Mandatory = $true)]$serverHost, 16 | [Parameter(Mandatory = $true)]$JWT, 17 | [Parameter(Mandatory = $true)]$SpecifiedCustomerID 18 | ) 19 | 20 | 21 | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 22 | 23 | 24 | # Generate a pseudo-unique namespace to use with the New-WebServiceProxy and 25 | # associated types. 26 | $NWSNameSpace = "NAble" + ([guid]::NewGuid()).ToString().Substring(25) 27 | $KeyPairType = "$NWSNameSpace.EiKeyValue" 28 | 29 | # Bind to the namespace, using the Webserviceproxy 30 | $bindingURL = "https://" + $serverHost + "/dms2/services2/ServerEI2?wsdl" 31 | $nws = New-Webserviceproxy $bindingURL -Namespace ($NWSNameSpace) 32 | 33 | # Set up and execute the query 34 | $KeyPair = New-Object -TypeName $KeyPairType 35 | $KeyPair.Key = 'listSOs' 36 | $KeyPair.Value = "False" 37 | Try { 38 | $CustomerList = $nws.customerList("", $JWT, $KeyPair) 39 | } 40 | Catch { 41 | Write-Host "Could not connect: $($_.Exception.Message)" 42 | exit 43 | } 44 | 45 | $found = $False 46 | $rowid=0 47 | While ($rowid -lt $CustomerList.Count -and $found -eq $False) 48 | { 49 | 50 | If($customerlist[$rowid].items[0].Value -eq [int]$SpecifiedCustomerID) 51 | { 52 | Foreach($rowitem In $CustomerList[$rowid].items) 53 | { 54 | If($rowitem.key -eq "customer.registrationtoken") 55 | { 56 | $RetrievedRegistrationToken = $rowitem.value 57 | If($RetrievedRegistrationToken -eq "") 58 | { 59 | "Note that a valid Registration Token was not returned even though the customer was found. This happens when an agent install has never been downloaded for that customer. Try to download an agent from the N-Central UI and run this script again" 60 | } 61 | } 62 | } 63 | } 64 | 65 | $rowid++ 66 | } 67 | $Customers = ForEach ($Entity in $CustomerList) { 68 | $CustomerAssetInfo = @{} 69 | ForEach ($item in $Entity.items) { $CustomerAssetInfo[$item.key] = $item.Value } 70 | [PSCustomObject]@{ 71 | ID = $CustomerAssetInfo["customer.customerid"] 72 | Name = $CustomerAssetInfo["customer.customername"] 73 | parentID = $CustomerAssetInfo["customer.parentid"] 74 | RegistrationToken = $CustomerAssetInfo["customer.registrationtoken"] 75 | } 76 | } 77 | 78 | 79 | 80 | # Uncomment this line if you wish to see the array of customers that has been found. 81 | #$Customers | Sort-Object -Property ID | Format-Table -AutoSize 82 | #$RetrievedRegistrationToken = ($Customers | Where-Object ID -eq $SpecifiedCustomerID).RegistrationToken 83 | 84 | Write-Host "Here is the registration token for CustomerID" $SpecifiedCustomerID":" $RetrievedRegistrationToken -ForegroundColor Green 85 | 86 | # Let's see if the Windows Agent installer has already been placed in the %TEMP% directory 87 | If (!(Test-Path -Path "C:\Temp\windowsAgentSetup.exe")) { 88 | Write-Host "The Agent installer was not found in C:\Temp. Attempting download from N-central." 89 | $URI = "https://" + $serverHost + "/download/current/winnt/N-central/WindowsAgentSetup.exe" 90 | Invoke-WebRequest -Uri $URI -OutFile 'C:\Temp\WindowsAgentSetup.exe' 91 | } 92 | Else { 93 | Write-Host "Agent installer is located in C:\Temp." 94 | } 95 | # Now that we've got the registration token for the specified customer, let's use it to install the Windows Agent 96 | Write-Host "Initiating the agent install." 97 | Start-Process -NoNewWindow -FilePath "C:\Temp\WindowsAgentSetup.exe" -ArgumentList "/s /v`" /qn CUSTOMERID=$SpecifiedCustomerID CUSTOMERSPECIFIC=1 REGISTRATION_TOKEN=$RetrievedRegistrationToken SERVERPROTOCOL=HTTPS SERVERADDRESS=$serverHost SERVERPORT=443`"" 98 | -------------------------------------------------------------------------------- /Detailed Mailbox Information/AMP_UPLOAD_READ_ME.txt: -------------------------------------------------------------------------------- 1 | There are two methods to upload an Automation Policy (AMP) into N-central. Choose one of the following methods: 2 | 3 | How to upload AMP directly into N-central: 4 | 5 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 6 | 2. Choose on the OS Level from top-left drop down 7 | 3. Expand Configuration Pane -> Scheduled Tasks -> Script/Software Repository 8 | 4. Click Add -> Select Automation Policy 9 | 5. Click Browse -> Select .AMP 10 | 6. Click OK -> OK 11 | 12 | 13 | 14 | How to upload AMP through Automation Designer into N-central: 15 | 16 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 17 | 2. Choose on the OS Level from top-left drop down 18 | 3. From Actions Pane -> Click Start Automation Manager 19 | 4. From within the Automation Manager Designer, choose File -> Open 20 | 5. Browse to .AMP 21 | 6. Click OK 22 | 7. From within the Automation Manager Designer, choose File -> Upload -------------------------------------------------------------------------------- /Detailed Mailbox Information/Detailed Mailbox Information.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Detailed Mailbox Information/Detailed Mailbox Information.jpg -------------------------------------------------------------------------------- /Download and Run File from URL/AMP_UPLOAD_READ_ME.txt: -------------------------------------------------------------------------------- 1 | There are two methods to upload an Automation Policy (AMP) into N-central. Choose one of the following methods: 2 | 3 | How to upload AMP directly into N-central: 4 | 5 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 6 | 2. Choose on the OS Level from top-left drop down 7 | 3. Expand Configuration Pane -> Scheduled Tasks -> Script/Software Repository 8 | 4. Click Add -> Select Automation Policy 9 | 5. Click Browse -> Select .AMP 10 | 6. Click OK -> OK 11 | 12 | 13 | 14 | How to upload AMP through Automation Designer into N-central: 15 | 16 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 17 | 2. Choose on the OS Level from top-left drop down 18 | 3. From Actions Pane -> Click Start Automation Manager 19 | 4. From within the Automation Manager Designer, choose File -> Open 20 | 5. Browse to .AMP 21 | 6. Click OK 22 | 7. From within the Automation Manager Designer, choose File -> Upload -------------------------------------------------------------------------------- /Download and Run File from URL/Download and Run File from URL.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Download and Run File from URL/Download and Run File from URL.jpg -------------------------------------------------------------------------------- /Enable and Disable UAC/DisableUAC.vbs: -------------------------------------------------------------------------------- 1 | 2 | Set objApp = CreateObject("wScript.Shell") 3 | objApp.Run "C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f" -------------------------------------------------------------------------------- /Enable and Disable UAC/EnableUAC.vbs: -------------------------------------------------------------------------------- 1 | 2 | Set objApp = CreateObject("wScript.Shell") 3 | objApp.Run "C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f" 4 | -------------------------------------------------------------------------------- /Enable and Disable UAC/READ ME!.TXT: -------------------------------------------------------------------------------- 1 | Please note that after running these scripts, a reboot will most likely be required. -------------------------------------------------------------------------------- /Enable and Reset Firewall/Enable and Reset Firewall.amp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 363,291 11 | Assembly references and imported namespaces serialized as XML namespaces 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /EnableDisable Windows Firewall/AMP_UPLOAD_READ_ME.txt: -------------------------------------------------------------------------------- 1 | There are two methods to upload an Automation Policy (AMP) into N-central. Choose one of the following methods: 2 | 3 | How to upload AMP directly into N-central: 4 | 5 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 6 | 2. Choose on the OS Level from top-left drop down 7 | 3. Expand Configuration Pane -> Scheduled Tasks -> Script/Software Repository 8 | 4. Click Add -> Select Automation Policy 9 | 5. Click Browse -> Select .AMP 10 | 6. Click OK -> OK 11 | 12 | 13 | 14 | How to upload AMP through Automation Designer into N-central: 15 | 16 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 17 | 2. Choose on the OS Level from top-left drop down 18 | 3. From Actions Pane -> Click Start Automation Manager 19 | 4. From within the Automation Manager Designer, choose File -> Open 20 | 5. Browse to .AMP 21 | 6. Click OK 22 | 7. From within the Automation Manager Designer, choose File -> Upload -------------------------------------------------------------------------------- /EnableDisable Windows Firewall/EnableDisable Windows Firewall.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/EnableDisable Windows Firewall/EnableDisable Windows Firewall.jpg -------------------------------------------------------------------------------- /Exchange 2007 - Start All Services/StartExchange2k7.bat: -------------------------------------------------------------------------------- 1 | net start msexchangesa 2 | net start msexchangetransport 3 | net start msexchangetransportlogsearch 4 | net start msexchangeAdtopology 5 | net start msexchangeantispamupdate 6 | net start msexchangeedgesync 7 | net start msexchangefds 8 | net start msexchangeimap4 9 | net start msexchangeis 10 | net start msexchangemailsubmission 11 | net start msexchangemailboxassistants 12 | net start msexchangepop3 13 | net start msexchangerepl 14 | net start msexchangesearch 15 | net start msexchangeservicehost 16 | net start msspeechservice 17 | net start msexchangeum -------------------------------------------------------------------------------- /Exchange 2007 - Stop All Services/StopExchange2K7.bat: -------------------------------------------------------------------------------- 1 | net stop msexchangesa /y 2 | net stop msexchangetransport /y 3 | net stop msexchangetransportlogsearch /y 4 | net stop msexchangeAdtopology /y 5 | net stop msexchangeantispamupdate /y 6 | net stop msexchangeedgesync /y 7 | net stop msexchangefds /y 8 | net stop msexchangeimap4 /y 9 | net stop msexchangeis /y 10 | net stop msexchangemailsubmission /y 11 | net stop msexchangemailboxassistants /y 12 | net stop msexchangepop3 /y 13 | net stop msexchangerepl /y 14 | net stop msexchangesearch /y 15 | net stop msexchangeservicehost /y 16 | net stop msspeechservice /y 17 | net stop msexchangeum /y -------------------------------------------------------------------------------- /Find Exchange Settings/FindExchSettings.ps1: -------------------------------------------------------------------------------- 1 | Param($emailAddress = "logs@tiger.net.nz", $smtpserver="Mail.Global.FrontBridge.com") 2 | 3 | $results = get-wmiobject win32_logicaldisk -filter "drivetype=3" | select-object deviceid 4 | 5 | $csvCollection = @() 6 | 7 | $ErrorActionPreference = "SilentlyContinue" 8 | 9 | foreach ($device in $results) 10 | { 11 | $list = Get-ChildItem $device.deviceid -Recurse | where{$_.Extension -match "edb|stm"} 12 | foreach ($item in $list) 13 | { 14 | $csvItem = "" | select Directory,File,Size 15 | $csvItem.directory = $item.directoryname 16 | $csvItem.file = $item.name 17 | $csvItem.size = $item.length 18 | $csvCollection += $csvItem 19 | } 20 | } 21 | 22 | $file = "c:\Ex_DB_Details.csv" 23 | $file2 = "c:\Ex_Reg_Details.txt" 24 | $csvCollection | Export-CSV $file 25 | 26 | $computername = gc env:computername 27 | $registry = "HKLM:\System\CurrentControlSet\Services\MSExchangeIS\" + $computername 28 | Get-ChildItem $registry | ForEach-Object {Get-ItemProperty $_.pspath} | out-file $file2 29 | 30 | $msg = new-object Net.Mail.MailMessage 31 | $att = new-object Net.Mail.Attachment($file) 32 | $att2 = new-object Net.Mail.Attachment($file2) 33 | $smtp = new-object Net.Mail.SmtpClient($smtpServer) 34 | $msg.From = "administrator@"+$computername 35 | $msg.To.Add($emailAddress) 36 | $msg.Subject = "Exchange Details" 37 | $msg.Body = "These are the general details for the Exchange Server." 38 | $msg.Attachments.Add($att) 39 | $msg.Attachments.Add($att2) 40 | $smtp.Send($msg) 41 | $att.Dispose() 42 | 43 | remove-item $file 44 | remove-item $file2 -------------------------------------------------------------------------------- /Find External IP/Find External IP.vbs: -------------------------------------------------------------------------------- 1 | ' ****************************************************************************** 2 | ' Script: GetExternalIP.vbs 3 | ' Version: 1.0 4 | ' Author: Chris Reid 5 | ' Description: This script will find the public/external IP address of the machine 6 | ' run against. 7 | ' Date: November 17th, 2011 8 | ' ****************************************************************************** 9 | 10 | 11 | ' Thanks to http://jackson.io/ip/service.html for the original code! 12 | 13 | ' Create objects 14 | set ip = createobject("Microsoft.XMLHTTP") 15 | Set output = Wscript.stdout 16 | 17 | ' Fetch the IP address 18 | ip.open "GET", "http://queryip.net/ip/", false 19 | ip.send(null) 20 | output.writeline ip.responsetext 21 | -------------------------------------------------------------------------------- /Find Mailboxes Larger than/AMP_UPLOAD_READ_ME.txt: -------------------------------------------------------------------------------- 1 | There are two methods to upload an Automation Policy (AMP) into N-central. Choose one of the following methods: 2 | 3 | How to upload AMP directly into N-central: 4 | 5 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 6 | 2. Choose on the OS Level from top-left drop down 7 | 3. Expand Configuration Pane -> Scheduled Tasks -> Script/Software Repository 8 | 4. Click Add -> Select Automation Policy 9 | 5. Click Browse -> Select .AMP 10 | 6. Click OK -> OK 11 | 12 | 13 | 14 | How to upload AMP through Automation Designer into N-central: 15 | 16 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 17 | 2. Choose on the OS Level from top-left drop down 18 | 3. From Actions Pane -> Click Start Automation Manager 19 | 4. From within the Automation Manager Designer, choose File -> Open 20 | 5. Browse to .AMP 21 | 6. Click OK 22 | 7. From within the Automation Manager Designer, choose File -> Upload -------------------------------------------------------------------------------- /Find Mailboxes Larger than/Find Mailboxes Larger than.amp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | StartObject.MailboxSize 7 | 17a87f86-931c-4714-9471-e9bc13550a9b 8 | PolicyExecutor.MailboxesLargerThanX, PolicyExecutionEngine, Version=1.5.0.13, Culture=neutral, PublicKeyToken=null 9 | MbxSize 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 399,264 18 | Assembly references and imported namespaces serialized as XML namespaces 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Find Mailboxes Larger than/Find Mailboxes Larger than.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Find Mailboxes Larger than/Find Mailboxes Larger than.jpg -------------------------------------------------------------------------------- /Generic App Log File Maintenance/AMP_UPLOAD_READ_ME.txt: -------------------------------------------------------------------------------- 1 | There are two methods to upload an Automation Policy (AMP) into N-central. Choose one of the following methods: 2 | 3 | How to upload AMP directly into N-central: 4 | 5 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 6 | 2. Choose on the OS Level from top-left drop down 7 | 3. Expand Configuration Pane -> Scheduled Tasks -> Script/Software Repository 8 | 4. Click Add -> Select Automation Policy 9 | 5. Click Browse -> Select .AMP 10 | 6. Click OK -> OK 11 | 12 | 13 | 14 | How to upload AMP through Automation Designer into N-central: 15 | 16 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 17 | 2. Choose on the OS Level from top-left drop down 18 | 3. From Actions Pane -> Click Start Automation Manager 19 | 4. From within the Automation Manager Designer, choose File -> Open 20 | 5. Browse to .AMP 21 | 6. Click OK 22 | 7. From within the Automation Manager Designer, choose File -> Upload -------------------------------------------------------------------------------- /Generic App Log File Maintenance/Trim Oldest Files from Folder.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Generic App Log File Maintenance/Trim Oldest Files from Folder.jpg -------------------------------------------------------------------------------- /Get AD Users/GetADUsers.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem Grabs a list of user accounts in the current Active Directory domain 3 | rem and displays which ones are disabled. 4 | rem by Tim wiser, Orchid IT (November 2011) 5 | 6 | 7 | set DC=FALSE 8 | set OUTPUTFILE=userlist2.txt 9 | net share > %windir%\temp\orchid_sharelist.txt 10 | for /f "tokens=1" %%d in ('type %windir%\temp\orchid_sharelist.txt') do IF %%d EQU SYSVOL set DC=TRUE 11 | if %DC% EQU FALSE echo This script must be run on a domain controller. && exit 12 | 13 | rem If we get this far then we're running on a DC 14 | 15 | rem prepare files 16 | set OUTPUTFILE=AD_User_List.txt 17 | if EXIST %OUTPUTFILE% del %OUTPUTFILE% 18 | echo. > %OUTPUTFILE% 19 | echo. > %OUTPUTFILE% 20 | 21 | rem get a list of user accounts and disabled user accounts 22 | dsquery user -name * > allusers.txt 23 | dsquery user -name * -disabled > disabledusers.txt 24 | 25 | rem read the user list line by line and compare it to the disabled users list. Where a match 26 | rem is found, prefix the user line with an X. Write the user line to an output file. 27 | for /f "tokens=*" %%d in (allusers.txt) do CALL :CHECK_DISABLED %%d 28 | 29 | rem we now have a list of users with X or A preceeding them so we can format it nicely 30 | for /f "tokens=*" %%d in (users.txt) do call :PARSE_USER_LIST %%d 31 | goto END 32 | 33 | 34 | :CHECK_DISABLED 35 | set LINE=%1% 36 | set DISABLED=FALSE 37 | for /f "tokens=*" %%d in (disabledusers.txt) do IF %LINE% EQU %%d set DISABLED=TRUE 38 | if %DISABLED% EQU TRUE ( echo X_%LINE% >> users.txt 39 | ) else ( echo A_%LINE% >> users.txt ) 40 | goto :EOF 41 | 42 | 43 | :PARSE_USER_LIST 44 | set LINE=%1% 45 | rem strip off the right hand side of the line into a file 46 | for /f "tokens=1 delims=," %%d in ('echo %LINE%') do echo %%d > truncatedline.txt 47 | rem strip off the start of the line and dump the remainder - the name - into a variable 48 | for /f "tokens=* delims==" %%d in (truncatedline.txt) do call :GET_STATUS %%d 49 | goto :EOF 50 | 51 | 52 | :GET_STATUS 53 | set LINE=%1% 54 | set STATUS=%LINE:~0,1% 55 | set NAME=%LINE:~6,255% 56 | if %STATUS% EQU A echo %NAME% >> %OUTPUTFILE% 57 | if %STATUS% EQU X echo %NAME% (disabled) >> %OUTPUTFILE% 58 | goto :EOF 59 | 60 | :END 61 | type %OUTPUTFILE% 62 | del allusers.txt 63 | del disabledusers.txt 64 | del truncatedline.txt 65 | del users.txt 66 | exit 67 | -------------------------------------------------------------------------------- /Get Domain Information/Get Domain Information.amp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 458,466 11 | Assembly references and imported namespaces serialized as XML namespaces 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Get Script Output Auto/README.md: -------------------------------------------------------------------------------- 1 | GetScriptOutputAuto.ps1 2 | ======================= 3 | 4 | A basic script to automate the collection and collation of N-central script output. 5 | 6 | Use at your own risk 7 | 8 | Requirements: 9 | 10 | AE.Net.Mail.dll assembly (see https://github.com/andyedinborough/aenetmail) 11 | 12 | Usage: 13 | 14 | 1. Created a dedicated mailbox for N-central scripting results 15 | 2. Create a new recipient in N-central with an email address pointing to this mailbox 16 | 3. Set $outputDir, $mailServer, $mailPort, $mailUser and $mailPass accordingly 17 | 4. Create a scheduled task to execute .\GetScriptOutputAuto.ps1 periodically 18 | 5. Any scripts you wish to collect, add the N-central scripting mailbox as a recipient for the task output. Give the task name an appropriate description 19 | 20 | That is it. Wait for the results. If you perform the above, and wrap the task in a scheduled task profile, effectively you will end up with a directory in $outputDir for each customer. Each customer directory will contain a folder for the Task Name, and any execution attempts for that script will be output to text file named by the date of execution. Execution across multiple servers will be collated into the one file. -------------------------------------------------------------------------------- /Get-AVDefenderErrorMessage.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | ************************************************************************************************************ 3 | Name: Get-AVDefenderErrorMessage 4 | Version: 0.2 (07th June 2019) 5 | Purpose: Read through error message from AVD Error Manager XML 6 | Pre-Reqs: Powershell 2 7 | 0.2 8 | ************************************************************************************************************ 9 | #> 10 | [System.IntPtr]::Size # an integer whose size is platform-specific. 11 | If ([System.IntPtr]::Size -eq 4) { 12 | $OSVersion = "32-bit" 13 | } Else { 14 | $OSVersion = "64-bit" 15 | } 16 | 17 | If ($OSVersion -eq "64-bit") { 18 | $global:AgentConfigFolder = "$env:systemdrive\Program Files (x86)\N-able Technologies\Windows Agent\config" 19 | } Else { 20 | $global:AgentConfigFolder = "$env:systemdrive\Program Files\N-able Technologies\Windows Agent\config" 21 | } 22 | 23 | $LogLocation = "$agentconfigfolder\AVDefenderErrorManager.xml" 24 | Write-Host "Log Location: " -Nonewline 25 | Write-Host "$LogLocation" -ForegroundColor Yellow 26 | 27 | [xml]$AVDDefenderError = Get-Content "$LogLocation" 28 | $nodeexists = $AVDDefenderError.AVDefenderErrorManager.MessageHolders.DictionarySerializableOfStringArrayOfString.ArrayOfSerializableKeyValuePairOfStringArrayOfString.SerializableKeyValuePairOfStringArrayOfString 29 | 30 | If ($nodeexists) { 31 | $ErrorMsg = $AVDDefenderError.AVDefenderErrorManager.MessageHolders.DictionarySerializableOfStringArrayOfString.ArrayOfSerializableKeyValuePairOfStringArrayOfString.SerializableKeyValuePairOfStringArrayOfString.Value.String[1] 32 | } Else { 33 | $ErrorMsg = "None" 34 | } 35 | 36 | If ($errormsg -eq "None") { 37 | Write-Host "Error: " -nonewline; Write-Host "$ErrorMsg`n" -ForegroundColor Green 38 | } Else { 39 | Write-Host "Error: " -nonewline; Write-Host "$ErrorMsg`n" -ForegroundColor Red 40 | } 41 | -------------------------------------------------------------------------------- /Huntress Agent/Get-HuntressOrphanedAgent.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | ********************************************************************************************************************************** 3 | Name: Get-HuntressOrphanedAgent.ps1 4 | Version: 0.1 (04/012/2021) 5 | Purpose: Get Huntress Agent Oprhan Status based on Log analysis 6 | Created by: Prejay Shah 7 | Thanks to: The Team at Huntress for creating the initial CW Automate Script this is adapted from. 8 | https://support.huntress.io/hc/en-us/articles/4404004935059-ConnectWise-Automate-Remote-monitor-orphaned-agent- 9 | 10 | Version History: 0.1.0.0 - Initial Release. 11 | ********************************************************************************************************************************** 12 | #> 13 | 14 | $Version = '0.1' 15 | $VersionDate = '(04/12/2021)' 16 | $AgentStatus = 'ACTIVE' 17 | 18 | Write-Host "Get-HuntressOrphanedAgent $Version ($VersionDate)" -ForegroundColor Green 19 | 20 | $file = 'C:\Program Files (x86)\Huntress\HuntressAgent.log' 21 | 22 | if (-not(Test-Path -Path $file -PathType Leaf)) { 23 | $file = 'C:\Program Files\Huntress\HuntressAgent.log' 24 | Get-Content $file -Tail 10 | ForEach-Object { if ($_ -match '401') {$agentstatus = 'ORPHANED'}} 25 | } 26 | else { 27 | Get-Content $file -Tail 10 | ForEach-Object { if ($_ -match '401') {$agentstatus = 'ORPHANED'}} 28 | } 29 | 30 | if ($agentstatus -eq 'ACTIVE') { 31 | Write-Host "Agent Status: " -foregroundcolor Cyan -nonewline; Write-Host "$agentstatus" -ForegroundColor Green 32 | } 33 | else { 34 | Write-Host "Agent Status: " -foregroundcolor Cyan -nonewline; Write-Host "$agentstatus" -ForegroundColor Red 35 | } -------------------------------------------------------------------------------- /Import Registry File/AMP_UPLOAD_READ_ME.txt: -------------------------------------------------------------------------------- 1 | There are two methods to upload an Automation Policy (AMP) into N-central. Choose one of the following methods: 2 | 3 | How to upload AMP directly into N-central: 4 | 5 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 6 | 2. Choose on the OS Level from top-left drop down 7 | 3. Expand Configuration Pane -> Scheduled Tasks -> Script/Software Repository 8 | 4. Click Add -> Select Automation Policy 9 | 5. Click Browse -> Select .AMP 10 | 6. Click OK -> OK 11 | 12 | 13 | 14 | How to upload AMP through Automation Designer into N-central: 15 | 16 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 17 | 2. Choose on the OS Level from top-left drop down 18 | 3. From Actions Pane -> Click Start Automation Manager 19 | 4. From within the Automation Manager Designer, choose File -> Open 20 | 5. Browse to .AMP 21 | 6. Click OK 22 | 7. From within the Automation Manager Designer, choose File -> Upload -------------------------------------------------------------------------------- /Import Registry File/Import Registry File.amp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | StartObject.RegFile 7 | 3d23f079-a7d2-4012-bd9c-d72c80cdf980 8 | PolicyExecutor.ImportRegistryFile, PolicyExecutionEngine, Version=1.5.0.13, Culture=neutral, PublicKeyToken=null 9 | RegistryFile 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 365,270 18 | Assembly references and imported namespaces serialized as XML namespaces 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Import Registry File/Import Registry File.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Import Registry File/Import Registry File.jpg -------------------------------------------------------------------------------- /Install PowerShell 3/installPS30.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | installPS30.ps1 3 | Originally by: Evan Morrissey 4 | Modified by: Tyler Jones 5 | Last Updated: 2014-08-05 6 | 7 | Tests the version of PowerShell and attempts to update it to PowerShell 3.0 8 | #> 9 | 10 | # Find OS architecture 11 | $psVer = $host.version 12 | $os = get-wmiobject win32_operatingsystem 13 | $osArch = "x64" 14 | 15 | if ($os.osarchitecture -match "86") 16 | { 17 | $osArch = "x86" 18 | } 19 | 20 | # Write date and existing PS details for logs 21 | $date = get-date 22 | "PowerShell 3.0 Install/Upgrade: " + $date | Write-Host 23 | "`r`nInstalled PowerShell version: " + $psVer.toString() | Write-Host 24 | 25 | # Check if powershell is already version 3 or higher 26 | if ($psVer.major -ge 3) 27 | { 28 | "`r`nPowerShell is already up to date, exiting" | Write-Host 29 | exit 0 30 | } 31 | 32 | # Check for versions of Windows not compatible with PowerShell 3.0 33 | if (($os.version -lt 6.0) -or ($os.caption -match "vista") -or ($os.version -ge 6.2)) 34 | { 35 | "`r`nPowerShell 3.0 requires Windows 6.0 or greater, and is not compatible with Windows Vista. It is preloaded on Windows 8. No update required/possible. Exiting." | Write-Host 36 | exit 0 37 | } 38 | 39 | 40 | # Declare the function for retrieving the update file 41 | function HTTP-Download 42 | { 43 | param( 44 | $url 45 | , 46 | $fileName 47 | ) 48 | $webClient = New-Object System.Net.WebClient 49 | $localPath = "$env:temp\$fileName" 50 | $remote = $url + $fileName 51 | $ErrorActionPreference = "Stop" 52 | 53 | $path_check = Test-Path $localPath 54 | if($path_check -eq $False){ 55 | try 56 | { 57 | $webClient.downloadFile($remote,$localPath) 58 | return $localPath 59 | } 60 | catch [System.Management.Automation.MethodInvocationException] 61 | { 62 | "Error downloading file" | Write-Host 63 | "Download URL: " + $url | Write-Host 64 | "Full Error message: " | Write-Host 65 | $error[0] | fl * -f | Write-Host 66 | return $false 67 | } 68 | } 69 | else{ 70 | Write-Host "Download already exists. Try running" 71 | return $localPath 72 | } 73 | } 74 | 75 | # Download the installer 76 | "`r`nAttempting to download latest PowerShell installer from Microsoft..." | Write-Host 77 | 78 | # Create the download URL based on the windows version/architecture 79 | $baseURL = "http://download.microsoft.com/download/E/7/6/E76850B8-DA6E-4FF5-8CCE-A24FC513FD16/" 80 | if ($os.version.subString(0,3) -eq 6.1) 81 | { 82 | $psFile = "Windows" + $os.version.subString(0,3) + "-KB2506143-" + $osArch + ".msu" 83 | } 84 | else 85 | { 86 | if ($os.version.subString(0,3) -eq 6.0) 87 | { 88 | $psFile = "Windows" + $os.version.subString(0,3) + "-KB2506146-" + $osArch + ".msu" 89 | } 90 | } 91 | 92 | if ($psFile -eq $null) 93 | { 94 | "`r`nCould not generate a URL for download. Check Windows version to see if PowerShell 3.0 is compatible or required." | Write-Host 95 | exit 0 96 | } 97 | 98 | # Download function call 99 | $dlResult = HTTP-Download $baseURL $psFile 100 | 101 | if ($dlResult -eq $false) 102 | { 103 | "`r`nDownload failed, please update PowerShell manually. Aborting script" | Write-Host 104 | exit 1 105 | } 106 | else 107 | { 108 | # Install Windows Mangement Framework 3.0 (PowerShell 3.0) 109 | & $dlResult /quiet /norestart 110 | $i = 0 111 | while (get-process | ? {$_.processName -eq "wusa"}) 112 | { 113 | start-sleep -seconds 10 114 | $i++ 115 | if ($i -gt 120) 116 | { 117 | "`r`nPowerShell has been trying to install for twenty minutes?!? Aborting!" | Write-Host 118 | get-process | ? {$_.path -eq "wusa"} | stop-process -force 119 | exit 1 120 | } 121 | } 122 | "`r`nInstall complete. A reboot is required..." | Write-Host 123 | "`r`nPowerShell 3.0 Install complete: " + (get-date) | Write-Host 124 | } -------------------------------------------------------------------------------- /Install Windows Update Agent/Install Windows Update Agent.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Install Windows Update Agent/Install Windows Update Agent.zip -------------------------------------------------------------------------------- /Intel Chipset Upgrade Script/IUS-Nablev1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Intel Chipset Upgrade Script/IUS-Nablev1.pdf -------------------------------------------------------------------------------- /Intel Chipset Upgrade Script/inv.bat: -------------------------------------------------------------------------------- 1 | cd c:\programs\intel\ius 2 | iua /inv 3 | -------------------------------------------------------------------------------- /Intel Chipset Upgrade Script/upg.bat: -------------------------------------------------------------------------------- 1 | cd c:\programs\intel\ius 2 | iua /u 3 | -------------------------------------------------------------------------------- /Lock and Unlock USB/lock.vbs: -------------------------------------------------------------------------------- 1 | HKEY_LOCAL_MACHINE = &H80000002 2 | 3 | Err.Clear 4 | 5 | On Error Resume Next 6 | Set objWMIService = GetObject("winmgmts:\\localhost\root\CIMV2") 7 | 8 | Set objReg = GetObject("winmgmts:\\localhost\root\default:StdRegProv") 9 | 10 | strKeyPath = "SYSTEM\CurrentControlSet\Control\StorageDevicePolicies" 11 | 12 | objReg.CreateKey HKEY_LOCAL_MACHINE, strKeyPath 13 | 14 | ValueName = "WriteProtect" 15 | 16 | DwordValue = "1" 17 | 18 | objReg.SetDwordValue HKEY_LOCAL_MACHINE, strKeyPath, ValueName, DwordValue 19 | 20 | -------------------------------------------------------------------------------- /Lock and Unlock USB/unlock.vbs: -------------------------------------------------------------------------------- 1 | ' On Error Resume Next 2 | 3 | HKEY_LOCAL_MACHINE = &H80000002 4 | 5 | On Error Resume Next 6 | Set objWMIService = GetObject("winmgmts:\\localhost\root\CIMV2") 7 | 8 | 9 | dim objNetwork 10 | Dim fso 11 | Dim CurrentDate 12 | Dim LogFile 13 | CurrentDate = Now 14 | Set objNetwork = WScript.CreateObject("WScript.Network") 15 | Set fso = CreateObject("Scripting.FileSystemObject") 16 | strUser = objNetwork.UserDomain 17 | 18 | Set objReg = GetObject("winmgmts:\\localhost\root\default:StdRegProv") 19 | 20 | strKeyPath = "SYSTEM\CurrentControlSet\Control\StorageDevicePolicies" 21 | 22 | objReg.CreateKey HKEY_LOCAL_MACHINE, strKeyPath 23 | 24 | ValueName = "WriteProtect" 25 | 26 | DwordValue = "0" 27 | 28 | objReg.SetDwordValue HKEY_LOCAL_MACHINE, strKeyPath, ValueName, DwordValue 29 | 30 | 31 | -------------------------------------------------------------------------------- /Logoff Users-Lock Workstation/AMP_UPLOAD_READ_ME.txt: -------------------------------------------------------------------------------- 1 | There are two methods to upload an Automation Policy (AMP) into N-central. Choose one of the following methods: 2 | 3 | How to upload AMP directly into N-central: 4 | 5 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 6 | 2. Choose on the OS Level from top-left drop down 7 | 3. Expand Configuration Pane -> Scheduled Tasks -> Script/Software Repository 8 | 4. Click Add -> Select Automation Policy 9 | 5. Click Browse -> Select .AMP 10 | 6. Click OK -> OK 11 | 12 | 13 | 14 | How to upload AMP through Automation Designer into N-central: 15 | 16 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 17 | 2. Choose on the OS Level from top-left drop down 18 | 3. From Actions Pane -> Click Start Automation Manager 19 | 4. From within the Automation Manager Designer, choose File -> Open 20 | 5. Browse to .AMP 21 | 6. Click OK 22 | 7. From within the Automation Manager Designer, choose File -> Upload -------------------------------------------------------------------------------- /Logoff Users-Lock Workstation/Logoff Users-Lock Workstation.amp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 360,339 11 | Assembly references and imported namespaces serialized as XML namespaces 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Logoff Users-Lock Workstation/Logoff Users-Lock Workstation.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Logoff Users-Lock Workstation/Logoff Users-Lock Workstation.jpg -------------------------------------------------------------------------------- /Mac-Download-and-Install-FF/Mac -Download and Install Firefox.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Mac-Download-and-Install-FF/Mac -Download and Install Firefox.pdf -------------------------------------------------------------------------------- /Mac-Download-and-Install-Java/Mac -Download and Install Java.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Mac-Download-and-Install-Java/Mac -Download and Install Java.pdf -------------------------------------------------------------------------------- /MacEnableRemoteManagement/MacEnableRemoteManagement.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/MacEnableRemoteManagement/MacEnableRemoteManagement.pdf -------------------------------------------------------------------------------- /Managed Server Maintenance/AMP_UPLOAD_READ_ME.txt: -------------------------------------------------------------------------------- 1 | There are two methods to upload an Automation Policy (AMP) into N-central. Choose one of the following methods: 2 | 3 | How to upload AMP directly into N-central: 4 | 5 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 6 | 2. Choose on the OS Level from top-left drop down 7 | 3. Expand Configuration Pane -> Scheduled Tasks -> Script/Software Repository 8 | 4. Click Add -> Select Automation Policy 9 | 5. Click Browse -> Select .AMP 10 | 6. Click OK -> OK 11 | 12 | 13 | 14 | How to upload AMP through Automation Designer into N-central: 15 | 16 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 17 | 2. Choose on the OS Level from top-left drop down 18 | 3. From Actions Pane -> Click Start Automation Manager 19 | 4. From within the Automation Manager Designer, choose File -> Open 20 | 5. Browse to .AMP 21 | 6. Click OK 22 | 7. From within the Automation Manager Designer, choose File -> Upload -------------------------------------------------------------------------------- /Managed Server Maintenance/Managed Server Maintenance.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Managed Server Maintenance/Managed Server Maintenance.jpg -------------------------------------------------------------------------------- /Managed Workstation Maint/AMP_UPLOAD_READ_ME.txt: -------------------------------------------------------------------------------- 1 | There are two methods to upload an Automation Policy (AMP) into N-central. Choose one of the following methods: 2 | 3 | How to upload AMP directly into N-central: 4 | 5 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 6 | 2. Choose on the OS Level from top-left drop down 7 | 3. Expand Configuration Pane -> Scheduled Tasks -> Script/Software Repository 8 | 4. Click Add -> Select Automation Policy 9 | 5. Click Browse -> Select .AMP 10 | 6. Click OK -> OK 11 | 12 | 13 | 14 | How to upload AMP through Automation Designer into N-central: 15 | 16 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 17 | 2. Choose on the OS Level from top-left drop down 18 | 3. From Actions Pane -> Click Start Automation Manager 19 | 4. From within the Automation Manager Designer, choose File -> Open 20 | 5. Browse to .AMP 21 | 6. Click OK 22 | 7. From within the Automation Manager Designer, choose File -> Upload -------------------------------------------------------------------------------- /Managed Workstation Maint/Managed Workstation Maint.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Managed Workstation Maint/Managed Workstation Maint.jpg -------------------------------------------------------------------------------- /McAfee Update/mcafeeupdate.bat: -------------------------------------------------------------------------------- 1 | REM ######################################### 2 | REM # # 3 | REM # Copyright Syscon Inc. 2008 # 4 | REM # Written By: Scott Lowell # 5 | REM # # 6 | REM # This script does a silent # 7 | REM # update of the Virus Engine # 8 | REM # & Dat files. # 9 | REM # # 10 | REM # Change Line 2 to the Drive Letter # 11 | REM # of the install path of Mcafee # 12 | REM # # 13 | REM # Change Line 3 to the path of # 14 | REM # the install directory of # 15 | REM # McAfee Enterprise 8.5.0i # 16 | REM # # 17 | REM # Command Line= mcafeeupdate.bat # 18 | REM ######################################### 19 | 20 | cd\ 21 | c: 22 | cd C:\Program Files\McAfee\VirusScan Enterprise 23 | MCUPDATE /update /quiet 24 | -------------------------------------------------------------------------------- /Multiple NC Agents/Cleanup-OldNCAgentVersions.ps1: -------------------------------------------------------------------------------- 1 | $Version = "0.2.4 (18th August 2023)" 2 | Write-Host "Cleanup-OldNCAgentVersions $Version" -ForegroundColor Green 3 | 4 | Function Cleanup-Agents { 5 | # Loop through the subkeys again and delete the ones with older versions 6 | foreach ($subKey in $subKeys) { 7 | $displayName = (Get-ItemProperty -Path "$uninstallKeyPath\$($subKey.PSChildName)" -ErrorAction SilentlyContinue).DisplayName 8 | $version = (Get-ItemProperty -Path "$uninstallKeyPath\$($subKey.PSChildName)" -ErrorAction SilentlyContinue).DisplayVersion 9 | 10 | if ($displayName -eq $targetDisplayName -and $version -ne $highestVersion) { 11 | Write-Host "Removing $($subKey.PSChildName): $displayName $version" -ForegroundColor Red 12 | Remove-Item -Path "$uninstallKeyPath\$($subKey.PSChildName)" -Force 13 | } 14 | } 15 | } 16 | 17 | $targetDisplayName = "Windows Agent" 18 | $uninstallKeyPath = "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall" 19 | 20 | # Get all subkeys under [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall] 21 | $subKeys = Get-ChildItem -Path $uninstallKeyPath | Where-Object { $_.PSChildName -match "^\{.*\}$" } 22 | 23 | # Create an empty array to store the versions of the target application 24 | $versions = @() 25 | 26 | # Loop through each subkey and check if it matches the target display name 27 | foreach ($subKey in $subKeys) { 28 | $displayName = (Get-ItemProperty -Path "$uninstallKeyPath\$($subKey.PSChildName)" -ErrorAction SilentlyContinue).DisplayName 29 | if ($displayName -eq $targetDisplayName) { 30 | $version = (Get-ItemProperty -Path "$uninstallKeyPath\$($subKey.PSChildName)" -ErrorAction SilentlyContinue).DisplayVersion 31 | $versions += $version 32 | } 33 | } 34 | 35 | # Sort the versions in descending order 36 | $versions = $versions | Sort-Object -Descending 37 | 38 | Write-Host "Agents Found: $($versions.Count)" -ForegroundColor Cyan 39 | foreach ($version in $versions) { 40 | Write-Host "$targetDisplayName $version" -ForegroundColor Cyan 41 | } 42 | 43 | if ($versions.Count -le 1) { 44 | $VersionsFound = "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') INFO: No Multiple Agent versions found: $($versions.Count)" 45 | Write-Host "No remnants detected!" -ForegroundColor Green 46 | } 47 | else { 48 | $VersionsFound = "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') WARNING: Multiple Agent versions found: $($versions.Count)" 49 | $highestVersion = $versions[0] # Keep the highest version 50 | Cleanup-Agents 51 | } -------------------------------------------------------------------------------- /Open FTP Ports in Windows Firewall/OpenFTP.bat: -------------------------------------------------------------------------------- 1 | rem Open FTP Ports in the Windows 2008/Windows 7/Windows Vista Firewall 2 | 3 | rem This script will allow FTP to pass through on it's dynamic ports allowing PASV Mode to work. 4 | 5 | rem 1) Open port 21 on the firewall 6 | 7 | netsh advfirewall firewall add rule name="FTP (no SSL)" action=allow protocol=TCP dir=in localport=21 8 | 9 | rem 2) Configure Dynamic Ports 10 | 11 | netsh advfirewall set global StatefulFtp enable 12 | 13 | -------------------------------------------------------------------------------- /Parse Script Output/ConcatCSV.ps1: -------------------------------------------------------------------------------- 1 | param ([string] $Path) 2 | 3 | $server = "" 4 | $database = "" 5 | $userID = "" 6 | $password = "" 7 | 8 | $sqlConnectionString="Server=$server;Database=$database;User ID=$userID;Password=$password;" 9 | $cn = New-Object System.Data.SQLClient.SQLConnection 10 | $cn.ConnectionString = $sqlConnectionString 11 | 12 | Write-Host "Checking $Path for CSV files..." 13 | $csvItems = Get-ChildItem -LiteralPath $Path -Filter "*.csv" 14 | 15 | $appliances = @{} 16 | 17 | $outFileName = $csvItems[0].PSChildName.Split("_")[1] 18 | Remove-Item -Force -ErrorAction SilentlyContinue "$Path\$outFileName" 19 | 20 | $csvItems | % { 21 | $csvItem = $_ 22 | 23 | $applianceId = $csvItem.PSChildName.Split("_")[0] 24 | 25 | $applianceInfo = New-Object PSObject -Property @{ 26 | "CustomerName" = "NA" 27 | "ApplianceName" = "NA" 28 | } 29 | 30 | $appliances.Add([int] $applianceId, $applianceInfo) 31 | } 32 | 33 | $sql = "SELECT app.applianceid, cust.customername, app.appliancename " 34 | $sql += "FROM appliance app " 35 | $sql += "INNER JOIN customer cust ON app.customerid = cust.customerid " 36 | $sql += "WHERE app.applianceid IN ($($appliances.Keys -Join ", "))" 37 | 38 | $cn.Open() 39 | 40 | $cmd = New-Object System.Data.SqlClient.SqlCommand 41 | $cmd.Connection = $cn 42 | $cmd.CommandText = $sql 43 | $cmd.CommandTimeout = 300 44 | 45 | Write-Host "Querying ODS to resolve Appliance IDs to Customer and Device Names..." 46 | $result = $cmd.ExecuteReader() 47 | 48 | Write-Host "Processing results..." 49 | $result | % { 50 | $resultApplianceId = $result.GetInt32(0) 51 | $resultCustomerName = $result.GetString(1) 52 | $resultApplianceName = $result.GetString(2) 53 | 54 | $applianceAttributes = $appliances[$resultApplianceId] 55 | $applianceAttributes.ApplianceName = $resultApplianceName 56 | $applianceAttributes.CustomerName = $resultCustomerName 57 | } 58 | 59 | $fileCount = 0 60 | 61 | Write-Host "Concatenating CSV files and adding CustomerName and ApplianceName columns..." 62 | $csvItems | % { 63 | $csvItem = $_ 64 | 65 | $sourceFilePath = $csvItem.FullName 66 | 67 | $applianceId = $csvItem.PSChildName.Split("_")[0] 68 | 69 | $applianceAttributes = $appliances[[int] $applianceId] 70 | 71 | $csvContent = Get-Content $sourceFilePath 72 | 73 | if ($fileCount -eq 0) 74 | { 75 | Add-Content -LiteralPath "$Path\$outFileName" "`"CustomerName`",`"ApplianceName`",$($csvContent[0])" 76 | } 77 | 78 | for ($i = 1; $i -lt $csvContent.Count; $i++) 79 | { 80 | Add-Content -LiteralPath "$Path\$outFileName" "`"$($applianceAttributes.CustomerName)`",`"$($applianceAttributes.ApplianceName)`",$($csvContent[$i])" 81 | } 82 | 83 | $fileCount++ 84 | } -------------------------------------------------------------------------------- /Parse Script Output/README: -------------------------------------------------------------------------------- 1 | ConcatCSV.ps1: 2 | 3 | This will read in files of the form xxxx_SomeStr.csv, where xxxx is the ApplianceID of the device on which the CSV was generated. It will query the ODS for the Customer Name and Device Name. All CSVs will then be concatenated together with two extra columns for these fields. -------------------------------------------------------------------------------- /Powershell Set Execution Policy to allow running scripts/PowershellAllowRunningScripts.bat: -------------------------------------------------------------------------------- 1 | powershell Set-ExecutionPolicy Remotesigned -Force -------------------------------------------------------------------------------- /Powershell Set Execution Policy to allow running scripts/PowershellAllowRunningScripts.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Powershell Set Execution Policy to allow running scripts/PowershellAllowRunningScripts.pdf -------------------------------------------------------------------------------- /Powershell Version check and update - AMP, service, and templates.7z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Powershell Version check and update - AMP, service, and templates.7z -------------------------------------------------------------------------------- /Reboot Windows/RebootWindows.vbs: -------------------------------------------------------------------------------- 1 | '************************************************************************************* 2 | '******* Script: Reboot 3 | '******* Description: Creates a scheduled task to reboot the target device 4 | '******* Notes: As per http://msdn.microsoft.com/en-us/library/bb736357(VS.85).aspx, 5 | ' this script will only run on XP, Vista, Windows 2003 and Windows 2008. 6 | '******* Author: Chris Reid 7 | '******* Date: Oct. 21st, 2008 8 | '************************************************************************************* 9 | 10 | 11 | ' Let's declare some variables 12 | Option Explicit 13 | dim timenow, Shell, cmd1, cmd2, cmd3 14 | 15 | ' Let's format the timestring so that the 'schtasks' command can understand it 16 | timenow = FormatDateTime(Time(), vbShortTime) 17 | 18 | 19 | 'Let's make sure that there's not already a scheduled task called 'RebootThisPC' 20 | Set Shell = CreateObject("Wscript.Shell") 21 | cmd1 = "%COMSPEC% /c schtasks /delete /tn RebootThisPC /f" 22 | Shell.Run cmd1,7,TRUE 23 | Set Shell = Nothing 24 | 25 | 26 | ' Let's create the scheduled task to reboot the machine 'NOW' 27 | Set Shell = CreateObject("Wscript.Shell") 28 | cmd2 = "%COMSPEC% /c schtasks /create /RU " & chr(34) & "NT AUTHORITY\SYSTEM" & chr(34) & " /SC ONCE /TN RebootThisPC /TR " & chr(34) & "shutdown -r -f -t 60" & chr(34) & " /st " & timenow & ":59" 29 | Shell.Run cmd2,7,TRUE 30 | Set Shell = Nothing 31 | 32 | ' Finally - let's run the scheduled task 33 | Set Shell = CreateObject("Wscript.Shell") 34 | cmd3 = "%COMSPEC% /c schtasks /run /TN RebootThisPC" 35 | Shell.Run cmd3,7,TRUE 36 | Set Shell = Nothing 37 | -------------------------------------------------------------------------------- /Remove AV Entries in WMI/Remove AV Entries in WMI.vbs: -------------------------------------------------------------------------------- 1 | '******************************************************************************* 2 | '* Script: RmvAVWMI.vbs 3 | '* Purpose: Removes any AntivirusProduct from Windows Security Center 4 | '* Created: 2011/06/26 5 | '* Created by: Brian Hershey 6 | '* Supported OS: XP, Vista 7 | '******************************************************************************* 8 | Option Explicit 9 | '* ------------------------- Global Variable Declarations ------------------------------ 10 | Dim strComputer, oAVWMI, oASWMI, oFWWMI, colAS, colFW, colAV, objAntiSpywareProduct, objFirewallProduct, objAntiVirusProduct, strASGuid, strFWGuid, strAVGuid, strAV, strFW, strAS, objAVSWbemServices, objASSWbemServices, objFWSWbemServices, strAVInstance, strASInstance, strFWInstance, Err 11 | 12 | 13 | '============================== Main Script ============================= 14 | 15 | '--- Connect to WMI \root\SecurityCenter 16 | strComputer = "." 17 | Set oAVWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\SecurityCenter") 18 | Set oASWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\SecurityCenter") 19 | Set oFWWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\SecurityCenter") 20 | Set colAV = oAVWMI.ExecQuery("Select * from AntiVirusProduct") 21 | Set colAS = oASWMI.ExecQuery("Select * from AntiSpywareProduct") 22 | Set colFW = oFWWMI.ExecQuery("Select * from FirewallProduct") 23 | 24 | 25 | '--- Remove ANY AV products that are registered with Windows Security Center 26 | If colAV.Count > 0 Then 27 | 28 | ' --- Start loop for each AV product 29 | For Each objAntiVirusProduct In colAV 30 | 31 | ' -- Get the Guid 32 | strAVGuid = objAntiVirusProduct.instanceGuid 33 | Set colAV = oAVWMI.ExecQuery("Select " & strAVGuid & " from objAntiVirusProduct") 34 | 35 | 36 | ' -- Setup a connection to Wbem then delete Sav Instance 37 | strAVInstance = "AntiVirusProduct.instanceGuid='" & strAVGuid & "'" 38 | Set objAVSWbemServices = GetObject("winmgmts:\\" & "." & "\root\SecurityCenter") 39 | objAVSWbemServices.Delete strAVInstance 40 | 41 | 42 | ' Release SwbemServices object 43 | Set objAVSWbemServices = Nothing 44 | 45 | 46 | 47 | next ' --- process next product 48 | 49 | 50 | '--- Remove ANY Antispyware products that are registered with Windows Security Center 51 | If colAS.Count > 0 Then 52 | 53 | ' --- Start loop for each AS product 54 | For Each objAntiSpywareProduct In colAS 55 | 56 | ' -- Get the Guid 57 | strASGuid = objAntiSpywareProduct.instanceGuid 58 | Set colAS = oASWMI.ExecQuery("Delete " & strASGuid & " from objAntiSpywareProduct") 59 | 60 | 61 | ' -- Setup a connection to Wbem then delete AS Instance 62 | strASInstance = "AntiSpywareProduct.instanceGuid='" & strASGuid & "'" 63 | Set objASSWbemServices = GetObject("winmgmts:\\" & "." & "\root\SecurityCenter") 64 | objASSWbemServices.Delete strASInstance 65 | 66 | ' Release SwbemServices object 67 | Set objASSWbemServices = Nothing 68 | 69 | 70 | next ' --- process next product 71 | 72 | '--- Remove ANY Firewall products that are registered with Windows Security Center 73 | If colFW.Count > 0 Then 74 | 75 | ' --- Start loop for each Firewall product 76 | For Each objFirewallProduct In colFW 77 | 78 | ' -- Get the Guid 79 | strFWGuid = objFirewallProduct.instanceGuid 80 | Set colFW = oFWWMI.ExecQuery("Delete " & strFWGuid & " from objFirewallProduct") 81 | 82 | 83 | ' -- Setup a connection to Wbem then delete Firewall Instance 84 | strFWInstance = "FirewallProduct.instanceGuid='" & strFWGuid & "'" 85 | Set objFWSWbemServices = GetObject("winmgmts:\\" & "." & "\root\SecurityCenter") 86 | objFWSWbemServices.Delete strFWInstance 87 | 88 | ' Release SwbemServices object 89 | Set objFWSWbemServices = Nothing 90 | 91 | next ' --- process next product 92 | 93 | End If 94 | End If 95 | End If 96 | 97 | 98 | 99 | ' --- Release all resources 100 | Set objAntiVirusProduct = Nothing 101 | Set objAntiSpywareProduct = Nothing 102 | Set objFirewallProduct = Nothing 103 | Set colAV = Nothing 104 | Set colAS = Nothing 105 | Set colFW = Nothing 106 | Set oAVWMI = Nothing 107 | Set oASWMI = Nothing 108 | Set oFWWMI = Nothing 109 | 110 | If Err <> 0 Then 111 | WScript.Quit(0) ' --- Quit, no errors 112 | Else 113 | WScript.Quit(1) ' --- Quit with errors 114 | End If -------------------------------------------------------------------------------- /Repair-PME/LatestVersion.xml: -------------------------------------------------------------------------------- 1 | 2 | 0.2.1.6 3 | 4 | -------------------------------------------------------------------------------- /Reset WMI/ResetWMI.vbs: -------------------------------------------------------------------------------- 1 | '////////////////////////////////////////////////////////////////////////////////////////////////////// 2 | '////////////////////////////////////////////////////////////////////////////////////////////////////// 3 | ' 4 | ' Clear out & Reset WMI & restart all related Services. 5 | ' 6 | ' Alex Woolsey - 11/04/2008 7 | ' 8 | ' 9 | '////////////////////////////////////////////////////////////////////////////////////////////////////// 10 | '////////////////////////////////////////////////////////////////////////////////////////////////////// 11 | On Error Resume Next 12 | 13 | Set WshShell = CreateObject("Wscript.Shell") 14 | If (right(Ucase(WScript.FullName),11)="WSCRIPT.EXE") Then 15 | WshShell.Run WshShell.ExpandEnvironmentStrings("%COMSPEC%") & " /C cscript.exe """ & Wscript.ScriptFullName & """" 16 | Wscript.Quit 17 | End If 18 | 19 | With WshShell 20 | oReport "Running WMI Kill & Re-Register Commands.... Please Wait..." 21 | .Run("winmgmt /clearadap"), 0, True 22 | .Run("winmgmt /kill"), 0, True 23 | .Run("winmgmt /unregserver"), 0, True 24 | .Run("winmgmt /regserver"), 0, True 25 | .Run("winmgmt /resyncperf"), 0, True 26 | .Run("wmiadap /c"), 0, True 27 | .Run("wmiadap /f"), 0, True 28 | oReport "WMI Commands Completed...." & VbCrLf 29 | End With 30 | 31 | oReport "Stopping Windows Management Dependent Services...." 32 | strComputer = "." 33 | Set objWMIService = GetObject("winmgmts:" _ 34 | & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") 35 | 36 | Set colServiceList = objWMIService.ExecQuery("Associators of " _ 37 | & "{Win32_Service.Name='winmgmt'} Where " _ 38 | & "AssocClass=Win32_DependentService " & "Role=Antecedent" ) 39 | 40 | For Each objService in colServiceList 41 | oReport "Stopping " & objService.DisplayName 42 | objService.StopService() 43 | Next 44 | 45 | oReport "Sleeping for 20 Seconds to Allow System Catchup..." 46 | Wscript.Sleep 20000 47 | 48 | oReport "Stopping Windows Management Services...." 49 | Set colServiceList = objWMIService.ExecQuery _ 50 | ("Select * from Win32_Service where Name='winmgmt'") 51 | For Each objService in colServiceList 52 | oReport "Stopping " & objService.DisplayName 53 | errReturn = objService.StopService() 54 | Next 55 | 56 | oReport "Sleeping for 20 Seconds to Allow System Catchup..." 57 | Wscript.Sleep 20000 58 | 59 | Set objWMIService = GetObject("winmgmts:" _ 60 | & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") 61 | Set colServiceList = objWMIService.ExecQuery _ 62 | ("Select * from Win32_Service where Name='winmgmt'") 63 | For Each objService in colServiceList 64 | oReport "Restarting " & objService.DisplayName 65 | errReturn = objService.StartService() 66 | Next 67 | 68 | Set objWMIService = GetObject("winmgmts:" _ 69 | & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") 70 | 71 | Set colServiceList = objWMIService.ExecQuery("Associators of " _ 72 | & "{Win32_Service.Name='winmgmt'} Where " _ 73 | & "AssocClass=Win32_DependentService " & "Role=Antecedent" ) 74 | 75 | For Each objService in colServiceList 76 | oReport "Restarting " & objService.DisplayName 77 | objService.StartService() 78 | Next 79 | 80 | strMessage = "Press the ENTER key to continue. " 81 | Wscript.StdOut.Write strMessage 82 | 83 | Do While Not WScript.StdIn.AtEndOfLine 84 | Input = WScript.StdIn.Read(1) 85 | Loop 86 | 87 | Function oReport(strMessage) 88 | Wscript.Echo VbTab & strMessage 89 | End Function 90 | -------------------------------------------------------------------------------- /Reset_Probe_Password/AMP_UPLOAD_READ_ME.txt: -------------------------------------------------------------------------------- 1 | There are two methods to upload an Automation Policy (AMP) into N-central. Choose one of the following methods: 2 | 3 | How to upload AMP directly into N-central: 4 | 5 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 6 | 2. Choose on the OS Level from top-left drop down 7 | 3. Expand Configuration Pane -> Scheduled Tasks -> Script/Software Repository 8 | 4. Click Add -> Select Automation Policy 9 | 5. Click Browse -> Select .AMP 10 | 6. Click OK -> OK 11 | 12 | 13 | 14 | How to upload AMP through Automation Designer into N-central: 15 | 16 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 17 | 2. Choose on the OS Level from top-left drop down 18 | 3. From Actions Pane -> Click Start Automation Manager 19 | 4. From within the Automation Manager Designer, choose File -> Open 20 | 5. Browse to .AMP 21 | 6. Click OK 22 | 7. From within the Automation Manager Designer, choose File -> Upload -------------------------------------------------------------------------------- /Reset_Probe_Password/Reset_Probe_Password.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Reset_Probe_Password/Reset_Probe_Password.jpg -------------------------------------------------------------------------------- /Run CleanMgr/AMP_UPLOAD_READ_ME.txt: -------------------------------------------------------------------------------- 1 | There are two methods to upload an Automation Policy (AMP) into N-central. Choose one of the following methods: 2 | 3 | How to upload AMP directly into N-central: 4 | 5 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 6 | 2. Choose on the OS Level from top-left drop down 7 | 3. Expand Configuration Pane -> Scheduled Tasks -> Script/Software Repository 8 | 4. Click Add -> Select Automation Policy 9 | 5. Click Browse -> Select .AMP 10 | 6. Click OK -> OK 11 | 12 | 13 | 14 | How to upload AMP through Automation Designer into N-central: 15 | 16 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 17 | 2. Choose on the OS Level from top-left drop down 18 | 3. From Actions Pane -> Click Start Automation Manager 19 | 4. From within the Automation Manager Designer, choose File -> Open 20 | 5. Browse to .AMP 21 | 6. Click OK 22 | 7. From within the Automation Manager Designer, choose File -> Upload -------------------------------------------------------------------------------- /Run CleanMgr/Run CleanMgr.amp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 365,783 11 | Assembly references and imported namespaces serialized as XML namespaces 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Run CleanMgr/Run CleanMgr.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Run CleanMgr/Run CleanMgr.jpg -------------------------------------------------------------------------------- /Run MalwareBytes/RunMalwareBytes.vbs: -------------------------------------------------------------------------------- 1 | ' ################################################################################### 2 | ' # Copyright 2009 by KKI Technologies # 3 | ' # All Rights Reserved # 4 | ' # www.kkitechnologies.com # 5 | ' # Edited by Jake Richie for execution # 6 | ' ################################################################################### 7 | 8 | 9 | ' Script Name: RunMalwareBytes.vbs 10 | ' Description: This VBS file will run the mbam.exe program with the following switches: 11 | ' /minimized - this minimizes the program to the taskbar 12 | ' /runupdate - runs autoupdate as soon as the program starts 13 | ' /quickscanterminate - starts a quick scan immediately and terminates the program after completion 14 | 15 | 16 | ' Version History 17 | 18 | ' 1.1 - Added support for x64 machines by making the script use the %ProgramFiles(x86)% variable, instead of hardcoding the path to C:\Program Files\ (Feb 16th, 2012) 19 | 20 | ' 1.0 - Initial Release (2009) 21 | 22 | 23 | 24 | 25 | 26 | 27 | ' Lets Determine if this is a 32-bit machine or a 64-bit machine (as this will determine what environment variable this script calls) 28 | Set WshShell = CreateObject("WScript.Shell") 29 | Set output = Wscript.stdout 30 | Set objWMIService = GetObject("winmgmts:\\" & "." & "\root\CIMV2") 31 | Set colItems = objWMIService.ExecQuery("SELECT AddressWidth FROM Win32_Processor where DeviceID='CPU0'", "WQL", _ 32 | wbemFlagReturnImmediately + wbemFlagForwardOnly) 33 | 34 | For each objItem in colItems 35 | AddressWidth = objItem.AddressWidth 36 | Next 37 | 38 | 39 | If AddressWidth = 64 Then 40 | 'This is a 64-bit machine 41 | ProgramFiles = WshShell.ExpandEnvironmentStrings("%PROGRAMFILES(x86)%") 42 | output.writeline "This is a 64-bit machine; Malware Bytes should be located in: " & ProgramFiles & "\Malwarebytes' Anti-Malware\" 43 | ElseIf AddressWidth = 32 Then 44 | 'This is a 32-bit machine 45 | ProgramFiles = WshShell.ExpandEnvironmentStrings("%PROGRAMFILES%") 46 | output.writeline "This is a 32-bit machine; Malware Bytes should be located in: " & ProgramFiles & "\Malwarebytes' Anti-Malware\" 47 | Else 48 | 'Windows doesn't know what OS Type it's running 49 | output.writeline "The type of OS is unknown - the script can't detect if it's 32-bit or 64-bit." 50 | End If 51 | 52 | 53 | 54 | ' Run the command 55 | Set Shell = CreateObject ("Wscript.shell") 56 | cmdline="" & chr(34) & ProgramFiles & "\Malwarebytes' Anti-Malware\mbam.exe" & chr(34) & "/minimized /runupdate /quickscanterminate" 57 | Shell.Run cmdline,7,TRUE 58 | Set Shell=Nothing 59 | -------------------------------------------------------------------------------- /Run Sophos Scan/SophosScanXPVistaWin7Srv2k3Srv2k8x32.bat.txt: -------------------------------------------------------------------------------- 1 | cd "C:\Program Files\Sophos\Sophos Anti-Virus\" 2 | SAV32CLI -F -PUA -REMOVE -NC -S -P=C:\SAVScanLog.TXT 3 | -------------------------------------------------------------------------------- /Run Sophos Scan/SophosScanXPVistaWin7Srv2k3Srv2k8x64.bat.txt: -------------------------------------------------------------------------------- 1 | cd "C:\Program Files (x86)\Sophos\Sophos Anti-Virus\" 2 | SAV32CLI -F -PUA -REMOVE -NC -S -P=C:\SAVScanLog.TXT 3 | -------------------------------------------------------------------------------- /Run Windows Defender Scan/RunDefender.vbs: -------------------------------------------------------------------------------- 1 | ' Script Name: RunDefender.vbs 2 | ' Description: This will run a Windows Defender scan. 3 | 4 | 5 | 'Run the command 6 | Set Shell = CreateObject("Wscript.Shell") 7 | Set filesys = CreateObject("Scripting.FileSystemObject") 8 | PFiles=Shell.ExpandEnvironmentStrings("%ProgramFiles%") 9 | Comspec=Shell.ExpandEnvironmentStrings("%COMSPEC%") 10 | path = PFiles & "\Windows Defender\MpCmdRun.exe" 11 | If filesys.FileExists(path) Then 12 | cmdline = Comspec & " /c """ & path & """ -scan" 13 | Shell.Run cmdline,7,TRUE 14 | End If 15 | 16 | Set filesys = Nothing 17 | Set Shell = Nothing -------------------------------------------------------------------------------- /RunSpyBot-Split/RunSpyBot.vbs: -------------------------------------------------------------------------------- 1 | '########################################## 2 | '# Copyright 2006 by N-able Technologies # 3 | '# All Rights Reserved # 4 | '# May not be reproduced or redistributed # 5 | '# Without written consent from N-able # 6 | '# Technologies # 7 | '# www.n-able.com # 8 | '########################################## 9 | 10 | 11 | 12 | ' Script Name: RunSpyBot.vbs 13 | ' Description: This VBS file will run the spybotsd.exe program with the following switches: 14 | ' 15 | ' /taskbarhide - this runs the program invisibly 16 | ' /autoupdate - runs autoupdate as soon as the program starts 17 | ' /autocheck - starts scanning immediately 18 | ' /autofix - automatically fixes problems that were detected 19 | ' /autoclose - closes the program once it's finished 20 | 21 | 22 | 23 | 'Run the command 24 | Set Shell = CreateObject("Wscript.Shell") 25 | cmdline = "" & Chr(34) & "C:\Program Files\Spybot - Search & Destroy\spybotsd.exe" & Chr(34) & " /taskbarhide /autocheck /autofix /autoclose" 26 | Shell.Run cmdline,7,TRUE 27 | Set Shell = Nothing -------------------------------------------------------------------------------- /RunSpyBot-Split/RunSpyBotUPD.vbs: -------------------------------------------------------------------------------- 1 | '########################################## 2 | '# Copyright 2006 by N-able Technologies # 3 | '# All Rights Reserved # 4 | '# May not be reproduced or redistributed # 5 | '# Without written consent from N-able # 6 | '# Technologies # 7 | '# www.n-able.com # 8 | '########################################## 9 | 10 | 11 | 12 | ' Script Name: RunSpyBot.vbs 13 | ' Description: This VBS file will run the spybotsd.exe program with the following switches: 14 | ' 15 | ' /taskbarhide - this runs the program invisibly 16 | ' /autoupdate - runs autoupdate as soon as the program starts 17 | ' /autocheck - starts scanning immediately 18 | ' /autofix - automatically fixes problems that were detected 19 | ' /autoclose - closes the program once it's finished 20 | 21 | 22 | 23 | 'Run the command 24 | Set Shell = CreateObject("Wscript.Shell") 25 | cmdline = "" & Chr(34) & "C:\Program Files\Spybot - Search & Destroy\spybotsd.exe" & Chr(34) & " /taskbarhide /autoupdate /autoclose" 26 | Shell.Run cmdline,7,TRUE 27 | Set Shell = Nothing -------------------------------------------------------------------------------- /Runbook - CleanupAndDeploy v3.3/AgentCleanup.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Runbook - CleanupAndDeploy v3.3/AgentCleanup.exe -------------------------------------------------------------------------------- /Runbook - CleanupAndDeploy v3.3/Using the Agent Clean Up Utility.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Runbook - CleanupAndDeploy v3.3/Using the Agent Clean Up Utility.docx -------------------------------------------------------------------------------- /Runbook - CleanupAndDeploy v3.3/installNableAgent.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cls 3 | 4 | title Installing N-able Remote Monitoring Software 5 | 6 | SET "server=%1" 7 | SET "customerID=%2" 8 | SET "installerLocation=%3" 9 | SET "minVersion=%4" 10 | SET "alreadyInstalled=The N-able Agent is installed" 11 | SET "notInstalled=The N-able Agent is not yet installed, installing it now..." 12 | SET "programFiles=c:\program files" 13 | SET "cleanUp=Removing old Agent..." 14 | SET "missingArgs=One or more parameters were not specified" 15 | SET "counter=0" 16 | 17 | 18 | 19 | REM Check to see if its x86 or x64 20 | IF %PROCESSOR_ARCHITECTURE% EQU AMD64 ( SET "programFiles=%programFiles% (x86)" ) 21 | 22 | REM Debug Information 23 | echo %server% 24 | echo %customerID% 25 | echo %installerLocation% 26 | echo %programFiles% 27 | echo %minVersion% 28 | 29 | IF %server% == "" GOTO ERROR 30 | IF %customerID% == "" GOTO ERROR 31 | IF %installerLocation% == "" GOTO ERROR 32 | IF %minVersion% == "" GOTO ERROR 33 | 34 | \\%installerLocation%\AgentCleanup.exe %minVersion% 35 | GOTO CONTINUE 36 | 37 | :CONTINUE 38 | IF %counter% == 2 GOTO END 39 | IF NOT EXIST "%programFiles%\N-Able Technologies\Windows Agent\bin\agent.exe" ( GOTO INSTALL ) else ( GOTO AlreadyInstalled ) 40 | GOTO END 41 | 42 | :INSTALL 43 | echo %notInstalled% 44 | \\%installerLocation%\WindowsAgentSetup.exe /s /v" /qn CUSTOMERID=%customerID% CUSTOMERSPECIFIC=1 SERVERPROTOCOL=HTTPS SERVERADDRESS=%server% SERVERPORT=443" 45 | set /a counter=counter+1 46 | GOTO CONTINUE 47 | 48 | :AlreadyInstalled 49 | echo %AlreadyInstalled% 50 | GOTO END 51 | 52 | :ERROR 53 | echo %missingArgs% 54 | 55 | :END 56 | -------------------------------------------------------------------------------- /Runbook - KaseyaMigrationandRemoval/KaseyaMigrationandRemoval.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Runbook - KaseyaMigrationandRemoval/KaseyaMigrationandRemoval.exe -------------------------------------------------------------------------------- /SQL Optimization/AMP_UPLOAD_READ_ME.txt: -------------------------------------------------------------------------------- 1 | There are two methods to upload an Automation Policy (AMP) into N-central. Choose one of the following methods: 2 | 3 | How to upload AMP directly into N-central: 4 | 5 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 6 | 2. Choose on the OS Level from top-left drop down 7 | 3. Expand Configuration Pane -> Scheduled Tasks -> Script/Software Repository 8 | 4. Click Add -> Select Automation Policy 9 | 5. Click Browse -> Select .AMP 10 | 6. Click OK -> OK 11 | 12 | 13 | 14 | How to upload AMP through Automation Designer into N-central: 15 | 16 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 17 | 2. Choose on the OS Level from top-left drop down 18 | 3. From Actions Pane -> Click Start Automation Manager 19 | 4. From within the Automation Manager Designer, choose File -> Open 20 | 5. Browse to .AMP 21 | 6. Click OK 22 | 7. From within the Automation Manager Designer, choose File -> Upload -------------------------------------------------------------------------------- /SQL Optimization/SQL Optimization.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/SQL Optimization/SQL Optimization.jpg -------------------------------------------------------------------------------- /Scripting Examples/CreateARegistryValue.vbs: -------------------------------------------------------------------------------- 1 | ' VB Script Document 2 | option explicit 3 | dim Shell, strKeyPath, strKeyName, strKeyValue 4 | 5 | 6 | 7 | 8 | 'Define the registry path and value to be created 9 | strKeyPath = "HKEY_CURRENT_USER\SOFTWARE\N-able Technologies\" 10 | strKeyName = "My First Registry Key" 11 | strKeyValue = "Look! A registry value!" 12 | 13 | 'Populate the new key with the appropriate value 14 | Set Shell = WScript.CreateObject("WScript.Shell") 15 | Shell.RegWrite strKeyPath & strKeyName, strKeyValue 16 | 17 | ' For a comprehensive breakdown of all the fun things you can do with the RegWrite function, check out this Microsoft KB article: 18 | ' http://msdn.microsoft.com/en-us/library/yfdfhz1b%28VS.85%29.aspx 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Scripting Examples/CreateEventLogEntry.vbs: -------------------------------------------------------------------------------- 1 | ' VB Script Document 2 | option explicit 3 | dim Shell 4 | 5 | 'Create a shell, and run the 'eventcreate' command 6 | Set Shell = CreateObject("Wscript.Shell") 7 | Shell.Run "%COMSPEC% /c eventcreate /t ERROR /id 999 /l APPLICATION /so EVENTSOURCE /d " & chr(34) & "This is my first Event Log entry."& chr(34),7,TRUE 8 | Set Shell = Nothing 9 | 10 | 11 | ' Hint: If you're curious about what the "7,TRUE" options at the end of the SHell.Run command mean, check out http://msdn.microsoft.com/en-us/library/d5fk67ky%28VS.85%29.aspx 12 | -------------------------------------------------------------------------------- /Scripting Examples/DeleteARegistryValue.vbs: -------------------------------------------------------------------------------- 1 | ' VB Script Document 2 | option explicit 3 | dim Shell, strKeyPath 4 | 5 | 6 | 7 | 8 | 'Define the registry path and value to be created 9 | strKeyPath = "HKEY_CURRENT_USER\SOFTWARE\N-able Technologies\" 10 | 11 | 'Populate the new key with the appropriate value 12 | Set Shell = WScript.CreateObject("WScript.Shell") 13 | Shell.RegDelete strKeyPath 14 | 15 | ' For a comprehensive breakdown of all the fun things you can do with the RegDelete function, check out this Microsoft KB article: 16 | ' http://msdn.microsoft.com/en-us/library/293bt9hh%28VS.85%29.aspx 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Scripting Examples/ReadARegistryValue.vbs: -------------------------------------------------------------------------------- 1 | ' VB Script Document 2 | option explicit 3 | dim oReg, strComputer, strKeyPath, strKeyName, strKeyValue 4 | const HKEY_LOCAL_MACHINE = &H80000002 5 | 6 | 7 | 8 | 'Define the registry path and value to be grabbed 9 | strComputer = "." 'This means 'query the machine the script is being run on 10 | strKeyPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion" 11 | strKeyName = "ProductName" 12 | 13 | 'Run the command 14 | Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv") 15 | oReg.GetExpandedStringValue HKEY_LOCAL_MACHINE,strKeyPath,strKeyName,strKeyValue 16 | 17 | 18 | 'Echo the command to the screen 19 | wscript.echo "Your registry value (in this case, the version of Windows you're running) is: " & strKeyValue 20 | -------------------------------------------------------------------------------- /Scripting Examples/RunAnApplication.vbs: -------------------------------------------------------------------------------- 1 | ' VB Script Document 2 | option explicit 3 | dim Shell, Application 4 | 5 | 6 | 'Configure what application should be run 7 | Application = "%SystemRoot%\system32\calc.exe" 8 | 9 | 10 | 11 | 'Create a shell, and run the command 12 | Set Shell = CreateObject("Wscript.Shell") 13 | Shell.Run "%COMSPEC% /c " & Application,7,TRUE 14 | Set Shell = Nothing 15 | 16 | 17 | ' Hint: If you're curious about what the "7,TRUE" options at the end of the SHell.Run command mean, check out http://msdn.microsoft.com/en-us/library/d5fk67ky%28VS.85%29.aspx -------------------------------------------------------------------------------- /Scripting Examples/WriteARegistryValue.vbs: -------------------------------------------------------------------------------- 1 | ' VB Script Document 2 | option explicit 3 | dim RegPath, RegKey, RegValue, RegType, Shell 4 | 5 | 6 | 'Configure what registry value you want to write 7 | RegPath = "HKLM\Software\N-able Technologies\" 'Make sure that this ends with a \ 8 | RegKey = "Registry Test Value" 9 | RegValue = "1" 10 | RegType = "REG_DWORD" 11 | 12 | 'Set the registry to allow an uninstall 13 | Set Shell = CreateObject("Wscript.Shell") 14 | Shell.RegWrite"" & RegPath & RegKey,"" & RegValue, "" & RegType 15 | Set Shell = Nothing -------------------------------------------------------------------------------- /Scripting Examples/WriteDataToATextFile.vbs: -------------------------------------------------------------------------------- 1 | ' VB Script Document 2 | option explicit 3 | dim strLogFile, FSO, TextStream 4 | Const FOR_APPENDING = 8 'For more information on this variable, check out http://msdn.microsoft.com/en-us/library/314cz14s%28VS.85%29.aspx 5 | 6 | 7 | 'Configure what file you want to create and write to 8 | strLogFile = "C:\MyTextFile.txt" 9 | 10 | 11 | 12 | Set FSO = CreateObject("Scripting.FileSystemObject") 13 | Set TextStream = FSO.OpenTextFile(strLogFile, FOR_APPENDING, True) 14 | TextStream.WriteLine "Look at me - I wrote text into a file! Huzzah!" 15 | TextStream.Close 16 | Set FSO = Nothing -------------------------------------------------------------------------------- /SentinelOne Agent Status/Get-SentinelOneStatusv6.ps1: -------------------------------------------------------------------------------- 1 | $script:monitorStatus="" 2 | $script:protectionStatus="" 3 | $script:monitorBuildId="" 4 | $script:enforcingSecurity="" 5 | $script:agentLoadedStatus="" 6 | $script:javaAgentStatus="" 7 | $script:mitigPolicyName="" 8 | $script:isInfected="" 9 | $script:rebootLogLine="" 10 | $script:dynamicEngineStatus="" 11 | $script:installationStatus="" 12 | 13 | $script:fullOutput="" 14 | $script:successCode=0 15 | $script:errorMsg="" 16 | 17 | function checkSentinelOne($retryCount) { 18 | #Run a discovery to see if SentinelOne Successfully Installed 19 | 20 | $script:s1_jsonObj = $null 21 | $sleepInSeconds = 5 22 | 23 | $attempt = 0 24 | while ($attempt -lt $retryCount) { 25 | try { 26 | $helper = New-Object -ComObject "SentinelHelper.1" -errorvariable s1Error 27 | $script:s1_jsonObj = $helper.GetAgentStatusJSON() 28 | $script:successCode = 0 29 | $script:errorMsg = "" 30 | break; 31 | } catch { 32 | $script:successCode = $Error[0].Exception.HResult 33 | $script:errorMsg = $s1Error 34 | } 35 | $attempt++ 36 | if ($attempt -lt $retryCount) { 37 | sleep $sleepInSeconds 38 | } 39 | } 40 | return $s1_jsonObj 41 | 42 | } 43 | 44 | function getDynamicEngineStatus { 45 | 46 | try { 47 | $sentinelOneLogLine = (Get-WinEvent -MaxEvents 1 -FilterHashtable @{ProviderName='SentinelOne'; ID=1}).Message 48 | } catch { 49 | $sentinelOneLogLine = "" 50 | } 51 | 52 | Switch -Wildcard ($sentinelOneLogLine) { 53 | 'Windows Agent is starting in slim mode*' { $script:dynamicEngineStatus="Disabled" } 54 | 'Windows Agent is starting in full mode*' { $script:dynamicEngineStatus="Enabled" } 55 | Default { $script:dynamicEngineStatus="Unknown" } 56 | } 57 | 58 | } 59 | 60 | function ConvertFrom-Json20($item) { 61 | 62 | add-type -assembly system.web.extensions 63 | $ps_js=new-object system.web.script.serialization.javascriptSerializer 64 | 65 | #The comma operator is the array construction operator in PowerShell 66 | return ,$ps_js.DeserializeObject($item) 67 | 68 | } 69 | 70 | function setDefaultValues { 71 | $script:installationStatus = "No" 72 | $script:dynamicEngineStatus = "Unknown" 73 | $script:monitorBuildId = "Unknown" 74 | $script:mitigPolicyName = "Unknown" 75 | $script:protectionStatus = "Unknown" 76 | $script:enforcingSecurity = "Unknown" 77 | $script:agentLoadedStatus = "No Status Returned" 78 | $script:isInfected="Unknown" 79 | } 80 | 81 | function executeSentinelCOM { 82 | $retryCount = 2 83 | checkSentinelOne($retryCount) 84 | 85 | setDefaultValues 86 | 87 | if ($script:errorMsg -eq "") { 88 | 89 | $script:installationStatus = "Yes" 90 | $jsonObj = ConvertFrom-Json20($s1_jsonObj) 91 | Switch ($jsonObj.'self-protection-enabled') { 92 | 'true' { $script:protectionStatus = "Enabled" } 93 | 'false' { $script:protectionStatus = "Disabled" } 94 | Default { $script:protectionStatus = "Unknown" } 95 | } 96 | 97 | $script:monitorBuildId = $jsonObj.'agent-version' 98 | 99 | Switch ($jsonObj.'enforcing-security') { 100 | 'true' { $script:enforcingSecurity = "Enabled" } 101 | 'false' { $script:enforcingSecurity = "Disabled" } 102 | Default { $script:enforcingSecurity = "Unknown" } 103 | } 104 | 105 | Switch ($jsonObj.'agent-running') { 106 | 'true' { $script:agentLoadedStatus = "Running Normally" } 107 | 'false' { $script:agentLoadedStatus = "Not Running" } 108 | Default { $script:agentLoadedStatus = "No Status Returned" } 109 | } 110 | 111 | Switch ($jsonObj.'active-threats-present') { 112 | 'true' { $script:isInfected = "Infected" } 113 | 'false' { $script:isInfected = "Clean" } 114 | Default { $script:isInfected = "Unknown" } 115 | } 116 | 117 | getDynamicEngineStatus 118 | 119 | } 120 | } 121 | 122 | 123 | executeSentinelCOM 124 | 125 | "Self-Protection Status is " + $script:protectionStatus 126 | "Sentinel Agent Status is " + $script:agentLoadedStatus 127 | "Build of the Monitor Agent is " + $script:monitorBuildId 128 | "Dynamic Engine Status is " + $script:dynamicEngineStatus 129 | "Is EDR Installed " + $script:installationStatus 130 | "Enforced Security Status is " + $script:enforcingSecurity 131 | "Infected Status is " + $script:isInfected 132 | 133 | $selfstatus = $script:protectionStatus 134 | $agentstatus = $script:agentLoadedStatus 135 | $dynamicengines = $script:dynamicEngineStatus 136 | $isedrinstalled = $script:installationStatus 137 | $buildid = $script:monitorBuildId 138 | $enforcesecuritystatus = $script:enforcingSecurity 139 | $infectedstatus = $script:isInfected 140 | -------------------------------------------------------------------------------- /Server Maintenance/AMP_UPLOAD_READ_ME.txt: -------------------------------------------------------------------------------- 1 | There are two methods to upload an Automation Policy (AMP) into N-central. Choose one of the following methods: 2 | 3 | How to upload AMP directly into N-central: 4 | 5 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 6 | 2. Choose on the OS Level from top-left drop down 7 | 3. Expand Configuration Pane -> Scheduled Tasks -> Script/Software Repository 8 | 4. Click Add -> Select Automation Policy 9 | 5. Click Browse -> Select .AMP 10 | 6. Click OK -> OK 11 | 12 | 13 | 14 | How to upload AMP through Automation Designer into N-central: 15 | 16 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 17 | 2. Choose on the OS Level from top-left drop down 18 | 3. From Actions Pane -> Click Start Automation Manager 19 | 4. From within the Automation Manager Designer, choose File -> Open 20 | 5. Browse to .AMP 21 | 6. Click OK 22 | 7. From within the Automation Manager Designer, choose File -> Upload -------------------------------------------------------------------------------- /Server Maintenance/Server Maintenance.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Server Maintenance/Server Maintenance.jpg -------------------------------------------------------------------------------- /Set DNS Scavenging/AMP_UPLOAD_READ_ME.txt: -------------------------------------------------------------------------------- 1 | There are two methods to upload an Automation Policy (AMP) into N-central. Choose one of the following methods: 2 | 3 | How to upload AMP directly into N-central: 4 | 5 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 6 | 2. Choose on the OS Level from top-left drop down 7 | 3. Expand Configuration Pane -> Scheduled Tasks -> Script/Software Repository 8 | 4. Click Add -> Select Automation Policy 9 | 5. Click Browse -> Select .AMP 10 | 6. Click OK -> OK 11 | 12 | 13 | 14 | How to upload AMP through Automation Designer into N-central: 15 | 16 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 17 | 2. Choose on the OS Level from top-left drop down 18 | 3. From Actions Pane -> Click Start Automation Manager 19 | 4. From within the Automation Manager Designer, choose File -> Open 20 | 5. Browse to .AMP 21 | 6. Click OK 22 | 7. From within the Automation Manager Designer, choose File -> Upload -------------------------------------------------------------------------------- /Set DNS Scavenging/Set DNS Scavenging.amp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | StartObject.SInterval 7 | 505d265a-674c-4b6b-881f-5b608bc3ce33 8 | PolicyExecutor.SetDNSScavenging, PolicyExecutionEngine, Version=1.5.0.13, Culture=neutral, PublicKeyToken=null 9 | ScavengingInterval 10 | 11 | 12 | StartObject.NRInterval 13 | 505d265a-674c-4b6b-881f-5b608bc3ce33 14 | PolicyExecutor.SetDNSScavenging, PolicyExecutionEngine, Version=1.5.0.13, Culture=neutral, PublicKeyToken=null 15 | DefaultNoRefreshInterval 16 | 17 | 18 | StartObject.RInterval 19 | 505d265a-674c-4b6b-881f-5b608bc3ce33 20 | PolicyExecutor.SetDNSScavenging, PolicyExecutionEngine, Version=1.5.0.13, Culture=neutral, PublicKeyToken=null 21 | DefaultRefreshInterval 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 486,384 30 | Assembly references and imported namespaces serialized as XML namespaces 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Set DNS Scavenging/Set DNS Scavenging.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Set DNS Scavenging/Set DNS Scavenging.jpg -------------------------------------------------------------------------------- /Set Power Plan/AMP_UPLOAD_READ_ME.txt: -------------------------------------------------------------------------------- 1 | There are two methods to upload an Automation Policy (AMP) into N-central. Choose one of the following methods: 2 | 3 | How to upload AMP directly into N-central: 4 | 5 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 6 | 2. Choose on the OS Level from top-left drop down 7 | 3. Expand Configuration Pane -> Scheduled Tasks -> Script/Software Repository 8 | 4. Click Add -> Select Automation Policy 9 | 5. Click Browse -> Select .AMP 10 | 6. Click OK -> OK 11 | 12 | 13 | 14 | How to upload AMP through Automation Designer into N-central: 15 | 16 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 17 | 2. Choose on the OS Level from top-left drop down 18 | 3. From Actions Pane -> Click Start Automation Manager 19 | 4. From within the Automation Manager Designer, choose File -> Open 20 | 5. Browse to .AMP 21 | 6. Click OK 22 | 7. From within the Automation Manager Designer, choose File -> Upload -------------------------------------------------------------------------------- /Set Power Plan/Set Power Plan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Set Power Plan/Set Power Plan.jpg -------------------------------------------------------------------------------- /Set-Default-Printer/AMP_UPLOAD_READ_ME.txt: -------------------------------------------------------------------------------- 1 | There are two methods to upload an Automation Policy (AMP) into N-central. Choose one of the following methods: 2 | 3 | How to upload AMP directly into N-central: 4 | 5 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 6 | 2. Choose on the OS Level from top-left drop down 7 | 3. Expand Configuration Pane -> Scheduled Tasks -> Script/Software Repository 8 | 4. Click Add -> Select Automation Policy 9 | 5. Click Browse -> Select .AMP 10 | 6. Click OK -> OK 11 | 12 | 13 | 14 | How to upload AMP through Automation Designer into N-central: 15 | 16 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 17 | 2. Choose on the OS Level from top-left drop down 18 | 3. From Actions Pane -> Click Start Automation Manager 19 | 4. From within the Automation Manager Designer, choose File -> Open 20 | 5. Browse to .AMP 21 | 6. Click OK 22 | 7. From within the Automation Manager Designer, choose File -> Upload -------------------------------------------------------------------------------- /Set-Default-Printer/Set Default Printer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Set-Default-Printer/Set Default Printer.jpg -------------------------------------------------------------------------------- /Sophos-Removal-Script/Sophos-Removal-Script.bat: -------------------------------------------------------------------------------- 1 | REM 2 | REM Stopping Sophos Services 3 | net stop "Sophos AutoUpdate Service" 4 | net stop "Sophos Agent" 5 | net stop "SAVService" 6 | net stop "SAVAdminService" 7 | net stop "Sophos Message Router" 8 | net stop "Sophos Web Control Service" 9 | net stop "swi_service" 10 | net stop "swi_update" 11 | 12 | REM 13 | REM Removing Sophos AutoUpdater 14 | MsiExec.exe /X{D924231F-D02D-4E0B-B511-CC4A0E3ED547} /qn REBOOT=SUPPRESS /PASSIVE 15 | 16 | REM 17 | REM Removing Sophos Remote Management System 18 | MsiExec.exe /X{FED1005D-CBC8-45D5-A288-FFC7BB304121} /qn REBOOT=SUPPRESS /PASSIVE 19 | 20 | REM 21 | REM Removing Sophos Anti-Virus 22 | MsiExec.exe /X{D929B3B5-56C6-46CC-B3A3-A1A784CBB8E4} /qn REBOOT=SUPPRESS /PASSIVE 23 | 24 | REM 25 | REM Removing Sophos Patch 26 | MsiExec.exe /X{29006785-9EF7-4E84-ABE8-6244D12E7909} /qn REBOOT=SUPPRESS /PASSIVE -------------------------------------------------------------------------------- /Start Blackberry Services/blackberryStart.bat: -------------------------------------------------------------------------------- 1 | net start mssql$besmgmt 2 | net start "blackberry dispatcher" /y 3 | net start "blackberry mds connection service" /y 4 | net start "blackberry policy service" /y 5 | net start "blackberry router" /y 6 | net start "blackberry syncserver" /y 7 | net start "blackberry server alert" /y 8 | net start "bbattachserver" /y 9 | net start "blackberry controller" /y 10 | -------------------------------------------------------------------------------- /StaticDNSServer/StaticDNSServer.vbs: -------------------------------------------------------------------------------- 1 | On Error Resume Next 2 | strComputer = "." 3 | Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") 4 | Set colNetCards = objWMIService.ExecQuery _ 5 | ("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True") 6 | For Each objNetCard in colNetCards 7 | arrDNSServers = Array("192.168.1.100", "192.168.1.200") 8 | objNetCard.SetDNSServerSearchOrder(arrDNSServers) 9 | Next -------------------------------------------------------------------------------- /Stop Blackberry Services/BlackberryStop.bat: -------------------------------------------------------------------------------- 1 | net stop "blackberry dispatcher" /y 2 | net stop "blackberry mds connection service" /y 3 | net stop "blackberry policy service" /y 4 | net stop "blackberry router" /y 5 | net stop "blackberry syncserver" /y 6 | net stop "blackberry server alert" /y 7 | net stop "bbattachserver" /y 8 | net stop "blackberry controller" /y 9 | net stop mssql$besmgmt -------------------------------------------------------------------------------- /Sync Time/AMP_UPLOAD_READ_ME.txt: -------------------------------------------------------------------------------- 1 | There are two methods to upload an Automation Policy (AMP) into N-central. Choose one of the following methods: 2 | 3 | How to upload AMP directly into N-central: 4 | 5 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 6 | 2. Choose on the OS Level from top-left drop down 7 | 3. Expand Configuration Pane -> Scheduled Tasks -> Script/Software Repository 8 | 4. Click Add -> Select Automation Policy 9 | 5. Click Browse -> Select .AMP 10 | 6. Click OK -> OK 11 | 12 | 13 | 14 | How to upload AMP through Automation Designer into N-central: 15 | 16 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 17 | 2. Choose on the OS Level from top-left drop down 18 | 3. From Actions Pane -> Click Start Automation Manager 19 | 4. From within the Automation Manager Designer, choose File -> Open 20 | 5. Browse to .AMP 21 | 6. Click OK 22 | 7. From within the Automation Manager Designer, choose File -> Upload -------------------------------------------------------------------------------- /Sync Time/Sync Time.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Sync Time/Sync Time.jpg -------------------------------------------------------------------------------- /Uninstall Connect2Help/RemoveConnect2Help.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Uninstall Connect2Help/RemoveConnect2Help.exe -------------------------------------------------------------------------------- /Uninstall Google Toolbar (Internet Explorer ONLY)/Uninstall Google Toolbar IE.vbs: -------------------------------------------------------------------------------- 1 | 2 | Set Shell=WScript.CreateObject("Shell.Application") 3 | Shell.MinimizeAll 4 | On Error Resume Next 5 | Dim WshShell,a,i 6 | i=0 7 | Set WshShell=WScript.CreateObject("WScript.Shell") 8 | Set Shell=WScript.CreateObject("Shell.Application") 9 | 10 | 11 | a=WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{2318C2B1-4965-11d4-9B18-009027A5CD4F}\UninstallString") 12 | If a<>"" Then 13 | WshShell.Run(a&" /S"),1,True 14 | i=i+1 15 | end if 16 | -------------------------------------------------------------------------------- /Uninstall Yahoo Toolbar (for Internet Explorer)/Uninstall Yahoo Toolbar (for Internet Explorer).vbs: -------------------------------------------------------------------------------- 1 | Set Shell=WScript.CreateObject("Shell.Application") 2 | Shell.MinimizeAll 3 | On Error Resume Next 4 | Dim WshShell,a,i 5 | Set i=0 6 | Set WshShell=WScript.CreateObject("WScript.Shell") 7 | Set Shell=WScript.CreateObject("Shell.Application") 8 | 9 | 'This Removes the Yahoo Toolbar 10 | a=WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Yahoo! Companion\UninstallString") 11 | If a<>"" Then 12 | WshShell.Run(""""&a&""" /S"),1,True 13 | i=i+1 14 | end if 15 | 16 | 17 | 'This Removes the Software Update Service 18 | a=WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Yahoo! Software Update\UninstallString") 19 | If a<>"" Then 20 | WshShell.Run(""""&a&""" /S"),1,True 21 | i=i+1 22 | end if 23 | 24 | 'This Removes the Install Helper 25 | a=WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\YInstHelper\UninstallString") 26 | If a<>"" Then 27 | WshShell.Run(""""&a&""" /S"),1,True 28 | i=i+1 29 | end if 30 | -------------------------------------------------------------------------------- /Uninstall iTunes and associated services/Uninstall iTunes and associated services.vbs: -------------------------------------------------------------------------------- 1 | On Error Resume Next 2 | Const HKEY_LOCAL_MACHINE = &H80000002 3 | strComputer = "." 4 | Set WshShell = CreateObject("wscript.Shell") 5 | Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_ 6 | strComputer & "\root\default:StdRegProv") 7 | strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" 8 | oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys 9 | For Each subkey In arrSubKeys 10 | strDisplayName = WshShell.RegRead ("HKLM\" & strKeyPath & "\" & subkey & "\DisplayName") 11 | If strDisplayName = "iTunes" Then 12 | WshShell.Run "msiexec.exe /norestart /X " & SubKey & " /qn", 7, True 13 | End If 14 | 15 | strDisplayName = WshShell.RegRead ("HKLM\" & strKeyPath & "\" & subkey & "\DisplayName") 16 | If strDisplayName = "Apple Application Support" Then 17 | WshShell.Run "msiexec.exe /norestart /X " & SubKey & " /qn", 7, True 18 | End If 19 | 20 | strDisplayName = WshShell.RegRead ("HKLM\" & strKeyPath & "\" & subkey & "\DisplayName") 21 | If strDisplayName = "Apple Mobile Device Support" Then 22 | WshShell.Run "msiexec.exe /norestart /X " & SubKey & " /qn", 7, True 23 | End If 24 | 25 | 26 | strDisplayName = WshShell.RegRead ("HKLM\" & strKeyPath & "\" & subkey & "\DisplayName") 27 | If strDisplayName = "Apple Software Update" Then 28 | WshShell.Run "msiexec.exe /norestart /X " & SubKey & " /qn", 7, True 29 | End If 30 | 31 | 32 | strDisplayName = WshShell.RegRead ("HKLM\" & strKeyPath & "\" & subkey & "\DisplayName") 33 | If strDisplayName = "Bonjour" Then 34 | WshShell.Run "msiexec.exe /norestart /X " & SubKey & " /qn", 7, True 35 | End If 36 | 37 | Next -------------------------------------------------------------------------------- /Uninstall the 'Ask Jeeves' Toolbar/AskJeeves.vbs: -------------------------------------------------------------------------------- 1 | '########################################## 2 | '# Copyright 2009 by N-able Technologies # 3 | '# All Rights Reserved # 4 | '# May not be reproduced or redistributed # 5 | '# Without written consent from N-able # 6 | '# Technologies # 7 | '# www.n-able.com # 8 | '########################################## 9 | 10 | 11 | ' Script Name: AskJeeves.vbs 12 | ' Description: This VBS script will uninstall the IE version of the Ask Jeeves Toolbar. 13 | 14 | 15 | 'Let's declare some variables 16 | option explicit 17 | dim strComputer, strKeyPath, strValueName, objReg, dwValue, Shell, cmdline 18 | Const HKEY_LOCAL_MACHINE = &H80000002 19 | strComputer = "." 20 | 21 | 'Grab the uninstall string for the IE version from the registry 22 | '(this script will also use the uninstall string to check whether or not the Ask Jeeves Toolbar is installed) 23 | Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" _ 24 | & strComputer & "\root\default:StdRegProv") 25 | strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Uninstall\Ask Toolbar for Internet Explorer_is1" 26 | strValueName = "QuietUninstallString" 27 | objReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue 28 | 29 | 'Check to see if the Ask Jeeves Toolbar is actually installed 30 | If IsNull(dwValue) Then 31 | 32 | Else 33 | 'Uninstall the IE version of the Ask Jeeves Toolbar 34 | Set Shell = CreateObject("Wscript.Shell") 35 | cmdline = "" & dwValue 36 | Shell.Run cmdline,7,TRUE 37 | Set Shell = Nothing 38 | End If 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Uninstall-AVG/README.txt: -------------------------------------------------------------------------------- 1 | This script will uninstall AVG 8.x and 9.x Be CAREFUL! The script will cause the workstation/server to be rebooted! -------------------------------------------------------------------------------- /Uninstall-AVG/UninstallAVG.vbs: -------------------------------------------------------------------------------- 1 | '**************************************************************************************** 2 | ' Script: UninstallAVG.vbs 3 | ' Version: 1.0 4 | ' Author: Chris Reid 5 | ' Description: This script will unintstall the 32-bit versions of AVG 8.x and 9.x 6 | ' Date: Dec. 11th. 2009 7 | '*************************************************************************************** 8 | 9 | 10 | '************************************************************************************** 11 | 'NOTE: This script *will* cause the machine to be rebooted!!! Use with CAUTION!! 12 | '************************************************************************************** 13 | 14 | 15 | 16 | ' Declare variables 17 | option explicit 18 | dim strSystemDrive, strFileURL, strHDLocation, objXMLHTTP, objADOStream, objFSO, Shell, strPartialTitle, objWord, colTasks, strWindowTitle, objTask 19 | 20 | 21 | 'Set the URL where the file should be downloaded from 22 | strFileURL = "http://download.avg.com/filedir/util/avg_arm_sup_____.dir/avgremover.exe" 23 | 24 | 25 | 26 | 27 | 'We want to place the avgremover.exe on a the root of the system drive - so we need to find out the system drive 28 | Set Shell = CreateObject("WScript.Shell") 29 | strSystemDrive = Shell.ExpandEnvironmentStrings("%SystemDrive%") 30 | Set Shell = Nothing 31 | 32 | 33 | 'Set the location where the file will be saved 34 | strHDLocation = "" & strSystemDrive & "\avgremover.exe" 35 | 36 | 37 | 'Run the download sub-routine, so that we can download the AVG uninstaller 38 | Download 39 | 40 | 41 | 'Now that the file has been downloaded. create a shell and run it 42 | 'Create the Shell 43 | Set Shell = CreateObject("Wscript.Shell") 44 | 'Run the AVG Uninstaller 45 | Shell.Run "%COMSPEC% /c " & strHDLocation 46 | Set Shell = Nothing 47 | 48 | 49 | 50 | 51 | 'As the uninstaller prompts the user for confirmation, we need to automatically click 'Yes'. So let's find the confirmation window. 52 | FindWarningWindow 53 | 54 | ' Now we just need to activate the window, and pass ALT-Y to it 55 | Confirm 56 | 57 | 58 | 59 | 60 | 61 | 62 | '********************************************************************************** 63 | ' Sub: Download 64 | ' This sub will download the file from the net, and save it to the specified path 65 | '********************************************************************************** 66 | sub Download 67 | ' Let's download and save the avgremover.exe (the code for this section was grabbed from http://blog.netnerds.net/2007/01/vbscript-download-and-save-a-binary-file/) 68 | 69 | ' Fetch the file 70 | Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP") 71 | objXMLHTTP.open "GET", strFileURL, false 72 | objXMLHTTP.send() 73 | 74 | If objXMLHTTP.Status = 200 Then 75 | Set objADOStream = CreateObject("ADODB.Stream") 76 | objADOStream.Open 77 | objADOStream.Type = 1 'adTypeBinary 78 | objADOStream.Write objXMLHTTP.ResponseBody 79 | objADOStream.Position = 0 'Set the stream position to the start 80 | 81 | 'If the file already exists, delete it. Otherwise, place the file in the specified location 82 | Set objFSO = Createobject("Scripting.FileSystemObject") 83 | If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation 84 | Set objFSO = Nothing 85 | objADOStream.SaveToFile strHDLocation 86 | objADOStream.Close 87 | Set objADOStream = Nothing 88 | End if 89 | 90 | Set objXMLHTTP = Nothing 91 | 92 | End Sub 93 | 94 | 95 | '********************************************************************************** 96 | ' Sub: FindWarningWindow 97 | ' This sub finds the open window whose title is 'Warning' 98 | '********************************************************************************** 99 | Sub FindWarningWindow 100 | strPartialTitle = "Warning" 101 | Set objWord = CreateObject("Word.Application") 102 | Set colTasks = objWord.Tasks 103 | For Each objTask In colTasks 104 | If objTask.Visible = True Then 105 | If InStr(objTask.Name, strPartialTitle) > 0 Then 106 | strWindowTitle = objTask.Name 107 | Exit For 108 | Else 109 | strWindowTitle = "" 110 | End If 111 | End If 112 | Next 113 | objWord.Quit 114 | End Sub 115 | 116 | 117 | '********************************************************************************** 118 | ' Sub: Confirm 119 | ' This sub passes an ALT-Y command to the open window 120 | '********************************************************************************** 121 | Sub Confirm 122 | If strWindowTitle <> "" Then 123 | Set Shell = CreateObject("WScript.Shell") 124 | While Shell.AppActivate(strWindowTitle) = False 125 | WScript.Sleep 10 126 | Wend 127 | Shell.AppActivate strWindowTitle 128 | WScript.Sleep 100 129 | While Shell.AppActivate(strWindowTitle) = True 130 | Shell.SendKeys "%Y" 131 | WScript.Sleep 2000 132 | Wend 133 | Else 134 | End If 135 | End Sub -------------------------------------------------------------------------------- /Uninstall-DellSupportAssistant.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | ************************************************************************************************************ 3 | Name: Uninstall-DellSupportAssistant 4 | 5 | Version: 0.1 (03rd May 2019) 6 | Purpose: Uninstall Dell Support Assistant. Can specify a min/max version to target against. 7 | Based on a a script provided by JonCz 8 | 9 | Pre-Reqs: Powershell 2 10 | 11 | 0.1 + Initial Release 12 | ************************************************************************************************************ 13 | #> 14 | 15 | 16 | Param ( 17 | [Parameter(Mandatory=$false)] 18 | [switch]$Force = $false, 19 | [Parameter(Mandatory=$false)] 20 | [String] $SoftwareVersion = "3.2.0.90" 21 | ) 22 | 23 | $Software = "Dell SupportAssist" 24 | 25 | #region Functions 26 | 27 | $ScriptName = $myinvocation.MyCommand 28 | Function Remove-CachedScripts { 29 | # Removed Cached Copies of Script 30 | 31 | $Agent = "C:\Program Files\N-able Technologies\Windows Agent" 32 | 33 | if (test-path "C:\Program Files (x86)\N-able Technologies\Windows Agent") { 34 | $Agent = "C:\Program Files (x86)\N-able Technologies\Windows Agent" 35 | } 36 | remove-item "$Agent\cache\$scriptname" -force -erroraction SilentlyContinue 37 | remove-item "$Agent\Temp\Script\$scriptname" -force -ErrorAction SilentlyContinue 38 | } 39 | Function Get-InstalledApp($Target) { 40 | $Apps = @() 41 | 42 | $Apps += Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall | 43 | Get-ItemProperty | Where-Object {$_.DisplayName -eq "$Target" } | Select-Object -Property DisplayName, DisplayVersion, UninstallString 44 | 45 | # If 64-bit OS, then search Wow6432Node Uninstall as well 46 | If ($(Get-WmiObject Win32_OperatingSystem).OSArchitecture -match "64") { 47 | $Apps += Get-ChildItem -Path HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall | 48 | Get-ItemProperty | Where-Object {$_.DisplayName -eq "$Target" } | Select-Object -Property DisplayName, DisplayVersion, UninstallString 49 | } 50 | 51 | $Apps 52 | } 53 | 54 | Function Uninstall-Software { 55 | 56 | if ($SoftwareUninstall -ne $null) { 57 | Write-Host "$($SoftwareUninstall.DisplayName) $($SoftwareUninstall.DisplayVersion) was detected." 58 | 59 | if (($($SoftwareUninstall.DisplayVersion) -ge "$SoftwareVersion") -and ($force -eq $false)) { 60 | Write-Host "This version of $Software is not affected by the Vulnerability" -ForegroundColor Green 61 | exit 0 62 | } 63 | if ($force -eq $true) { 64 | Write-Warning "Force Mode was enabled. Uninstalling $Software..." 65 | } 66 | 67 | if ($($SoftwareUninstall.DisplayVersion) -lt "$SoftwareVersion") { 68 | Write-Warning "$Software pre $SoftwareVersion Found. Uninstalling..." 69 | } 70 | ForEach ($item in $SoftwareUninstall) { 71 | if (($item.displayversion -le "$softwareversion") -or ($force -eq $true)) { 72 | Write-Output "Removing $($item.DisplayName) via $($item.UninstallString)" 73 | 74 | If ($item.UninstallString) { 75 | 76 | $uninst = $item.UninstallString.Split('/X')[0] 77 | $guid = $item.UninstallString.Split('/X')[2] 78 | $argument = "/x $guid /qn /norestart" 79 | 80 | Write-Output "Running $uninst $argument" 81 | Start-Process $uninst -ArgumentList "$argument" -wait -passthru -NoNewWindow 82 | 83 | $Timeout = 0 84 | $MaxWait = 10 # Wait up to 5 minutes for the application to uninstall 85 | 86 | While (($CheckSoftware -ne $null) -and ($Timeout -lt $MaxWait)) { 87 | Start-Sleep -Seconds 30 88 | $Timeout++ 89 | 90 | $CheckSoftware = Get-InstalledApp("$Software") 91 | } 92 | 93 | If ($CheckSoftware -eq $null) { 94 | Write-Output "$Software removed" 95 | } else { 96 | Write-Output "ERROR: $Software not successfully removed." 97 | } 98 | } 99 | } 100 | } 101 | } 102 | else { 103 | Write-Host "$Software $softwareversion" -ForegroundColor Green -nonewline; Write-host " or lower is not present. Nothing to do." 104 | } 105 | } 106 | #endregion Functions 107 | 108 | #region Main 109 | 110 | Write-Host "Checking for " -nonewline; Write-Host "$software $softwareversion" -ForegroundColor Green 111 | $SoftwareUninstall = . Get-InstalledApp($software) 112 | . Uninstall-Software 113 | Remove-CachedScripts 114 | 115 | #endregion Main -------------------------------------------------------------------------------- /Uninstall-Kaspersky/Uninstall-Kaspersky.amp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 458,466 11 | Assembly references and imported namespaces serialized as XML namespaces 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Uninstall-McAfee/Uninstall McAfee.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | REM McAfee Removal Script 3 | REM Last Update: 11/01/2010 4 | REM 5 | 6 | ECHO Removing AntiSpyware 7 | "C:\Program Files\McAfee\VirusScan Enterprise\scan32.exe" /UninstallMAS 8 | "C:\Program Files (x86)\McAfee\VirusScan Enterprise\scan32.exe" /UninstallMAS 9 | 10 | REM Kill McTray & Trusted Validation 11 | ECHO Killing processes 12 | taskkill.exe /f /t /im mctray.exe 13 | taskkill.exe /f /t /im mfevtps.exe 14 | 15 | ECHO Removing VirusScan 8.0 16 | msiexec.exe /x {5DF3D1BB-894E-4DCD-8275-159AC9829B43} REMOVE=ALL REBOOT=R /q 17 | 18 | ECHO Removing VirusScan 8.5 19 | msiexec.exe /x {35C03C04-3F1F-42C2-A989-A757EE691F65} REMOVE=ALL REBOOT=R /q 20 | 21 | ECHO Removing VirusScan 8.7 22 | msiexec.exe /x {147BCE03-C0F1-4C9F-8157-6A89B6D2D973} REMOVE=ALL REBOOT=R /q 23 | 24 | ECHO Remove McAfee Agent 25 | "C:\Program Files\McAfee\Common Framework\frminst.exe" /forceuninstall /silent 26 | "C:\Program Files (x86)\McAfee\Common Framework\frminst.exe" /forceuninstall /silent 27 | 28 | REM Remove McAfee Registry Keys 29 | ECHO Removing Registry Keys 30 | REG DELETE HKLM\SYSTEM\CurrentControlSet\services\McShield /f 31 | REG DELETE HKLM\SYSTEM\CurrentControlSet\services\McTaskManager /f 32 | REG DELETE HKLM\SYSTEM\CurrentControlSet\Services\mfeapfk /f 33 | REG DELETE HKLM\SYSTEM\CurrentControlSet\Services\mfeavfk /f 34 | REG DELETE HKLM\SYSTEM\CurrentControlSet\Services\mfebopk /f 35 | REG DELETE HKLM\SYSTEM\CurrentControlSet\Services\mfehidk /f 36 | REG DELETE HKLM\SYSTEM\CurrentControlSet\Services\mferkdet /f 37 | REG DELETE HKLM\SYSTEM\CurrentControlSet\Services\mfetdik /f 38 | REG DELETE HKLM\SYSTEM\CurrentControlSet\Services\mfevtp /f 39 | REG DELETE HKLM\SOFTWARE\McAfee /f -------------------------------------------------------------------------------- /Uninstall-Microsoft-Security-Essentials/UninstallMSSecurityEssentials.vbs: -------------------------------------------------------------------------------- 1 | ' *********************************************************************************************** 2 | ' Script: UninstallMSSecurityEssentials.vbs 3 | ' Description: This script uninstalls the 32-bit version of Microsoft Security Essentials 4 | ' Author: Jonathan Filson 5 | ' Date: Dec. 15th, 2009 6 | ' *********************************************************************************************** 7 | 8 | 9 | ' VB Script Document 10 | option explicit 11 | dim Shell, Application 12 | 13 | 14 | 'Configure what application should be run 15 | Application = "MsiExec.exe /norestart /qn /X{A0A77CDC-2419-4D5C-AD2C-E09E5926B806}" 16 | 17 | 18 | 19 | 'Create a shell, and run the command 20 | Set Shell = CreateObject("Wscript.Shell") 21 | Shell.Run "%COMSPEC% /c " & Application,7,TRUE 22 | Set Shell = Nothing 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Uninstall-Sophos-9/Uninstall Sophos 9.bat: -------------------------------------------------------------------------------- 1 | MsiExec.exe /X{034759DA-E21A-4795-BFB3-C66D17FAD183} /quiet 2 | MsiExec.exe /X{FF11005D-CBC8-45D5-A288-25C7BB304121} /quiet 3 | MsiExec.exe /X{4E645A9F-79E2-4FD4-ADFD-C151AE814C64} /quiet 4 | MsiExec.exe /X{15C418EB-7675-42BE-B2B3-281952DA014D} /quiet -------------------------------------------------------------------------------- /Uninstall-Symantec-Endpoint-Security-11/UninstallSymantecES.vbs: -------------------------------------------------------------------------------- 1 | '****************************************************************************** 2 | ' Script: UninstallSymantecES.vbs 3 | ' Version: 1.1 4 | ' Description: This script uninstalls Symantec Endpoint Security 11.0.5 5 | ' Author: Chris Reid and Jonathan Filson 6 | ' Date: Dec. 11th, 2009 7 | '****************************************************************************** 8 | 9 | ' Declare the variables that we're going to use 10 | option explicit 11 | dim Shell, ThirtyTwoBitUninstall, SixtyFourBitUninstall 12 | 13 | 14 | 'Specify the uninstall command for the 32-bit and 64-bit versions of Symantec Endpoint Security 15 | ThirtyTwoBitUninstall = "MsiExec.exe /norestart /qn /x{2EFCC193-D915-4CCB-9201-31773A27BC06}" 16 | SixtyFourBitUninstall = "MsiExec.exe /norestart /qn /x{530992D4-DDBA-4F68-8B0D-FF50AC57531B}" 17 | 18 | 19 | 20 | 21 | 'Create a shell, and run the 32-bit and 64-bit uninstall commands 22 | Set Shell = CreateObject("Wscript.Shell") 23 | Shell.Run "%COMSPEC% /c " & ThirtyTwoBitUninstall,7,TRUE 24 | Shell.Run "%COMSPEC% /c " & SixtyFourBitUninstall,7,TRUE 25 | Set Shell = Nothing 26 | 27 | 28 | 29 | 30 | '**************************** 31 | ' Version History 32 | '**************************** 33 | 34 | 'Version 1.1 35 | ' Added support for uninstalling the 32-bit version of Symantec Endpoint Security 36 | 37 | 38 | 'Version 1.0 39 | ' Initial Release -------------------------------------------------------------------------------- /Uninstall-Teamviewer/Uninstall Teamviewer.amp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 504,745 11 | Assembly references and imported namespaces serialized as XML namespaces 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Uninstall-Trend-Micro-Internet-Security-2008/UninstallTrend.vbs: -------------------------------------------------------------------------------- 1 | '########################################## 2 | '# Copyright 2008 by N-able Technologies # 3 | '# All Rights Reserved # 4 | '# May not be reproduced or redistributed # 5 | '# Without written consent from N-able # 6 | '# Technologies # 7 | '# www.n-able.com # 8 | '########################################## 9 | 10 | 11 | ' Script Name: UninstallTrend.vbs 12 | ' Description: This Visual Basic script will uninstall Trend Micro Internet Security 2008. 13 | 14 | 15 | 'Run the command 16 | Set Shell = CreateObject("Wscript.Shell") 17 | cmdline = "msiexec.exe /quiet /X {A621B45A-D138-4A95-BE10-7CABA05EF94E}" 18 | Shell.Run cmdline,7,TRUE 19 | Set Shell = Nothing -------------------------------------------------------------------------------- /Uninstall-Trend-Worry-Free/Uninstall Trend Worry Free.vbs: -------------------------------------------------------------------------------- 1 | '****************************************************************** 2 | ' Script: Uninstall Trend.vbs 3 | ' Description: This script will uninstall Trend Worry-Free A/V 4 | ' Author: Chris Reid 5 | ' Version: 1.1 6 | ' Date: Jan. 5th, 2011 7 | '****************************************************************** 8 | 9 | 10 | 11 | ' Version History 12 | 13 | ' 1.1 - Added code to delete any remnants left behind in WMI (Jan 5th, 2011) 14 | 15 | ' 1.0 - Initial Release (Dec 10th, 2009) 16 | 17 | ' VB Script Document 18 | option explicit 19 | dim Shell, UninstallPath, strComputer, oReg, strKeyPath, strValueName,strValue, objSWbemServices, colSWbemObjectSet, objSWbemObject 20 | const HKEY_LOCAL_MACHINE = &H80000002 21 | strComputer = "." 22 | 23 | 'Set the registry to allow an uninstall 24 | Set Shell = CreateObject("Wscript.Shell") 25 | Shell. RegWrite"HKLM\Software\TrendMicro\PC-cillinNTCorp\CurrentVersion\Misc.\Allow Uninstall", 1, "REG_DWORD" 26 | Shell.Run "%COMSPEC% /c eventcreate /t INFORMATION /id 999 /l APPLICATION /so "& chr(34) & "N-ABLE (Trend Uninstall)"& chr(34) & " /d "& chr(34) & "The registry value that allows Trend Worry-Free Edition 6.x to be uninstalled has been set."& chr(34),7,TRUE 27 | Set Shell = Nothing 28 | 29 | 30 | 'Grab the uninstall path from the registry 31 | Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_ 32 | strComputer & "\root\default:StdRegProv") 33 | 34 | strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OfficeScanNT" 35 | strValueName = "UninstallString" 36 | oReg.GetExpandedStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue 37 | 38 | 39 | 'Run the uninstaller 40 | Set Shell = CreateObject("Wscript.Shell") 41 | Shell.Run "%COMSPEC% /c " & strValue,7,TRUE 42 | Shell.Run "%COMSPEC% /c eventcreate /t INFORMATION /id 999 /l APPLICATION /so "& chr(34) & "N-ABLE (Trend Uninstall)"& chr(34) & " /d "& chr(34) & "The Trend Worry-Free Edition 6.x uninstaller has been started."& chr(34),7,TRUE 43 | Set Shell = Nothing 44 | 45 | 46 | 'Delete any entries in root\SecurityCenter\AntiVirusProduct - failing to do this will prevent Endpoint Security from uninstalling. 47 | Set objSWbemServices = GetObject("winmgmts:\\" & strComputer & "\root\SecurityCenter") 48 | Set colSWbemObjectSet = objSWbemServices.InstancesOf("AntiVirusProduct") 49 | For Each objSWbemObject In colSWbemObjectSet 50 | objSWbemObject.Delete_ 51 | Next 52 | 53 | 54 | -------------------------------------------------------------------------------- /Unlock AD User/UnlockUser.vbs: -------------------------------------------------------------------------------- 1 | '********************************************************** 2 | ' Script: UnlockUser.vbs 3 | ' Version: 1.0 4 | ' Author: Chris Reid 5 | ' Date: Nov. 27th, 2009 6 | 'Usage: cscript UnlockUser.vbs DOMAINAME 7 | '********************************************************** 8 | 9 | 10 | 'Let's declare some variables 11 | Option explicit 12 | dim Domain, objDomain, objUser 13 | 14 | 15 | 16 | 'Let's make sure that the person running this script specified a domain name as a command line parameter 17 | If WScript.Arguments.Count = 1 Then 18 | Domain = WScript.Arguments.Item(0) 19 | Else 20 | wscript.Quit(1) 21 | End If 22 | 23 | 24 | 25 | 26 | 'Let's get a list of all users whose accounts are locked 27 | Set objDomain = GetObject("WinNT://" & Domain &",domain") 28 | objDomain.Filter = Array("User") 29 | 30 | 31 | 'Now let's figure out what accounts are locked, and unlock them 32 | For Each objUser In objDomain 33 | If objUser.IsAccountLocked then 34 | objUser.IsAccountLocked = False 35 | objUser.SetInfo 36 | End if 37 | Next -------------------------------------------------------------------------------- /Update Windows Defender Defs/UpdateDefender.vbs: -------------------------------------------------------------------------------- 1 | ' Script Name: UpdateDefender.vbs 2 | ' Description: This will run a Windows Defender definition update. 3 | 4 | 5 | 'Run the command 6 | Set Shell = CreateObject("Wscript.Shell") 7 | Set filesys = CreateObject("Scripting.FileSystemObject") 8 | PFiles=Shell.ExpandEnvironmentStrings("%ProgramFiles%") 9 | Comspec=Shell.ExpandEnvironmentStrings("%COMSPEC%") 10 | path = PFiles & "\Windows Defender\MpCmdRun.exe" 11 | If filesys.FileExists(path) Then 12 | cmdline = Comspec & " /c """ & path & """ -SignatureUpdate" 13 | Shell.Run cmdline,7,TRUE 14 | End If 15 | 16 | Set filesys = Nothing 17 | Set Shell = Nothing -------------------------------------------------------------------------------- /Vipre - Quick or Full Scans/Vipre - Deep Scan.vbs: -------------------------------------------------------------------------------- 1 | '########################################## 2 | '# Copyright 2009 by N-able Technologies # 3 | '# All Rights Reserved # 4 | '# May not be reproduced or redistributed # 5 | '# Without written consent from N-able # 6 | '# Technologies # 7 | '# www.n-able.com # 8 | '########################################## 9 | 10 | 11 | ' Script Name: Vipre - Full Scan.vbs 12 | ' Version: 1.0 13 | ' Author: Eli Selig 14 | ' Date: Oct. 1st, 2009 15 | ' Description: This script will auto-update Vipre 8.x, and then have Vipre do a complete scan and auto-clean of the device. 16 | 17 | 18 | 19 | ' Let's declare some variables 20 | Option Explicit 21 | dim wshShell, wshSysEnv, ProgramFiles, Executable, updatecmd, scancmd, OSType 22 | 23 | 24 | 25 | 'STEP 1: Determine whether this is a 32-bit machine or a 64-bit machine 26 | Set wshShell = WScript.CreateObject("WScript.Shell") 27 | Set wshSysEnv = wshShell.Environment("PROCESS") 28 | ProgramFiles = wshSysEnv("ProgramFiles") 29 | OsType = WshShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE") 30 | 31 | ' Determine if (x86) 32 | If OSType= "x86" then 33 | Executable = "SBAMCommandLineScanner.exe" ' The 32-bit executable 34 | Else 35 | Executable = "SBAMCommandLineScanner.exe" ' Executable expected to change for x64 in next version 36 | End If 37 | 38 | 39 | 40 | 41 | ' Get Vipre to auto-update 42 | Set wshShell = CreateObject("Wscript.Shell") 43 | updatecmd = chr(34) & ProgramFiles & "\Sunbelt Software\SBEAgent\" & Executable & chr(34) & " /updatedefs" 44 | wshShell.Run updatecmd,7,TRUE 45 | Set wshShell = Nothing 46 | 47 | 48 | 49 | ' Scan the entire PC and auto-clean everything 50 | Set wshShell = CreateObject("Wscript.Shell") 51 | scancmd = chr(34) & ProgramFiles & "\Sunbelt Software\SBEAgent\" & Executable & chr(34) & " /scannowquick" 52 | wshShell.Run scancmd,7,TRUE 53 | Set wshShell = Nothing 54 | 55 | 56 | 57 | 'Clear all the variables that were used 58 | Set wshShell = Nothing 59 | Set wshSysEnv = Nothing 60 | Set ProgramFiles = Nothing 61 | Set Executable = Nothing 62 | Set updatecmd = Nothing 63 | Set scancmd = Nothing 64 | set OSType= Nothing -------------------------------------------------------------------------------- /Vipre - Quick or Full Scans/Vipre - Quick Scan.vbs: -------------------------------------------------------------------------------- 1 | '########################################## 2 | '# Copyright 2009 by N-able Technologies # 3 | '# All Rights Reserved # 4 | '# May not be reproduced or redistributed # 5 | '# Without written consent from N-able # 6 | '# Technologies # 7 | '# www.n-able.com # 8 | '########################################## 9 | 10 | 11 | ' Script Name: Vipre - Quick Scan.vbs 12 | ' Version: 1.0 13 | ' Author: Eli Selig 14 | ' Date: Oct. 1st, 2009 15 | ' Description: This script will auto-update Vipre 8.x, and then have Vipre do a complete scan and auto-clean of the device. 16 | 17 | 18 | 19 | ' Let's declare some variables 20 | Option Explicit 21 | dim wshShell, wshSysEnv, ProgramFiles, Executable, updatecmd, scancmd, OSType 22 | 23 | 24 | 25 | 'STEP 1: Determine whether this is a 32-bit machine or a 64-bit machine 26 | Set wshShell = WScript.CreateObject("WScript.Shell") 27 | Set wshSysEnv = wshShell.Environment("PROCESS") 28 | ProgramFiles = wshSysEnv("ProgramFiles") 29 | OsType = WshShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE") 30 | 31 | ' Determine if (x86) 32 | If OSType= "x86" then 33 | Executable = "SBAMCommandLineScanner.exe" ' The 32-bit executable 34 | Else 35 | Executable = "SBAMCommandLineScanner.exe" ' Executable expected to change for x64 in next version 36 | End If 37 | 38 | 39 | 40 | 41 | ' Get Vipre to auto-update 42 | Set wshShell = CreateObject("Wscript.Shell") 43 | updatecmd = chr(34) & ProgramFiles & "\Sunbelt Software\SBEAgent\" & Executable & chr(34) & " /updatedefs" 44 | ' wscript.echo updatecmd 45 | wshShell.Run updatecmd,7,TRUE 46 | Set wshShell = Nothing 47 | 48 | 49 | 50 | ' Scan the entire PC and auto-clean everything 51 | Set wshShell = CreateObject("Wscript.Shell") 52 | scancmd = chr(34) & ProgramFiles & "\Sunbelt Software\SBEAgent\" & Executable & chr(34) & " /scannowquick" 53 | wshShell.Run scancmd,7,TRUE 54 | Set wshShell = Nothing 55 | 56 | 57 | 58 | 'Clear all the variables that were used 59 | Set wshShell = Nothing 60 | Set wshSysEnv = Nothing 61 | Set ProgramFiles = Nothing 62 | Set Executable = Nothing 63 | Set updatecmd = Nothing 64 | Set scancmd = Nothing 65 | set OSType= Nothing -------------------------------------------------------------------------------- /WSUS - Delete Existing Settings/wsusdelete.bat: -------------------------------------------------------------------------------- 1 | net stop wuauserv 2 | reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v AccountDomainSid /f 3 | reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v PingID /f 4 | reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v SusClientId /f 5 | del %SystemRoot%\SoftwareDistribution\*.* /S /Q 6 | reg delete HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate /f 7 | net start wuauserv -------------------------------------------------------------------------------- /WSUS - Display WSUS Settings in Notepad/wsussettings.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | :: 3 | Echo This script will query Automatic Update Client / Windows Update Agent settings. 4 | REM as configured via Group Policy to detect/download/install updates from WSUS / SUS. 5 | 6 | REM Result will be written to %temp%\WUASettings.txt and then launched in Notepad. 7 | REM Disable Word Wrap and Save the batch file "WUASettings.cmd". 8 | 9 | Echo More information on PatchAholic Blog http://msmvps.com/athif 10 | Echo For Windows 2000 machines - 11 | Echo You can download REG.EXE from http://www.dynawell.com/reskit/microsoft/win2000/reg.zip 12 | 13 | REM Author:- Mohammed Athif Khaleel :- Date April 25, 2006 14 | Pause 15 | :: 16 | @echo on 17 | reg query "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /s > %temp%\WUASettings.txt 18 | reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" >> 19 | 20 | %temp%\WUASettings.txt 21 | 22 | notepad %temp%\WUASettings.txt 23 | 24 | -------------------------------------------------------------------------------- /WSUS - Report to WSUS Server/wsusrestart.bat: -------------------------------------------------------------------------------- 1 | wuauclt.exe /resetauthorization /detectnow 2 | wuauclt.exe /reportnow -------------------------------------------------------------------------------- /WSUS Config Script/WSUSUpdate.vbs: -------------------------------------------------------------------------------- 1 | '******************************************************************************** 2 | '*********** Script: WSUSUpdate.vbs 3 | '*********** Description: Configures WSUS settings via the registry. This script 4 | '*********** is intended for devices not in a domain. 5 | '*********** Author: Chris Reid 6 | '*********** Date: March 7th, 2008 7 | '*********** Usage: At the DOS prompt: cscript WSUSUpdate.vbs TargetGroup WSUSAddress 8 | '*********** (i.e. cscript WSUSUpdate.vbs AcmeCo http://1.2.3.4) 9 | '*********** 10 | '*********** In N-central: WSUSUpdate.vbs TargetGroup WSUSAddress 11 | '******************************************************************************** 12 | 13 | 'NOTE: For information on the variables being set by this script, please refer to the following Microsoft KB article: 14 | ' http://technet2.microsoft.com/windowsserver/en/library/75ee9da8-0ffd-400c-b722-aeafdb68ceb31033.mspx?mfr=true 15 | 16 | 'NOTE: Please consult with a Microsoft Certified Engineer before running this script. This script is provided as-is, with no warranty 17 | ' or guarantee. 18 | 19 | 20 | ' Check to make sure that two variables were passed to the script, and give the variables names. 21 | If WScript.Arguments.Count = 2 Then 22 | TargetGroup = WScript.Arguments.Item(0) 23 | WSUSAddress = WScript.Arguments.Item(1) 24 | Else 25 | wscript.Quit(1) 26 | End If 27 | 28 | 29 | 'Declare Windows registry variables 30 | RegPath1 = "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" 31 | RegPath2 = "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU" 32 | 33 | 34 | 'Modify the settings of the "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\" registry keys 35 | 36 | Set Shell = CreateObject("Wscript.Shell") 37 | Shell. RegWrite "" & RegPath1 & "\ElevateNonAdmins", 0, "REG_DWORD" 38 | Shell. RegWrite "" & RegPath1 & "\TargetGroup", "" & TargetGroup & "", "REG_SZ" 39 | Shell. RegWrite "" & RegPath1 & "\TargetGroupEnabled",1, "REG_DWORD" 40 | Shell. RegWrite "" & RegPath1 & "\WUServer", "" & WSUSAddress & "", "REG_SZ" 41 | Shell. RegWrite "" & RegPath1 & "\WUStatusServer","" & WSUSAddress & "", "REG_SZ" 42 | Set Shell = Nothing 43 | 44 | 45 | 46 | 47 | 'Modify the settings of the "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU\" registry keys 48 | 49 | Set Shell = CreateObject("Wscript.Shell") 50 | Shell. RegWrite "" & RegPath2 & "\AUOptions", 4, "REG_DWORD" 51 | Shell. RegWrite "" & RegPath2 & "\AutoInstallMinorUpdates", 1, "REG_DWORD" 52 | Shell. RegWrite "" & RegPath2 & "\DetectionFrequency", 1, "REG_DWORD" 53 | Shell. RegWrite "" & RegPath2 & "\DetectionFrequencyEnabled", 1, "REG_DWORD" 54 | Shell. RegWrite "" & RegPath2 & "\NoAutoRebootWithLoggedOnUsers", 1, "REG_DWORD" 55 | Shell. RegWrite "" & RegPath2 & "\NoAutoUpdate", 0, "REG_DWORD" 56 | Shell. RegWrite "" & RegPath2 & "\RebootRelaunchTimeout", 60, "REG_DWORD" 57 | Shell. RegWrite "" & RegPath2 & "\RebootRelaunchTimeoutEnabled", 1, "REG_DWORD" 58 | Shell. RegWrite "" & RegPath2 & "\RebootWarningTimeout", 30, "REG_DWORD" 59 | Shell. RegWrite "" & RegPath2 & "\RebootWarningTimeoutEnabled", 1, "REG_DWORD" 60 | Shell. RegWrite "" & RegPath2 & "\RescheduleWaitTime", 0, "REG_DWORD" 61 | Shell. RegWrite "" & RegPath2 & "\RescheduleWaitTimeEnabled", 0, "REG_DWORD" 62 | Shell. RegWrite "" & RegPath2 & "\ScheduledInstallDay", 0, "REG_DWORD" 63 | Shell. RegWrite "" & RegPath2 & "\ScheduledInstallTime", 15, "REG_DWORD" 64 | Shell. RegWrite "" & RegPath2 & "\UseWUServer", 1, "REG_DWORD" 65 | Set Shell = Nothing 66 | 67 | 68 | 69 | 'Stop the "Automatic Updates" service 70 | Set Shell = CreateObject("Wscript.Shell") 71 | Shell.Run "NET STOP wuauserv",7,TRUE 72 | Set Shell = Nothing 73 | 74 | 'Delete the log file for the "Automatic Updates" service 75 | Set FSO = CreateObject("Scripting.FileSystemObject") 76 | FSO.DeleteFile "\\127.0.0.1\ADMIN$\windowsupdate.log" 77 | Set FSO = Nothing 78 | 79 | 'Start the "Automatic Updates" service 80 | Set Shell = CreateObject("Wscript.Shell") 81 | Shell.Run "NET START wuauserv",7,TRUE 82 | Set Shell = Nothing 83 | 84 | 'Force the device to check in with the WSUS server 85 | Dim FSO 86 | Set Shell = CreateObject("Wscript.Shell") 87 | Shell.Run "wuauclt.exe /resetauthorization /detectnow",7,TRUE 88 | Set Shell = Nothing 89 | -------------------------------------------------------------------------------- /WikiFiles/Repair-PME/Patch_Status_v2_Misconfigured.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/WikiFiles/Repair-PME/Patch_Status_v2_Misconfigured.png -------------------------------------------------------------------------------- /WikiFiles/Repair-PME/Repair-PME-Demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/WikiFiles/Repair-PME/Repair-PME-Demo.gif -------------------------------------------------------------------------------- /WikiFiles/Repair-PME/Repair-PME_Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/WikiFiles/Repair-PME/Repair-PME_Logo.png -------------------------------------------------------------------------------- /WikiFiles/Repair-PME/Repair-PME_Logo_Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/WikiFiles/Repair-PME/Repair-PME_Logo_Small.png -------------------------------------------------------------------------------- /WikiFiles/Repair-PME/temp: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Windows 11 22H2 Compatibility/Get-Win11-22H2Compatibility.ps1: -------------------------------------------------------------------------------- 1 | # Using information from https://www.ghacks.net/2022/06/23/a-look-in-the-registry-reveals-if-your-pc-is-compatible-with-windows-11-version-22h2/ 2 | 3 | $CompatReg = (get-itemproperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\TargetVersionUpgradeExperienceIndicators\NI22H2").RedReason 4 | $CompatReg = $CompatReg | Out-String 5 | 6 | if ($null -eq $CompatReg) { 7 | $Compat = "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') | ERROR | Unable to Read Registry Value" 8 | exit 2 9 | } 10 | else { 11 | if ($CompatReg -match "None") { 12 | $Compat = "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') | INFO | $CompatReg - No hardware compatibility issues have been detected by Windows Telemetry Data" 13 | Write-Host $Compat -ForegroundColor Green 14 | Exit 0 15 | } 16 | else { 17 | $Compat = "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') | ERROR | $CompatReg" 18 | Write-Host $Compat -ForegroundColor Red 19 | Exit 1 20 | } 21 | } -------------------------------------------------------------------------------- /Windows Disk Cleaner/DiskcCleaner.vbs: -------------------------------------------------------------------------------- 1 | Set sh = CreateObject("Wscript.Shell") 2 | 3 | cleaningPoints = array("Active Setup Temp Folders", _ 4 | "Content Indexer Cleaner", _ 5 | "Downloaded Program Files", _ 6 | "Hibernation File", _ 7 | "Internet Cache Files", _ 8 | "Memory Dump Files", _ 9 | "Microsoft Office Temp Files", _ 10 | "Old ChkDsk Files", _ 11 | "Previous Installations", _ 12 | "Recycle Bin", _ 13 | "Setup Log Files", _ 14 | "System error memory dump files", _ 15 | "System error minidump files", _ 16 | "Temporary Files", _ 17 | "Temporary Setup Files", _ 18 | "Temporary Sync Files", _ 19 | "Thumbnail Cache", _ 20 | "Upgrade Discarded Files", _ 21 | "Windows Error Reporting Archive Files", _ 22 | "Windows Error Reporting Queue Files", _ 23 | "Windows Error Reporting System Archive Files", _ 24 | "Windows Error Reporting System Queue Files") 25 | 26 | function createRegKeys() 27 | for each cleaningPoint in cleaningPoints 28 | sh.regwrite"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\VolumeCaches\" & cleaningPoint & "\StateFlags1337", 2, "REG_DWORD" 29 | next 30 | end function 31 | 32 | function deleteRegKeys() 33 | for each cleaningPoint in cleaningPoints 34 | sh.regdelete"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\VolumeCaches\" & cleaningPoint & "\StateFlags1337" 35 | next 36 | end function 37 | 38 | createRegKeys() 39 | sh.run "cleanmgr.exe /D C /sagerun:1337",7,TRUE 40 | deleteRegKeys() 41 | 42 | Set sh = Nothing 43 | -------------------------------------------------------------------------------- /Windows Support Status/Service Template - Windows Support Status - Laptops.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Windows Support Status/Service Template - Windows Support Status - Laptops.zip -------------------------------------------------------------------------------- /Windows Support Status/Service Template - Windows Support Status - Servers.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Windows Support Status/Service Template - Windows Support Status - Servers.zip -------------------------------------------------------------------------------- /Windows Support Status/Service Template - Windows Support Status - Workstations.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Windows Support Status/Service Template - Windows Support Status - Workstations.zip -------------------------------------------------------------------------------- /Windows Update - Search Download and Install/WUA_SearchDownloadInstall.vbs: -------------------------------------------------------------------------------- 1 | ' Modified from http://msdn.microsoft.com/en-us/library/aa387102%28VS.85%29.aspx 2 | ' 3 | ' Modifications 12/16/2010 by Steve Drees sdrees@greatinsight.com 4 | ' 5 | Set updateSession = CreateObject("Microsoft.Update.Session") 6 | Set updateSearcher = updateSession.CreateupdateSearcher() 7 | 8 | const EVENTLOG_SUCCESS = 0 9 | const EVENTLOG_ERROR = 1 10 | const EVENTLOG_WARNING = 2 11 | const EVENTLOG_INFORMATION = 4 12 | const EVENTLOG_AUDIT_SUCCESS = 8 13 | const EVENTLOG_AUDIT_FAILURE = 16 14 | 15 | Set objShell = Wscript.CreateObject("Wscript.Shell") 16 | 17 | objShell.LogEvent EVENTLOG_INFORMATION, "Searching for updates..." 18 | 19 | 20 | Set searchResult = _ 21 | updateSearcher.Search("IsInstalled=0 and Type='Software' and AutoSelectOnWebSites=1") 22 | 23 | If searchResult.Updates.Count = 0 Then 24 | objShell.LogEvent EVENTLOG_INFORMATION, "No updates to install. Aborting." 25 | WScript.Quit 26 | End If 27 | 28 | strUpdates = "List of applicable items on the machine:" & vbCRLF 29 | For I = 0 To searchResult.Updates.Count-1 30 | Set update = searchResult.Updates.Item(I) 31 | strUpdates = strUpdates & update.Title & vbCRLF 32 | Next 33 | 34 | objShell.LogEvent EVENTLOG_INFORMATION, strUpdates 35 | 36 | 37 | 38 | Set updatesToDownload = CreateObject("Microsoft.Update.UpdateColl") 39 | 40 | For I = 0 to searchResult.Updates.Count-1 41 | Set update = searchResult.Updates.Item(I) 42 | updatesToDownload.Add(update) 43 | Next 44 | 45 | 'WScript.Echo vbCRLF & "Downloading updates..." 46 | objShell.LogEvent EVENTLOG_INFORMATION, "Downloading updates..." 47 | 48 | 49 | Set downloader = updateSession.CreateUpdateDownloader() 50 | downloader.Updates = updatesToDownload 51 | downloader.Download() 52 | 53 | strDownloads ="List of downloaded updates: " & vbCRLF 54 | For I = 0 To searchResult.Updates.Count-1 55 | Set update = searchResult.Updates.Item(I) 56 | If update.IsDownloaded Then 57 | WScript.Echo I + 1 & "> " & update.Title 58 | strDownloads = strDownloads & update.Title & vbCRLF 59 | End If 60 | Next 61 | 62 | objShell.LogEvent EVENTLOG_INFORMATION, strDownloads 63 | 64 | 65 | Set updatesToInstall = CreateObject("Microsoft.Update.UpdateColl") 66 | 67 | 68 | For I = 0 To searchResult.Updates.Count-1 69 | set update = searchResult.Updates.Item(I) 70 | If update.IsDownloaded = true Then 71 | updatesToInstall.Add(update) 72 | End If 73 | Next 74 | 75 | strInput = "Y" 76 | 77 | 78 | If (strInput = "N" or strInput = "n") Then 79 | objShell.LogEvent EVENTLOG_INFORMATION, "Not Installing" 80 | WScript.Quit 81 | ElseIf (strInput = "Y" or strInput = "y") Then 82 | objShell.LogEvent EVENTLOG_INFORMATION, "Installing updates..." 83 | Set installer = updateSession.CreateUpdateInstaller() 84 | installer.Updates = updatesToInstall 85 | Set installationResult = installer.Install() 86 | 87 | 'Output results of install 88 | 89 | strResults = "Installation Result: " & _ 90 | installationResult.ResultCode & vbCRLF & "Reboot Required: " & _ 91 | installationResult.RebootRequired & vbCRLF 92 | objShell.LogEvent EVENTLOG_INFORMATION, strResults 93 | 94 | 95 | End If 96 | -------------------------------------------------------------------------------- /Windows Update Agent Current/ReadMe.md: -------------------------------------------------------------------------------- 1 | Windows Update Agent Current 2 | ============================ 3 | 4 | Overview 5 | -------- 6 | This is the AMP to feed an AMP-based custom service. 7 | 8 | It returns two parameters: 9 | * Windows Update Agent is Current - True or False - whether the windows update agent on the device is at least at the level defined in the automation policy 10 | * Windows Update Engine Version - The version of wuaueng.dll 11 | 12 | Maintenance 13 | ----------- 14 | 15 | The required agent versions are hard-coded into the policy. This is because (as of Automation Manager 2.0.3.177) there is a bug where changes to Global Variable value in the Input object are not updated in the executed policy. As new minimum installed versions are released, update the appropriate assignments in the policy. Note that these may be different for Windows 7 and Windows 8.1. 16 | 17 | 18 | -------------------------------------------------------------------------------- /Windows Update Agent Current/Windows Update Agent Current.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Windows Update Agent Current/Windows Update Agent Current.zip -------------------------------------------------------------------------------- /Windows-Update-Agent-Upgrade/WUAUpgrade-v03.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Windows-Update-Agent-Upgrade/WUAUpgrade-v03.exe -------------------------------------------------------------------------------- /Windows-Update-Agent-Upgrade/Windows Update Agent Upgrade Process.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Windows-Update-Agent-Upgrade/Windows Update Agent Upgrade Process.pdf -------------------------------------------------------------------------------- /Workstation Maintenance/AMP_UPLOAD_READ_ME.txt: -------------------------------------------------------------------------------- 1 | There are two methods to upload an Automation Policy (AMP) into N-central. Choose one of the following methods: 2 | 3 | How to upload AMP directly into N-central: 4 | 5 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 6 | 2. Choose on the OS Level from top-left drop down 7 | 3. Expand Configuration Pane -> Scheduled Tasks -> Script/Software Repository 8 | 4. Click Add -> Select Automation Policy 9 | 5. Click Browse -> Select .AMP 10 | 6. Click OK -> OK 11 | 12 | 13 | 14 | How to upload AMP through Automation Designer into N-central: 15 | 16 | 1. Login to the UI as Product Admin (by default, productadmin@n-able.com) 17 | 2. Choose on the OS Level from top-left drop down 18 | 3. From Actions Pane -> Click Start Automation Manager 19 | 4. From within the Automation Manager Designer, choose File -> Open 20 | 5. Browse to .AMP 21 | 6. Click OK 22 | 7. From within the Automation Manager Designer, choose File -> Upload -------------------------------------------------------------------------------- /Workstation Maintenance/Workstation Maintenance.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N-able/ScriptsAndAutomationPolicies/08cff3e45079df5e78be70387a64d74609274a66/Workstation Maintenance/Workstation Maintenance.jpg -------------------------------------------------------------------------------- /install_net45_ps40/installPS40.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | installPS40.ps1 3 | Originally by: Evan Morrissey 4 | Modified by: Tyler Jones 5 | 4.0 Modification by: Stephen Testino 6 | Last Updated: 2014-08-11 7 | 8 | Tests the version of PowerShell and attempts to update it to PowerShell 4.0 9 | #> 10 | 11 | param( 12 | [switch]$Reboot 13 | ) 14 | 15 | 16 | # Declare the function for retrieving the update file 17 | function HTTP-Download{ 18 | param( 19 | $url 20 | , 21 | $fileName 22 | ) 23 | $webClient = New-Object System.Net.WebClient 24 | $localPath = "$env:temp\$fileName" 25 | $remote = $url + $fileName 26 | $ErrorActionPreference = "Stop" 27 | 28 | $path_check = Test-Path $localPath 29 | if($path_check -eq $False){ 30 | try 31 | { 32 | $webClient.downloadFile($remote,$localPath) 33 | return $localPath 34 | } 35 | catch [System.Management.Automation.MethodInvocationException] 36 | { 37 | "Error downloading file" | Write-Host 38 | "Download URL: " + $url | Write-Host 39 | "Full Error message: " | Write-Host 40 | $error[0] | fl * -f | Write-Host 41 | return $false 42 | } 43 | } 44 | else{ 45 | Write-Host "Download already exists. Try running" 46 | return $localPath 47 | } 48 | } 49 | 50 | 51 | # Find OS architecture 52 | $psVer = $host.version 53 | $os = get-wmiobject win32_operatingsystem 54 | $osArch = "x64" 55 | 56 | if ($os.osarchitecture -match "32") 57 | { 58 | $osArch = "x86" 59 | } 60 | 61 | # Write date and existing PS details for logs 62 | $date = get-date 63 | "PowerShell 4.0 Install/Upgrade: " + $date | Write-Host 64 | "`r`nInstalled PowerShell version: " + $psVer.toString() | Write-Host 65 | 66 | 67 | # Check if powershell is already version 3 or higher 68 | if ($psVer.major -gt 2) 69 | { 70 | "`r`nPowerShell is already up to date, exiting" | Write-Host 71 | exit 0 72 | } 73 | 74 | 75 | # Check for versions of Windows not compatible with PowerShell 3.0 76 | if (($os.version -lt 6.0) -or ($os.caption -match "vista") -or ($os.version -ge 6.2)) 77 | { 78 | "`r`nPowerShell 4.0 requires Windows 6.1 or greater, and is not compatible with Windows Vista. It is preloaded on Windows 8. No update required/possible. Exiting." | Write-Host 79 | exit 0 80 | } 81 | else{ 82 | if($os.ServicePackMajorVersion -lt 1){ 83 | "`r`nPowershell 4.0 requires SP1 atleast." 84 | exit 0 85 | } 86 | } 87 | 88 | 89 | 90 | # Download the installer 91 | "`r`nAttempting to download latest PowerShell installer from Microsoft..." 92 | 93 | # Create the download URL based on the windows version/architecture 94 | $baseURL = "http://download.microsoft.com/download/3/D/6/3D61D262-8549-4769-A660-230B67E15B25/" 95 | if ($os.version.subString(0,3) -eq 6.1) 96 | { 97 | $psFile = "Windows" + $os.version.subString(0,3) + "-KB2819745-" + $osArch + "-MultiPkg" + ".msu" 98 | } 99 | else 100 | { 101 | "Powershell 4.0 is not applicable to your PC" 102 | } 103 | 104 | if ($psFile -eq $null) 105 | { 106 | "`r`nCould not generate a URL for download. Check Windows version to see if PowerShell 4.0 is compatible or required." 107 | exit 0 108 | } 109 | 110 | # Download function call 111 | $dlResult = HTTP-Download $baseURL $psFile 112 | 113 | if ($dlResult -eq $false) 114 | { 115 | "`r`nDownload failed, please update PowerShell manually. Aborting script" 116 | exit 1 117 | } 118 | else 119 | { 120 | # Install Windows Mangement Framework 4.0 (PowerShell 4.0) 121 | & $dlResult /quiet /norestart 122 | $i = 0 123 | Start-Sleep -Seconds 5 124 | while (get-process | ? {$_.processName -eq "wusa"}) 125 | { 126 | start-sleep -seconds 10 127 | $i++ 128 | if ($i -gt 300) 129 | { 130 | "`r`nPowerShell has been trying to install for 30 minutes?!? Aborting!" 131 | get-process | ? {$_.processName -eq "wusa"} | stop-process -force 132 | exit 1 133 | } 134 | } 135 | "`r`nPowerShell 4.0 Install complete: " + (get-date) 136 | 137 | if($Reboot){ 138 | "`r`nInstall complete. Rebooting in 10 seconds" 139 | Start-Sleep -Seconds 10 140 | Restart-Computer -Force 141 | } 142 | } 143 | 144 | -------------------------------------------------------------------------------- /install_net45_ps40/installnet45.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | installnet45.ps1 3 | Originally (installPS40.ps1) by: Evan Morrissey 4 | Modified (installPS40.ps1) by: Tyler Jones 5 | installnet45 Modification by: Stephen Testino 6 | Last Updated: 2014-08-11 7 | 8 | Tests if net45 is installed, updates if necessary 9 | #> 10 | 11 | param( 12 | [switch]$Reboot 13 | ) 14 | 15 | # Is Net4.5 Installed? 16 | function Test-Net45{ 17 | 18 | if (Test-Path 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full'){ 19 | if (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full' -Name Release -ErrorAction SilentlyContinue){ 20 | return $True 21 | } 22 | return $False 23 | } 24 | } 25 | 26 | 27 | # Declare the function for retrieving the update file 28 | function HTTP-Download{ 29 | param( 30 | $url 31 | , 32 | $fileName 33 | ) 34 | $webClient = New-Object System.Net.WebClient 35 | $localPath = "$env:temp\$fileName" 36 | $remote = $url + $fileName 37 | $ErrorActionPreference = "Stop" 38 | 39 | $path_check = Test-Path $localPath 40 | if($path_check -eq $False){ 41 | try 42 | { 43 | $webClient.downloadFile($remote,$localPath) 44 | return $localPath 45 | } 46 | catch [System.Management.Automation.MethodInvocationException] 47 | { 48 | "Error downloading file" | Write-Host 49 | "Download URL: " + $url | Write-Host 50 | "Full Error message: " | Write-Host 51 | $error[0] | fl * -f | Write-Host 52 | return $false 53 | } 54 | } 55 | else{ 56 | Write-Host "Download already exists. Try running" 57 | return $localPath 58 | } 59 | } 60 | 61 | #Main Script 62 | # Check if PC has .NET 4.5 63 | if(!([bool]$(Test-Net45))){ 64 | "`r`n.NET 4.5 not detected - Downloading and Installing." 65 | $baseurl = "http://download.microsoft.com/download/B/A/4/BA4A7E71-2906-4B2D-A0E1-80CF16844F5F/" 66 | $filename = "dotNetFx45_Full_setup.exe" 67 | $dlResult = HTTP-Download $baseURL $filename 68 | 69 | if ($dlResult -eq $false) 70 | { 71 | "`r`nDownload failed, please update Net 4.5 manually. Aborting script" 72 | exit 1 73 | } 74 | else 75 | { 76 | # Install Net 4.5 77 | & $dlResult /quiet /norestart 78 | Start-Sleep -Seconds 5 79 | $i = 0 80 | 81 | while (get-process | ? {$_.processName -eq ($filename -replace ".exe","")}) 82 | { 83 | start-sleep -seconds 10 84 | $i++ 85 | if ($i -gt 300) 86 | #if($i -gt 2) 87 | { 88 | "`r`nNET 4.5 has been trying to install for 30 minutes?!? Aborting!" 89 | #"`r`nNET 4.5 has been trying to install for 20 seconds?!? Aborting!" 90 | (get-process | ? {$_.processName -eq ($filename -replace ".exe","")}) | stop-process -force 91 | exit 1 92 | } 93 | } 94 | "`r`n.NET Framework 4.5 Install complete: " + (get-date) 95 | if($Reboot){ 96 | Restart-Computer -Force 97 | } 98 | } 99 | } 100 | else{ 101 | ".NET Framework 4.5 Already Installed" 102 | } -------------------------------------------------------------------------------- /mbsa_install/mbsa_install.vbs: -------------------------------------------------------------------------------- 1 | 'This program was written by Darren Wiebe of Cougar Ridge Computer Systems. It is 2 | 'free for use by N-Able Partners. 3 | 'On Windows XP this will silently install MBSA. On Vista and 7 the UAC is a problem so it will 4 | 'prompt the user. 5 | 6 | 'Set temporary directory 7 | strHDLocation = WScript.CreateObject("Scripting.FileSystemObject").GetSpecialFolder(2) 8 | 'strHDLocation = "C:\Temp" 9 | 10 | 'Check Operating System so we know if we need the 32bit or 64bit version 11 | set WshShell = CreateObject("WScript.Shell") 12 | OsType = WshShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE") 13 | If (OsType = "x86") Then 14 | strFileURL = "http://download.microsoft.com/download/4/f/3/4f3044cb-0cf1-4c59-9da8-df6f8b1df6ef/MBSASetup-x86-EN.msi" 15 | strHDLocation = strHDLocation & "\MBSASetup-x86-EN.msi" 16 | Else 17 | strFileURL = "http://download.microsoft.com/download/4/f/3/4f3044cb-0cf1-4c59-9da8-df6f8b1df6ef/MBSASetup-x64-EN.msi" 18 | strHDLocation = strHDLocation & "\MBSASetup-x64-EN.msi" 19 | End If 20 | 21 | 'Check for Vista or XP. 22 | const HKEY_LOCAL_MACHINE = &H80000002 23 | strComputer = "." 24 | dim Vistaver, dwvalue, UACStatus, UACValue 25 | Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") 26 | Set colItems = objWMIService.ExecQuery("Select * From Win32_OperatingSystem") 27 | For Each objItem in colItems 28 | 'msgBox(objItem.Caption) 29 | If Instr(objItem.Caption, "Vista") Then 30 | OperatingSystem = "UAC" 31 | ElseIf Instr(objItem.Caption, "Windows 7") Then 32 | OperatingSystem = "UAC" 33 | End If 34 | Next 35 | 36 | 37 | 'Begin Download 38 | Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP") 39 | 40 | objXMLHTTP.open "GET", strFileURL, false 41 | objXMLHTTP.send() 42 | 43 | If objXMLHTTP.Status = 200 Then 44 | ' msgBox("Downloading") 45 | Set objADOStream = CreateObject("ADODB.Stream") 46 | objADOStream.Open 47 | objADOStream.Type = 1 'adTypeBinary 48 | 49 | objADOStream.Write objXMLHTTP.ResponseBody 50 | objADOStream.Position = 0 'Set the stream position to the start 51 | 52 | Set objFSO = Createobject("Scripting.FileSystemObject") 53 | If objFSO.Fileexists(strHDLocation) Then 54 | objFSO.DeleteFile strHDLocation 55 | ' msgBox("Deleting File") 56 | End If 57 | Set objFSO = Nothing 58 | 59 | objADOStream.SaveToFile strHDLocation 60 | objADOStream.Close 61 | Set objADOStream = Nothing 62 | End if 63 | 64 | Set objXMLHTTP = Nothing 65 | 66 | 67 | Set Command = WScript.CreateObject("WScript.Shell") 68 | if (OperatingSystem = "UAC") Then 69 | answer = MsgBox("This Microsoft security application is being installed on your system to assist in ensuring your computer security. If you have questions or are concerned that this may be a virus please contact us at 000-000-0000.",0,"IT Support") 70 | cmd = "msiexec.exe /I " & strHDLocation & " /QB+" 71 | Else 72 | cmd = "msiexec.exe /I " & strHDLocation & " /QN" 73 | End If 74 | WshShell.Run (cmd) -------------------------------------------------------------------------------- /reconfigWMI/reconfigWMI.bat: -------------------------------------------------------------------------------- 1 | # Note that this was found at lockergnome.com 2 | # Note that this is similiar to the one called renew wmi on n-able.com except for my start and stop commands 3 | # Mike Scallion, Lead NOC Engineer, masterIT - July 2008 Updated 4 | 5 | 6 | winmgmt /clearadap 7 | winmgmt /kill 8 | winmgmt /unregserver 9 | winmgmt /regserver 10 | winmgmt /resyncperf 11 | 12 | # Stop WMI, not always necessary, but you never know... 13 | net stop "Windows Management Instrumentation" 14 | # This is an old DOS BATCH TIME DELAY Trick 15 | ping 127.0.0.1 -n 5 > NUL 16 | # Now answer yes to the, "do you also want to stop these services" remember this is just WMI 17 | y 18 | # Now restart WMI, Note other stopped services with it will not restart automatically, again 19 | # most are not necessary to function and if exchange, simply restart using generic service restart within n-able 20 | # again, pause first 21 | ping 127.0.0.1 -n 3 > NUL 22 | net start "Windows Management Instrumentation" 23 | # For Vista, restart Security Center and IP Helper 24 | net start "Security Center" 25 | net start "IP Helper" 26 | # For Exchange, restart Exchange Monitoring Piece. 27 | net start "Microsoft Exchange Management" 28 | # Disclaimer, this has worked on my machines, note that it may not work on all, but has on mine 29 | # Not tested on 2008 --------------------------------------------------------------------------------