N-able RMM: Community Scripts - Page Fifteen

Last Modified

Tue Jan 29 14:12 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: Searching Workstation For Shortcuts 
Problem description: I would like to run a script from RMM RMM that outputs a list of all shortcuts held on a users workstation. We are going through a migration to a new server and I would like to see the shortcuts that we need to change. Thanks 
Fix description: Powershell Script lists all shortcuts on a workstation. Edit the variable $Path with the name of your server to get all shortcuts pointing to that server (in the sample the server name is Winchester). To get all shortcuts on a workstation, Place a # (rem) in front of lines 4 and 5; and remove the # from line 6
DownloadProblem title: Automatically Add In A Second Set Of Teamviewer Credentials 
Problem description: Need the ability to automatically add in a second set of teamviewer credentials through RMM RM. 
Fix description: Has partial support for Teamviewer version 9. Still not complete yet. Now that Teamviewer 9 has been released the way the passwords are encrypted have changed. No longer can the encrypted registry keys be copied from one computer and installed in another. The encryption seems to be more complex and doesn't allow this. Perhaps its encrypted with the computer name or something I don't know.... I am reaching out to RMM atm as my method is essentially the same as the way the RMM RM Agent integrates with installed version of Teamviewer so it can be done. If anyone else has ideas on how to get this working they are all welcome. This script has been viewed 1000 odd times so appears to be popular. Please help to keep this going. Thanks
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 changes the settings of Windows update services. Script Can be run via RMM.
DownloadProblem title: SMART checks without smartmon... 
Problem description: Is there a script to monitor SMART hard drive values without downloading and installing the smartmon tools? 
Fix description: **VBScript to Report Drive Manufacturer Information for common Spinning Drives, then Reports S.M.A.R.T. Information related to the Drive** *Confirmed working in a 2003 (x86), Windows 7 (x64), and Server 2008 R2 platform* This is a Report Only Script. If a Failure for the check is desired, please refer to the RMM help files for Script Writing Guidelines NOTES: *There are no command line options available for this script* *If a Virtual Environment, script notifies and returns no S.M.A.R.T. information* *If the Drive detected is not a Drive documented at the top of the script, no S.M.A.R.T. information will be reported*
DownloadProblem title: RMM Ninite deployment 
Problem description: Looking to get a script that will deploy ninite pro to machines from my dropbox and then run it silently updating everything but teamviewer. I have a powershell script but its unsigned so it wont work on most machines without having to go into each machine manually and setting it up. Here is the script below for reference. #Define your parameters $ninite_url = "" $ninite_path = "$Env:SystemDrive\ETS\Ninite" $ninite_switches = "/silent $Env:TEMP\niniteupdate.log /updateonly /exclude TeamViewer /cachepath $ninite_path\NiniteDownloads" #Create Ninite download path if it doesn't already exist if ((Test-Path $ninite_path) -eq $false) {New-Item -type directory -Path $ninite_path | out-null} #Download Ninite if it's not already there if ((Test-Path "$ninite_path\Ninite.exe") -eq $false) { $ninite_dload_file = "$ninite_path\Ninite.exe" $ninite_dload = new-object System.Net.WebClient $ninite_dload.DownloadFile($ninite_url,$ninite_dload_file) } #Run Ninite and wait for it to exit $ninite_launch = new-object Diagnostics.ProcessStartInfo $ninite_launch.FileName = "$ninite_path\Ninite.exe" $ninite_launch.Arguments = $ninite_switches $ninite_process = [Diagnostics.Process]::Start($ninite_launch) $ninite_process.WaitForExit() #Report status Get-Content $Env:TEMP\niniteupdate.log 
Fix description: Here is just a script for downloading an arbitrary file to an arbitrary folder. This helped me get niniteone into a folder I could execute the commands with using a batch file. Maybe this will help with the corruption you mentioned.
DownloadProblem title: SmartMonTools script to install and check disk and report back to RMM Console 
Problem description: Hi I have read that smartmontools is a much better disk checking tool that the built in RMM one. On their forums, someone scripted a script to install and check the status and report back to the console Could someone please see if this could be done? Ideally, the script would check if smartmontools is installed. If not, install silently, and then check the disk, and if a failure is detected, alert via RMM dashboard as normal Thankyou 
Fix description: This script checks if smartmontools is installed, if not then installed silently, then run smartctl. Tested on Windows 7 workstation.
DownloadProblem title: Not availabe in a while... 
Problem description: I need something that can let me know when a computer or server, has not been available in a while. If it has been turned off or not connected to Internet at a certain time, it may happen that Client no longer use their equipment? 
Fix description: This VBscript checks if computer is available. It return state of computer: Turn On / Turn Off. Internet Connection at a certain time : Enable / Disable . Script input parameter is local or remote computer name.
DownloadProblem title: Event log checker 
Problem description: Hi All, I am using RMM's server monitoring dashboard and agent. I need to monitor the replication of a server 2012 HyperV. I know the error code that i need to look for - 32315, and i know where to look - in event logs Applications and service logs > Microsoft > Windows > Hyper-V-VMMS > Admin, but the RMM agent can only check the main local event logs i.e. application, security, system etc. Does anyone know what i can do for this? 
Fix description: Powershell script check the local event logs and reports errors. Input Parameter : Logname one of these [Application; HardwareEvents; Internet Explorer;...;System ...]. By default (if there aren't input parameter) script return Application event logs errors. Script passed test on WIndwos 7,8 Workstationas and 2008,2012 Servers via RMM.
DownloadProblem title: Display Vipre license expiration date 
Problem description: I would like to display Threat Track's Vipre License expiration date via a script so that I know when my customer's Vipre is running out. Does someone know if this is possible? 
Fix description: I changed this script and now it returns output in this nn/nn/nnnn format. It can be run via RMM.
DownloadProblem title: Browser redirects Google Searches 
Problem description: I think I have a browser redirect infection. When I'm on google and I click a link it takes me to something else. 
Fix description: This scrip reset Internet Explorer personal settings. Tested on windows 7.
DownloadProblem title: Finding the free space on my local and remote hard disks? 
Problem description: It seems to be an issue where i have a tough time quickly finding the free space available on my network drives or local drives. I would think there would be a easy way to script this. Can anyone help? 
Fix description: Here is a version that should run through the MAX RemoteManagement console. It is a PowerShell script that lists all the free disk space on the available drives.
DownloadProblem title: Hard Drive Temperature? 
Problem description: Is there a script to check hard drive temperature? 
Fix description: **VBScript to Report Drive Manufacturer Information for common Spinning Drives, then Reports Hard Drive Assembly Temperature Information** *Confirmed working in a 2003 (x86), Windows 7 (x64), and Server 2008 R2 platform* There are no command line options available for this script *If a Virtual Environment, script notifies and returns no hardware information*
DownloadProblem title: Script to install BGInfo through RMM 
Problem description: I want a script that I can run through RMM that copies BGInfo from an FTP server, runs it, and puts a shortcut in the startup folder. This script works fine on my Windows 7 x64 computer as well as a Windows XP computer I tested it on, but it doesn't work when I try to run it through RMM. (I removed the FTP information for security.) This script will mainly be run on thin clients that are locked down pretty tight, so that is why I am putting it in the folder that I am. Please help! '####### VARIABLES ###########################################' Dim strAMAFolder, SystemDrive, strFTPAMAFolder, strDesktop, params, config Set objShell = WScript.CreateObject("WScript.Shell") Set objFSO = CreateObject("Scripting.FileSystemObject") SystemDrive = objShell.ExpandEnvironmentStrings("%SYSTEMDRIVE%") '######### Search for ADM folder and make bginfo subfolder ##########################' If objFSO.FolderExists(SystemDrive & "\Program Files (x86)\Advanced Monitoring Agent") Then If NOT objFSO.FolderExists(SystemDrive & "\Program Files (x86)\Advanced Monitoring Agent\bginfo") Then objFSO.CreateFolder (SystemDrive & "\Program Files (x86)\Advanced Monitoring Agent\bginfo") End If strAMAFolder = SystemDrive & "\Program Files (x86)\Advanced Monitoring Agent\bginfo" strFTPAMAFolder = chr(34) & SystemDrive & "\Program Files (x86)\Advanced Monitoring Agent\bginfo" & chr(34) ElseIf objFSO.FolderExists(SystemDrive & "\Program Files\Advanced Monitoring Agent") Then If NOT objFSO.FolderExists(SystemDrive & "\Program Files\Advanced Monitoring Agent\bginfo") Then objFSO.CreateFolder (SystemDrive & "\Program Files\Advanced Monitoring Agent\bginfo") End If strAMAFolder = SystemDrive & "\Program Files\Advanced Monitoring Agent\bginfo" strFTPAMAFolder = chr(34) & SystemDrive & "\Program Files\Advanced Monitoring Agent\bginfo" & chr(34) End If '######### Open port 21 ##################################################' Set objFirewall = CreateObject("HNetCfg.FwMgr") Set objPolicy = objFirewall.LocalPolicy.CurrentProfile Set colPorts = objPolicy.GloballyOpenPorts fwFlag = 0 For Each objPort in colPorts If (objPort.Port = 21) Then If (objPort.Enabled = True) Then objPort.Enabled = False fwFlag = 1 End If End IF Next '######## FTP script #######################################################' strFTPServerName = ' strLoginID = ' strPassword = ' strFTPServerFolder = ' strFilePut = "config.bgi" strFile2Put = "bginfo.exe" strFile3Put = "bgip.vbs" strFTPScriptFileName = strAMAFolder & "\FTPConnectionInfo.txt" Set objMyFile = objFSO.CreateTextFile(strFTPScriptFileName, True) objMyFile.WriteLine ("open " & strFTPServerName) objMyFile.WriteLine (strLoginID) objMyFile.WriteLine (strPassword) objMyFile.WriteLine ("cd " & strFTPServerFolder) objMyFile.WriteLine ("ascii") objMyFile.WriteLine ("lcd " & strFTPAMAFolder) objMyFile.WriteLine ("get " & strFilePut) objMyFile.WriteLine ("get " & strFile2Put) objMyFile.WriteLine ("get " & strFile3Put) objMyFile.WriteLine ("bye") objMyFile.Close objShell.Run "ftp -v -s:" & chr(34) & strFTPScriptFileName, 0, True '### 0 keeps CMD hidden '########### SHORTCUT IN STARTUP FOLDER ################################' strStartup = objShell.SpecialFolders("AllUsersStartmenu") set oShellLink = objShell.CreateShortcut(strStartup & "\programs\startup\bginfo.lnk") oShellLink.TargetPath = strAMAFolder & "\bginfo.exe" oShellLink.WindowStyle = 1 oShellLink.Arguments = chr(34) & strAMAFolder & "\config.bgi" & chr(34) & " " & chr(34) & "/timer:0 /NOLICPROMPT" oShellLink.IconLocation = strAMAFolder & "\bginfo.exe" oShellLink.Description = "BGInfo" oShellLink.WorkingDirectory = strAMAFolder oShellLink.Save '######### RUN IT ########################################################' params = "/timer:0 /nolicprompt" config = strAMAFolder & "\config.bgi" cmd = chr(34) & strAMAFolder & "\bginfo.exe" & chr(34) & " " & chr(34) & config & chr(34) & " " & chr(34) & params & chr(34) objShell.Run (cmd) '######## CLEANUP #####################################################' 'delete ftp file objFSO.DeleteFile strAMAFolder & "\FTPConnectionInfo.txt", True 'close port 21 if it was closed If (fwflag = 1) Then For Each objPort in colPorts If (objPort.Port = 21) Then objPort.Enabled = True End If Next End If 
Fix description: Vbscritp to Run Bginfo on Windows Workstetion(7,XP) and Server(2008). This script can run in MAX RemoteManagement.
DownloadProblem title: Deleting files from remote PC 
Problem description: I am looking fora script that I can run on my workstation that will prompt me for the remote PC name and also for the path and files to delete. So for example I run the script and put in the remote PC name "Computer" and then the path documents and settings\userid\local settings\temp\*.* and it deletes all the files in the temp folder. Looking for something I can use and not have to try and edit a script with each use. A results txt file stating how many files were deleted and disk space recovered would be nice as well Thanks 
Fix description: **VBScript that parses User defined folder, and subfolders, deleting files older than Days specified by User** *This script requires Two Command Line Options* *First Command Line: Directory to Parse for file delete *Second Command Line: Older than Day Variable for delete *Confirmed working in a 2003 (x86), Windows 7 (x64), and Server 2008 R2 platform* ***Example Usage:*** "C:\Test" 5 *This deletes files in the Folder: C:\Test (and its subfolders) that are older than 5 days in age* NOTE: This script is intended to be used with any Agent in the RMM Dashboard (therefore, Remote PC variables are not needed)

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.