N-able RMM: Community Scripts - Page Twenty-Five

Last Modified

Tue Jan 29 14:21 GMT 2019

Description

Disclaimer: Please note, if any items or other contains set forth herein is derived from N-able, any items or other content posted are provided as a suggestion or recommendation to you for your internal use. This is not part of the N-able software or services that you have purchased from N-able, and the information set forth herein may come from third party customers. Your organization should internally review and assess to what extent, if any, such custom items or recommendations will be incorporated into your environment. Any custom scripts obtained herein are provided to you "AS IS" without indemnification, support, or warranty of any kind, express or implied. You elect to utilize the custom scripts at your own risk, and you will be solely responsible for the incorporation of the same, if any.

Environment

  • N-able Remote Monitoring & Management (RMM)

Solution


Fix It Script List
 
DownloadProblem title: Change Internet Explorer Homepage.. 
Problem description: Hi, I am an IT manager and my employer wants all the computers in the company to display the same Homepage. Can anyone out there help me with this problem? 
Fix description: This script will change your IE homepage to the URL you specify.
DownloadProblem title: How do I remove the Active Directory account for a computer? 
Problem description: I'd like a script that removes the Active Directory account from the specific computer. 
Fix description: This PowerShell script will find and remove the Active Directory computer account.
DownloadProblem title: Crypto prevention 
Problem description: Need a Crypto prevention script. Something that will put restrictions on appdata execution and maybe prevent certain type of extensions (double extensions.. .pdf.exe, etc.) from being executed. 
Fix description: Crypto Prevent. This script is intended to block the inadvertent execution of files in the %appdata% directory and subdirectories. It makes registry entries that turn on and configure software execution policies which prevent program execution common among many viruses (especially Crypto style viruses). There is a whitelist section of the script which can be altered to allow if it is desired to allow certain applications to run from %appdata%. This script has been optimized for LN RMM and tested on Windows 7.x 32 & 64 Bit and Windows 8.x **Added versioning code. Incrementing the version number will cause it to re-apply (helpful for adding things to the white list)
DownloadProblem title: Block Windows 10 update 
Problem description: I need a script to temporarily block the Windows 10 Update on workstations until we have tested it for our clients. Anyone know of how to do this? 
Fix description: I have a simple batch file to disable the Windows 10 systray reminder via registry edit.
DownloadProblem title: Monitor folder size change 
Problem description: I need to monitor a folder for size change (increase). If no change between checks, fail/send an alert. Anyone have something? 
Fix description: I have had to accomplish a similar task. I wrote this script for my purposes, so you will need to edit for you needs. This will pull size and item count on every folder (with exclusion list) from an exchange mailbox when scheduled, and compare with the last time the script was run, then email a nice report with CSS. Hope this helps.
DownloadProblem title: Remove Domain Users from Local Administrators Group 
Problem description: Possible to script a way to remove Domain Users group from the local administrators group on computers? Would be great to also report back into RMM
Fix description: Just add this line to you login script. I've used this. It works. Batch / dos script
DownloadProblem title: Windows 10 WiFi Sence Disable 
Problem description: WiFi Sence is enabled as default. I want to kill it 
Fix description: The script will disable the share to all social medias for all users and turn off the sharing.
DownloadProblem title: Block Windows 10 update 
Problem description: I need a script to temporarily block the Windows 10 Update on workstations until we have tested it for our clients. Anyone know of how to do this? 
Fix description: from the TechNet blog a registry entry will disable the windows 10 install through the creation of a registry entry. This VBScript will create the reg file and apply it. And for MaxFocus, it will report back if it has been completed if deployed as a check or a Scheduled Task. For Reference: http://blogs.technet.com/b/charlesa_us/archive/2015/06/25/how-to-remove-block-and-prevent-quot-get-windows-10-quot-application-for-corporate-environments.aspx
DownloadProblem title: Script to catch CryptoWall 
Problem description: Hello, I am looking for a script i can use on Remote Management to inform me either when a file with the name help_decrypt is created. Or to inform me when a txt file or .html file is added to a root directory. Thanks, TD 
Fix description: This is a check that will work on servers. Run it as a 24/7 check. It will check network shares for the how_decrypt.gif, how_decrypt.html and help_restore_files.txt and fail the check in RMM if found. I will post another that i wrote to check workstations.
DownloadProblem title: Script to catch CryptoWall 
Problem description: Hello, I am looking for a script i can use on Remote Management to inform me either when a file with the name help_decrypt is created. Or to inform me when a txt file or .html file is added to a root directory. Thanks, TD 
Fix description: Here is the one to check workstations. This will poll each user folder's desktop and Documents to check for the same files as my other script. it set to documents and desktop as no user should have admin rights to their computer. that will restrict the infection from encrypting the whole drive
DownloadProblem title: Turn on Random Password for Take Control 
Problem description: Hi there, Does anyone have a script to turn on randomize password either 6 or 8 character password on machines after Take Control has been installed? There is also the option for Multi user mode for Terminal Server. Each time the Take Control software gets updated it will wipe out the original configuration. 
Fix description: Here is a batch file we wrote to generate a random 8 character password. It sets a registry key and restarts the teamviewer service. It will need to be modified as versions change. This one is written for version 10.
DownloadProblem title: Script to catch CryptoWall 
Problem description: Hello, I am looking for a script i can use on Remote Management to inform me either when a file with the name help_decrypt is created. Or to inform me when a txt file or .html file is added to a root directory. Thanks, TD 
Fix description: Following on from: gkszywienski The latest versions of CryptoWall seem to be using the file HELP_DECRYPT.(png/html/txt) to post decryption info. To modify his script to check for CryptoWall 2 & 3.0 i have changed file names to reflect this,
DownloadProblem title: Trying to unjoin a computer account in our domain 
Problem description: I'm looking for a script that will disable and unjoin a computer account from our domain. 
Fix description: This VBS script will disable a computer account in the domain.
DownloadProblem title: Script to catch CryptoWall 
Problem description: Hello, I am looking for a script i can use on Remote Management to inform me either when a file with the name help_decrypt is created. Or to inform me when a txt file or .html file is added to a root directory. Thanks, TD 
Fix description: Following on from: gkszywienski And for PC usage (not servers) p.s. to add this in dashboard, select Add Check under the site you want to use on, then add it as a 24/7 Script check.
DownloadProblem title: Automatically schedule shutdown 
Problem description: hi to all, i have create a script to using as site automated task to shutodown all computers at 23:45. the script is :win7 shutdown.exe /f /s /t 60 :winxp shutdown.exe -f -s -t 60 but if the computer is closed by the user the automated task is not running next day and running only after 2 days. is something wrong or have a better script for this case? thanks 
Fix description: Hi Jomani. We use this simple powershell script to shutdown a group of PC's on our domain, Just replace anything in "*" with your own domain info, Just run it as a scheduled task to set the time from a user with some domain admin authentication
DownloadProblem title: Automatically schedule shutdown 
Problem description: hi to all, i have create a script to using as site automated task to shutodown all computers at 23:45. the script is :win7 shutdown.exe /f /s /t 60 :winxp shutdown.exe -f -s -t 60 but if the computer is closed by the user the automated task is not running next day and running only after 2 days. is something wrong or have a better script for this case? thanks 
Fix description: Also, If you are not running with a Domain and still have some form of control over PC's admin, (think workgroup), you can run the below script, and just create a txt file on the c drive with PC names on a seperate line.
DownloadProblem title: Server reporting offline 
Problem description: Hey guys We occasionally have issues where a device is reporting offline however you can remote into the device and restart the agent to get it reporting correctly. I'm wondering if there's a way to to automatically restart the the agent once it stops reporting correctly via a script. Thanks in advance 
Fix description: We found that by running this once a week, this issue has doesn't happen to us anymore.
DownloadProblem title: Script to fix windows update server 
Problem description: Hi there guys and girl, i need a script that i can push to a client to repair the windows update service, i have tried to enable ti again and no go from what i can tell it is corrupt 
Fix description: Be very careful with this, and please research the code before running. I got this from another website, and this worked well for me, however, it will erase all windows update history. :: Created by: Shawn Brink :: http://www.sevenforums.com :: Tutorial: http://www.sevenforums.com/tutorials/91738-windows-update-reset.html
DownloadProblem title: Download file from the web, then run it RMM
Problem description: I'm trying to run an EXE with args after downloading it from the web. I have a vbs script that does that, and it works on my local pc, but when I run it in RMM dashboard, it doesn't do anything. Scratch that, it downloads the file to the c:\program files\advanced monitoring agent\scripts\ directory, but when I call it to run, nothing happens. The "idlelogoff.exe file is freeware, and running it with the below args just makes the screen lock after 5 seconds of idle time. I set it to 5 seconds for testing. What am I doing wrong? Does it have something to do with running the exe from the scripts directory? script check was added, but tells me that it just ran successfully. Here's what I got: dim http_obj dim stream_obj dim shell_obj set http_obj = CreateObject("MSXML2.ServerXMLHTTP") set stream_obj = CreateObject("ADODB.Stream") set shell_obj = CreateObject("WScript.Shell") URL = "https://drive.google.com/uc?export=download&id=0B_OlTAhCPfuFZ05ENUFhLWM3OXM" 'Where to download the file from FILENAME = "idlelogoff.exe" 'Name to save the file (on the local system) RUNCMD = "idlelogoff.exe 5 lock" http_obj.open "GET", URL, False http_obj.send stream_obj.type = 1 stream_obj.open stream_obj.write http_obj.responseBody stream_obj.savetofile FILENAME, 2 shell_obj.run RUNCMD Here's the alternative script that does it via screensaver and batch script. It is still not working via RMM: @echo off call :quiet>nul 2>&1 goto :EOF :quiet :: Configure the screen saver. REG ADD "HKEY_CURRENT_USER\Control Panel\Desktop" /V SCRNSAVE.EXE /T REG_SZ /F /D "%SystemRoot%\System32\scrnsave.scr" REG ADD "HKEY_CURRENT_USER\Control Panel\Desktop" /V ScreenSaveActive /T REG_SZ /F /D 1 :: Set the time out to 900 seconds (15 minutes). REG ADD "HKEY_CURRENT_USER\Control Panel\Desktop" /V ScreenSaveTimeOut /T REG_SZ /F /D 900 :: Set the On resume, password protect box REG ADD "HKEY_CURRENT_USER\Control Panel\Desktop" /V ScreenSaverIsSecure /T REG_SZ /F /D 1 :: Make the changes effective immediately RUNDLL32.EXE USER32.DLL,UpdatePerUserSystemParameters ,1 ,True 
Fix description: '------------------------------------------------------------------------------ ' Script for downloading and running the downloaded file '------------------------------------------------------------------------------ strSaveTo = "C:\LocalInst\Download" strURL = "http://www.domain.com/downloads/File.exe" strExecute = "File.exe" '------------------------------------------------------------------------------ ' Setup variables used in script '------------------------------------------------------------------------------ strFile = strSaveTo & "\" & strExecute '------------------------------------------------------------------------------ ' Download File '------------------------------------------------------------------------------ DownloadPath strSaveTo WScript.Echo "Downloading: " & strExecute & " to: " & strSaveTo HTTPDownload strURL, strFile Set oCmd = CreateObject("Wscript.Shell") '------------------------------------------------------------------------------ ' Execute command '------------------------------------------------------------------------------ commandLine = strFile WScript.Echo "Executing: " & strExecute oCmd.Run commandLine, 0, True '------------------------------------------------------------------------------ ' subroutine check for download folder and create if required '------------------------------------------------------------------------------ Sub DownloadPath(DirPath) Dim aDirectories, sCreateDirectory, iDirectory Set FSO = CreateObject("Scripting.FileSystemObject") If FSO.FolderExists(DirPath) Then WScript.Echo "Download folder exists" Else aDirectories = Split(DirPath, "\") sCreateDirectory = aDirectories(0) For iDirectory = 1 To UBound(aDirectories) sCreateDirectory = sCreateDirectory & "\" & aDirectories(iDirectory) If Not FSO.FolderExists(sCreateDirectory) Then FSO.CreateFolder(sCreateDirectory) End If Next WScript.Echo "Download folder created" End If Set FSO = Nothing End Sub '------------------------------------------------------------------------------ ' subroutine to call for downloading file '------------------------------------------------------------------------------ Sub HTTPDownload(myURL, strFile) Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP") objXMLHTTP.open "GET", myURL, false objXMLHTTP.send() If objXMLHTTP.Status = 200 Then Set objADOStream = CreateObject("ADODB.Stream") objADOStream.Open objADOStream.Type = 1 'adTypeBinary objADOStream.Write objXMLHTTP.ResponseBody objADOStream.Position = 0 'Set the stream position to the start objADOStream.SaveToFile strFile objADOStream.Close Set objADOStream = Nothing End if Set objXMLHTTP = Nothing End Sub
DownloadProblem title: Advice on CMD file 
Problem description: I've created a simple script to copy the Outlook 2013 shortcut into every user's Startup folder for one of my clients. The script runs OK - I see the shortcut in Startup; however, the scheduled RMM task shows failure across the board, I assume because it's not returning what the Dashboard expected. The script is basically one line, as follows: C:\Windows\system32\robocopy.exe "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office 2013" "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup" "Outlook 2013.lnk" /z /v /LOG:"%USERPROFILE%\Documents\robocopy.log" What's the best way to have it return a successful completion code? Thanks, Des 
Fix description: You can set the exit code, success is 0 exit code
DownloadProblem title: Script to Empty Downloads Directory 
Problem description: I need to have a script for RMM that will run once a day. It needs to run on Windows 7/8/10 machines. It's fairly simple but scripting just isn't my thing, so I'm hoping one of you geniuses can help me out. Basically I want to clear out the Downloads folder each day. I want to delete whatever files, folders, or other junk that are there. For windows 7, the directory is something like %USERPROFILE%\Downloads. I've got a client that has a bad habit of staff scanning in documents they need to fax or email. Then they forget the files are in their downloads directory. Some of these files contain personally identifiable information; Drivers licenses, IDs, etc. Since they can't seem to remember to empty the folder themselves each day, I'd just like to automate the process. Any help is appreciated! 
Fix description: A quick start - all you now need to do is put in the username you want to target
DownloadProblem title: Validate MX record that match IP adress 
Problem description: We wanted a script to validate a MX record to see if their IP adress has been change. 
Fix description: Here the script to validate a MX record for a domain name.
DownloadProblem title: Blocked Website - BLACK LIST 
Problem description: I'm looking for a list of blocked sites or "key words" to filter out on my customers Router. In addition - RMM's web protection also asked for a list of keywords. So if you have a list - any help would be great. R/ Vincent. 
Fix description: Here is a list that I've used before, it should cover a variety of nsfw (Not Safe For Work) words. Edit - Didn't think it would spit all of that out on the post, heh. Here's a link to download the txt file.
DownloadProblem title: Collect process and memory information on a particular process 
Problem description: Is there a script that will let me collect process and memory details for a specific process? 
Fix description: This short PowerShell script will get you the basic details on process and memory used for a particular process entered.
DownloadProblem title: Currently Logged On User(s) 
Problem description: Need a script that will display currently logged in user(s) for a system 
Fix description: Displays Currently Logged in User(s) within a PC/Windows Environment *Increased timeout for script run-time may be appropriate For Multi-User System(s) Example Output: Session 1 -------------------- Logon ID: 6595297 LogonType: 2 User: User Domain: Domain FullName: Username
DownloadProblem title: Currently Logged On User(s) 
Problem description: Need a script that will display currently logged in user(s) for a system 
Fix description: WMIC can do the trick. It a CMD or batch file command.

In addition to the Community Scripts, review the N-able Automation Cookbooks to leverage automation policies, custom monitoring, and scripts to gain more efficiency in your business.