N-able RMM: Community Scripts - Page Fourteen

Last Modified

Tue Jan 29 14:09 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: VBscript or Batch to check settings for a Printer 
Problem description: I'm looking for a scrpit to get the information of the printers - Papersize - Alignment - Resolution - Color / Black and White The script should be VBscript or Batch Thanks for help..... 
Fix description: Hi, Good example here. http://windowsitpro.com/scripting/create-site-specific-printer-mappings-mobile-users
DownloadProblem title: Validate IP public VS domain name 
Problem description: We wanted a script to validate an IP public vs domain name to be sure there is no change. 
Fix description: Here a script to validate ip vs domain name
DownloadProblem title: Simple download and install silent EXE 
Problem description: I need to download a file from http://www.domainname.com/file.exe and then run a silent installation of it. I know this should be simple but I really don't do scripting. Can anyone help? The executable does run silently be default. 
Fix description: This one has been around for quite some time. It was originally used to deploy RC agents before that capability was in the dashboard. It can be used for the same as a Site Managed Automated Task. As an RC deployment, it's OK if it runs more than once as it will simply be an "upgrade in place" install. For deploying other packages (such as NINITE FREE that I've used), you'll likely want to set an end date by having the Automated Task run only for a period of time.
DownloadProblem title: System Tray Application: Option to Show Computer and User Name 
Problem description: Is there anyway to use the System Tray Application to show the Computer and/or User name? 
Fix description: This should do it. 1. Local File 2. Label= show username and computername 3. path=c:\windows\system32\msg.exe 4. arguments=* Hi my username is %username% and I am on %computername%
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: . The scripts will: Crypto Prevent: 1) Block Executable file types from executing out of the %appdata% Directory. Given that this directory and subdirectories are intended for data and not applications, this is really only going to block nefarious action and sloppy programmers who like to run updates from temp directories that they shouldn €™t. These registry entries are similar to those made by the GPO Policy you might otherwise use. 2) There is a white list for applications built into the script, in case you find that this is blocking the update or program that you want, you can add additional programs to the section called white list. a. If you modify the script, the certification will be invalid. Which is only a big deal if you want to run independently and have PowerShell set to something other than unrestricted. So if you modify the script on your own, delete the cert section too €”or resign it if you have purchased a certificate. 3) I have by default whitelisted calc.exe; you can test the scripts effectiveness by copying calc.exe and notepad.exe to the %appdata%. When applied calc should run and notepad shouldn €™t. 4) The script is written with exit codes that display their status in the LN Dashboard.
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 Uninstall: 1) This script will remove all the entries made by the crypto prevent script. This includes the switches that turn on both the Crypto Prevent and the Block Double Extentions. So running this script will de-active both scripts and if you intend to use BlockDoubleExtensions you will need to re-run it.
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: The scripts will: Crypto Prevent: 1) Block Executable file types from executing out of the %appdata% Directory. Given that this directory and subdirectories are intended for data and not applications, this is really only going to block nefarious action and sloppy programmers who like to run updates from temp directories that they shouldn €™t. These registry entries are similar to those made by the GPO Policy you might otherwise use. 2) There is a white list for applications built into the script, in case you find that this is blocking the update or program that you want, you can add additional programs to the section called white list. 3) I have by default whitelisted calc.exe; you can test the scripts effectiveness by copying calc.exe and notepad.exe to the %appdata%. When applied calc should run and notepad shouldn €™t. 4) The script is written with exit codes that display their status in the LN Dashboard.
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: The scripts will: Crypto Prevent: 1) Block Executable file types from executing out of the %appdata% Directory. Given that this directory and subdirectories are intended for data and not applications, this is really only going to block nefarious action and sloppy programmers who like to run updates from temp directories that they shouldn €™t. These registry entries are similar to those made by the GPO Policy you might otherwise use. 2) There is a white list for applications built into the script, in case you find that this is blocking the update or program that you want, you can add additional programs to the section called white list. 3) I have by default whitelisted calc.exe; you can test the scripts effectiveness by copying calc.exe and notepad.exe to the %appdata%. When applied calc should run and notepad shouldn €™t. 4) The script is written with exit codes that display their status in the LN Dashboard.
DownloadProblem title: Set Local Administrator account password 
Problem description: Hey there, when we take over a company and roll out RMM, we also want the ability to change the local Administrator password on the PCs so that everyone is standardized. If possible, a list of all local users on PCs would also help. Any help on this would be appreciated. 
Fix description: This will reset the local administrator password.
DownloadProblem title: Create user accounts 
Problem description: We are using RMM and we are looking to use a batch file to create a new local admin user and demote the current admin user to a standard user. I have wrote the script pasted below and it works creating a standard user. Can anyone help fix it and add the other options to it? @echo off net user *USERNAME* PASSWORD /add /comment:"COMMENT" /passwordchg:NO wmic useraccount where "name='USERNAME' set passwordexpires=FALSE net localgroup "Administrators" USERNAME/add exit 
Fix description: Can't help you on your batch. Enclosed is a powershell version that I believe will work for you. Hope that helps.
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: Block Double Extensions: 1) This script will block the execution of files with double extensions eg. (*.pdf.exe, *.doc.exe) regardless of where on the computer they are executed. Personally I cannot think of any legitimate reason why you would ever need to execute such a file; and I feel Microsoft should block them out of the gate. But they don €™t. 2) There is no whitelist for this section, inasmuch as I didn €™t see the need. 3) This script can be tested by renaming calc.exe to calc.pdf.exe. It shouldn €™t execute no matter what directory it is in. 4) The script is written with exit codes that display their status in the LN Dashboard.
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: Finally here is a script that will uninstall/clear the registry entries for the two above scripts if you wish to roll it back.
DownloadProblem title: Script to download and install .exe file 
Problem description: Is there a way to download and install an executable from a website? 
Fix description: Very basic, but you can build more around it, put it in a loop if you create an array for multiple files.
DownloadProblem title: Disable Windows Updates 
Problem description: PowerShell Script to disable Widows Updates. 
Fix description: Sets windows automatic update to disabled. Can be altered to enable at three different levels. Tested on windows 7. Designed to output windows update status to the ln dashboard.
DownloadProblem title: Update Time from External Time Server 
Problem description: This script is intended to update the time on a local server/domain controller from known good time servers on the internet. 
Fix description: Synchronizes Server Time with external known good time servers.
DownloadProblem title: Update Time from External Time Server 
Problem description: This script is intended to update the time on a local server/domain controller from known good time servers on the internet. 
Fix description: Synchronizes Time on a workstation or member server class machine. Looks up time server in the domain hierarchy and synchronizes. Therefore it is for workstations that are members of a domain, not workgroup.
DownloadProblem title: Need a Script Check to search for File Name 
Problem description: I'd like a script that runs the following command: **dir C:\sample.* /s** When there is no file found the command output is this (This would be a "Passing Check) C:\Windows\system32>dir C:\Sample.* /s **Volume in drive C has no label. Volume Serial Number is 2C37-4156 File Not Found** When there is a file found the output is similar to below (This would be a"Failed Check") A search for all local drive would be preferred.. Searching say C & E. Excluding network drives **C:\Windows\system32>dir C:\Sample.* /s Volume in drive C has no label. Volume Serial Number is 2C37-4156 Directory of C:\Test 07/14/2015 09:21 AM 0 Sample.txt 1 File(s) 0 bytes Total Files Listed: 1 File(s) 0 bytes 0 Dir(s) 170,193,571,840 bytes free** If files are found, who's the owner of the file. In the dashboard, I'd like a passing check to say No Files Found If the check fails, list the path(s) and owner(s) of each file. Limiting the number of file paths/owners is OK, if a certain number of results or the file of the output has limitation in the dashboard like First 5 files. Thanks in Advanced for anyone who helps!!! 
Fix description: This PowerShell script Checks for the existence of a file name within a specific folder (and all subfolders). If a file or files matching the name declared in the $FName variable exists, the check will pass. If not the Check will fail.
DownloadProblem title: Detect Windows 2003 Server. 
Problem description: I would like a script to detect windows 2003 Server. Preferably it would report back to the dashboard with its status. 
Fix description: I want to say I got the bulk of this script from "the scripting guy"; a great learning resource available at http://blogs.technet.com/b/heyscriptingguy/. But I did modify it for testing and to kick out the codes for Max RMM. This script detects your windows server version and fails the check if it is any form of windows 2003. Given that PowerShell wasn't installed by default on 2003 servers, we are using vbscript on this one.
DownloadProblem title: Looking for a Script to determine Computers Hardware 
Problem description: I've found many scripts that find the processor, or the amount of RAM a computer has, but I'm looking for a script that could find all the hardware information. It could either pull the data from the "Hardware" tab of RMMmax, or a script that will find the information, and put it into a text file. 
Fix description: Older Script of mine. Uses WMI & VBScript to collect hardware information and post it to a local server/share. You will need to create the share on your central server (and have rights set) and Edit the line below step 4 to direct the script to the path you created. Not sure if it does what you want but it should at least get you started.
DownloadProblem title: I want to join a computer to the domain 
Problem description: Is there a script that will let me join a computer to our domain? 
Fix description: This PowerShell script will join a computer to a domain.
DownloadProblem title: Send message to all users 
Problem description: Any ideas on how to show a pop up notification on end users screens via Automated Tasks (RMM RMM). something with company logo and we can modify dates or contents if possible? Thanks.. 
Fix description: Script calls and maximizes Internet Explorer, set to a page of your choice.
DownloadProblem title: Show log file contents in dashboard RMM RMM 
Problem description: Hello, I have an automated task (.bat) that writes a log file in the C:\Program Files (x86)\Advanced Monitoring Agent GP\scripts\output.log I would like to show the log file contents in the Automated task output section. Any ideas? Thanks in advance. 
Fix description: Powershell Script reads from a text file and posts to RMM Dashboard. Exit 0 is the code for script passed. Exit 1001 would Post with a script fail (red X). If your log file content is predictable, you could Run an If Then Loop with Conditions, that would (for example) read the word "fail" from your log file and post the contents of the log file with an exit code of 1001/Red X; or conversely read "pass" from your log file and post with Exit Code 0/Green Check. Hope that helps.
DownloadProblem title: Check if exe file is running 
Problem description: Hi, we have a backup solution and we would like to make sure that the .exe file is Always running. For example if it would crash, or if the user would exit the application, then it should be restarted. It would be best that the script also restarts this file if it's not running. The check can be once per hour. Is there a script for this? It's for use with Max remote management. It's about this file: C:\Program Files (x86)\Fastfix Online Backup\OpenAccess.exe 
Fix description: Powershell to test if an executable is running. Output's a failed Check (Red X) if not; and a Success (Green Check) if it is.
DownloadProblem title: How do I run a VBS script in RMM? 
Problem description: Option Explicit Dim objShell, objDesktop, objLink Dim strAppPath, strWorkDir, strIconPath Const OverwriteExisting = TRUE Dim WshShell:Set WshShell = WScript.CreateObject("WScript.Shell") Dim filesys:Set filesys=CreateObject("Scripting.FileSystemObject") strWorkDir ="%username%\Desktop" strAppPath = "https://this_is_my_link.aspx" strIconPath = "c:\Windows\System32\shell32.dll, 17" Set objShell = CreateObject("WScript.Shell") objDesktop = objShell.SpecialFolders("Desktop") Set objLink = objShell.CreateShortcut(objDesktop & "\PCMS Team Site.lnk") objLink.Description = "PCMS Team Site" objLink.HotKey = "CTRL+SHIFT+X" objLink.IconLocation = strIconPath objLink.TargetPath = strAppPath objLink.WindowStyle = 3 objLink.WorkingDirectory = strWorkDir objLink.Save WScript.Quit This is my script. It's a simple VBS script to install an internet shortcut to the company's sharepoint site. When it's on the user's desktop, I can double click on it and it runs and puts the icon on the desktop without asking for admin privileges or anything of that sort. So I uploaded the script to RMM RMM and have tried it as a scheduled automated task and as a manually started automated task. RMM says that it has ran but there is no icon on the users desktop. I've talked to RMM and tried changing to elevated privileges for the agent. There are also no command line parameters, which I don't know if there should be or not to get it to run properly with RMM. Can anyone tell me what I'm doing wrong? RMM basically said good luck since it's a 3rd party script even though it's a script that runs and does what it needs to when you run it outside of RMM. 
Fix description: What you describe is a common response from LN. They simple refuse to help with scripting issues. I wish they would dedicate just one guy to a best effort tact of support. But they don't. That said. I want to say I had issues with VBScripts that shelled out. I've largely migrated to Powershell. Tends to be smaller and easier to read as well. Below is a quick and dirty version of your script in PowerShell.... Hope this helps.
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: Undo Block Double Extension and Crypto Prevent. This script is a powershell script that removes the registry entries made by the Block Double Extension and Crypto Prevent Scripts. This one script will remove either or both sets of registry entries.
DownloadProblem title: Powershell Script returns Error but Dashboard is showing success 
Problem description: I have a user who continues to have an employee create multiple quickbook files. I want a 24x7 check to alert us when this occurs, as soon as possible. The script runs and returns properly via powershell, but continues to show success in the monitor. Is there something specific I need to add to return the error so it is reflected properly in the dashboard. (Note very much a newbie at this, so pointing out I am being a knucklehead is fine) Script: if(((Get-ChildItem -Recurse -path c:\*.* -Force -Filter "*.qbw").Count) -gt 1){ Write-Host "Too Many Quickbook Databases" exit 1001 } else { Write-Host "Quickbook Database Success" exit 0 } 
Fix description: I think your recursion was failing either due to syntax or rights to certain directories. I changed the syntax of the path and told it to continue on error without complaining. I also declared the search as variable. This helps because after testing the script you can just call the variable and look at the results. In this case you would do so from the powershell promt by typing $QBData and it should list all of the *.qbw files for you. By doing this you can determine if the script failed because your search failed to find the *.qbw or if you compare function failed to output the correct result. Hope that helps.
DownloadProblem title: Script for disabling windows update message and the notification icon in the system tray 
Problem description: I am trying to figure out how to use my RMM to disable the windows update messages that come up on my clients computers servers. Is there a script you are aware of that I can use with RMM to disable the messages and the icon from showing up in the system tray? Any help or guidance is highly appreciated. Thanks, Cory 
Fix description: This Powershell Script disables the "Balloon Tips" popups from occurring in the windows action center. It requires a reboot to take affect. It is also specific to the user logged in at the time the script runs. That is to say, if it runs as user "A" after a reboot--no more balloon popups on firewall/av/patching. But if user "B" logs into the same machine, they will get popups until the script runs for them and they reboot. This script does not disable the action center from tracking these items. If you actively open the action center you will still see results. This script only stops the popups.
DownloadProblem title: Script for Network Speed 
Problem description: Is there a fixit script to show what network speed a NIC is running at e.g. 10/100/1000. not interested in traffic I had a quick search but I couldn't see anything? 
Fix description: This is my first attempt a powershell script for Maxfocus, this will display the link speed of the Active NICS.
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: Block Double Extension. This script is a PowerShell Script that is intended to block files with Double Extensions from executing regardless of what directory they are in. EG. file.doc.exe, and joke.pdf.exe or joke.pdf.com would all be blocked from executing by administrative policy. This file adds the registry entries that might otherwise be added by group policy to affect the same result. Tested on Windows 7.x 32 & 64 Bit; and Windows 8.x.

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.