PowerShell
Share your PowerShell scripts
112 topics in this forum
-
I don't think its possible to have more than one NINJARMM Agent installed, however if there are this script will likely fail, but for a clean ninja install will locate the correct uninstall path and uninstall the ninja agent. $UninstallString = (Get-ItemProperty HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\NinjaRMMAgent*).UninstallString Start-Process -FilePath "$UninstallString" -ArgumentList "--mode unattended"
- 5 replies
- 56.3k views
-
I made a install script for Adobe Reader DC to do a Silent install. UPDATED VERSION 2 With auto detect if Invoke-WebRequest exists Improvements are welcome! Change the version if needed in the Source URL: http://ardownload.adobe.com/pub/adobe/reader/win/AcrobatDC/1502320053/AcroRdrDC1502320053_en_US.exe # Silent install Adobe Reader DC # https://get.adobe.com/nl/reader/enterprise/ # Path for the workdir $workdir = "c:\installer\" # Check if work directory exists if not create it If (Test-Path -Path $workdir -PathType Container) { Write-Host "$workdir already exists" -ForegroundColor Red} ELSE { New-Item -Path $workdir -ItemType directory …
- 5 replies
- 41.1k views
- 1 follower
-
I made a install script for CCleaner to do a Silent install and clean if needed. Improvements are welcome! When a new version of FireFox comes out, just change the firefox version or url to the new value. # Silent Install Firefox # Download URL: https://www.mozilla.org/en-US/firefox/all/ # Path for the workdir $workdir = "c:\installer\" # Check if work directory exists if not create it If (Test-Path -Path $workdir -PathType Container) { Write-Host "$workdir already exists" -ForegroundColor Red} ELSE { New-Item -Path $workdir -ItemType directory } # Download the installer $source = "https://download.mozilla.org/?product=firefox-51.0.1-SSL&os=win64&…
-
- 1 reply
- 38.3k views
-
-
I made a install script for 7-Zip to do a Silent install and clean if needed. Improvements are welcome! When a new version of 7-Zip comes out, just change the 7z1604-x64.msi to the new value. # Silent Install 7-Zip # http://www.7-zip.org/download.html # Path for the workdir $workdir = "c:\installer\" # Check if work directory exists if not create it If (Test-Path -Path $workdir -PathType Container) { Write-Host "$workdir already exists" -ForegroundColor Red} ELSE { New-Item -Path $workdir -ItemType directory } # Download the installer $source = "http://www.7-zip.org/a/7z1604-x64.msi" $destination = "$workdir\7-Zip.msi" # Check if Invoke-Webrequest ex…
- 3 replies
- 30.5k views
-
This script will download the small online installer, generate the silent install cfg file and run the installer. The timer near the end is set for 3 minutes as it has to download the full installer first and Java takes a while to install anyway. If you want to get the latest version just go to https://java.com/en/download/win10.jsp and copy the link from the button that says "Agree and start free download". Then past this link into the $source variable. I find that this installer works on both windows 7 and windows 10. # Download and silent install Java Runtime Environement # working directory path $workd = "c:\temp" # Check if work directory …
-
- 0 replies
- 26.5k views
-
-
I made a install script for Winrar to do a Silent install. UPDATED VERSION 2 With auto detect if Invoke-WebRequest exists Improvements are welcome! When a new version of Winrar comes out, just change the winrar-x64-540.exe to the new value. # Silent Install Winrar # http://www.winrar.com # Path for the workdir $workdir = "c:\installer\" # Check if work directory exists if not create it If (Test-Path -Path $workdir -PathType Container) { Write-Host "$workdir already exists" -ForegroundColor Red} ELSE { New-Item -Path $workdir -ItemType directory } # Download the installer $source = "http://rarlab.com/rar/winrar-x64-540.exe" $destination …
-
- 10 replies
- 23.5k views
- 1 follower
-
-
I made a install script for Google Chrome to do a Silent install. UPDATED VERSION 2 With auto detect if Invoke-WebRequest exists Improvements are welcome! When a new version of Google Chrome comes out follow this url: https://enterprise.google.com/chrome/chrome-browser/ Next find the download button -> Right click on the download button and choose Copy Download Location paste it in the script and it will download the latest version. # Silent Install Chrome # https://enterprise.google.com/chrome/chrome-browser/ # Path for the workdir $workdir = "c:\installer\" # Check if work directory exists if not create it If (Test-Path -Path $wor…
-
- 1 reply
- 23.3k views
-
-
This script will check to see if a VPN connection with the given name exists. If it does exist, it updates the VPN connection. If it does not exist, it creates a VPN connection with the given values. Note: I believe Pulseway runs PowerShell scripts under the Local System account by default (unless you have defined PowerShell User Impersonation in the Pulseway Manager, I think). In order to expose the VPN to users, this script runs against the Global Phone Book (-AllUserConnection switch). Therefore, this script does not check for the existence of VPN profiles stored in individual user Phone Books. (If an existing user VPN profile exists, this script will create a new…
-
- 4 replies
- 21.4k views
-
-
I made a install script for MalwareBytes to do a Silent install. UPDATED VERSION 2 With auto detect if Invoke-WebRequest exists Improvements are welcome! Change the version if needed in the Source URL: https://data-cdn.mbamupdates.com/web/mb3-setup-consumer-3.0.6.1469.exe # Silent Install MalwareBytes # Download URL: https://www.malwarebytes.com/mwb-download/thankyou/ # Path for the workdir $workdir = "c:\installer\" # Check if work directory exists if not create it If (Test-Path -Path $workdir -PathType Container) { Write-Host "$workdir already exists" -ForegroundColor Red} ELSE { New-Item -Path $workdir -ItemType directory …
- 4 replies
- 18k views
- 1 follower
-
I made a install script for Skype to do a Silent install. UPDATED VERSION 2 With auto detect if Invoke-WebRequest exists Improvements are welcome! # Silent Install Skype # https://www.skype.com/en/download-skype/skype-for-windows/ # Path for the workdir $workdir = "c:\installer\" # Check if work directory exists if not create it If (Test-Path -Path $workdir -PathType Container) { Write-Host "$workdir already exists" -ForegroundColor Red} ELSE { New-Item -Path $workdir -ItemType directory } # Download the installer $source = "http://www.skype.com/go/getskype-full" $destination = "$workdir\skype.exe" Invoke-WebRequest $source -OutFile $destination # Sta…
-
- 1 reply
- 15.9k views
-
-
Here is a script to remove Dropbox with PowerShell. Be aware that your Dropbox could also be removed. #Script to remove Dropbox #This May remove your dropbox folder contents form your computer #By: Enrique Sanchez #Dropbox Paths $Dir = "C:\Users\" $drop = "\Appdata\Roaming\Dropbox" $dropM = "\Appdata\Roaming\DropboxMaster" $DropD = "\Dropbox" $StartM = "\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Dropbox" $Short = "\Desktop\Dropbox.lnk" #Kill related processes taskkill /im dropbox.exe /f taskkill /im explorer.exe /f Get-ChildItem -name c:\users | foreach ($_) { Remove-Item -recurse -force $Dir$_$dropD -ErrorAction SilentlyContinue Remove-…
-
- 1 reply
- 14.4k views
-
-
I use this when I am onboarding a new client. Computers have been there and most people don't know/have their own admin password
- 13 replies
- 14.3k views
- 1 follower
-
Are any of you using Pulseway to install applications not currently installed by third party management? I have applications that I need to install on my network that I would like to use Pulseway Automation for. I'm currently using PDQ Deploy but would like to get rid of it. Any suggestions on how to use Pulseway in this way? I attempted to work with support because I am getting a 1619 error... I tried everything I could find online to resolve this issue, but continued to get this error... I reached out to Pulseway Support, but they were less than helpful. Any thoughts?
-
- 10 replies
- 13.3k views
- 1 follower
-
-
I'm trying to start an application that will start via PS script. I create pulseway script using Windows Powershell to run this command but I can't get the application to start. $env:Path += "C:\Program Files (x86)\NetDocuments\ndOffice\ndOffice.exe" & "C:\Program Files (x86)\NetDocuments\ndOffice\ndOffice.exe" However if I go to the remote computer, open Windows Powershell and run these commands the application opens as desired. All my other scripts I have work on this computer, so I'm executing it correctly. Please advise. Greg
- 6 replies
- 12.2k views
-
Hey Fellow PW users, I've created a script which allows the system to change its name to %computername%-Current logged on username, which makes life a little easier when trying to remote to their computers on the remote control tool/Webapp. To get started, create your script in the script editor, in my example, Name: Update Computer Name with Logged on Username Windows/Powershell Code: $pwqusers = quser | Select-Object -skip 1 $pwquserfmt = $pwqusers.substring(1,22).Trim() -join "," Set-ItemProperty -Path "HKLM:\Software\MMSOFT Design\PC Monitor\" -Name ComputerName -Value "$env:computername-$pwquserfmt" Click Save. Next we create at new t…
- 9 replies
- 11.9k views
-
I made a install script for CCleaner to do a Silent install and clean if needed. UPDATED VERSION 3 With auto detect if Invoke-WebRequest exists Improvements are welcome! When a new version of CCleaner comes out, just change the ccsetup526 to the new value. # CCleaner Download / Update Location # http://www.piriform.com/ccleaner/download mkdir C:\CCleanerInstall Invoke-WebRequest http://download.piriform.com/ccsetup526.exe -OutFile C:\CCleanerInstall\ccsetup526.exe Start-Process -FilePath "c:\CCleanerInstall\ccsetup526.exe" -ArgumentList "/S" Start-Sleep -s 20 rm-R -Force C:\CCleanerInstall If you want you can also add: Start-Process -FilePath "C…
-
- 2 replies
- 11.4k views
-
-
Wrote this script with the help of Support. Thanks Ermins! $days = 35 $system = Get-WmiObject win32_operatingsystem if($system.ConvertToDateTime($system.LastBootUpTime) -lt (Get-Date).AddDays(-$days)){ Restart-Computer -Force }else{ Write-Host "Machine was rebooted less than $days days ago" }
-
- 2 replies
- 10.9k views
- 1 follower
-
-
Does anyone have a working script to install Sentinel One silently on managed machines?
-
- 4 replies
- 10.4k views
-
-
A number of folks have requested the ability to manage bitlocker with Pulseway, so I thought I would share how I am doing this with Powershell scripts and Pulseway's custom fields feature. First, you will need to create a custom fields in Pulseway (Automation Tab --> Custom Fields). This fields should be a text variable that has the system context. I personally have 3, BitlockerKey, Protection Status (On/Off), and BitLockerVolumeStatus. BitlockerKey is probably the one most people will care about. . After Configuring the Custom fields, you will then need to create your PowerShell script. Notice you have inputs and outputs. You will want to click New f…
- 8 replies
- 10.1k views
-
I made a install script for Dropbox to do a Silent install. UPDATED VERSION 2 With auto detect if Invoke-WebRequest exists Improvements are welcome! Change the version if needed in the Source URL: https://www.dropbox.com/downloading?full=1&os=win # Silent Install Dropbox # Download URL: https://www.dropbox.com/downloading?full=1&os=win # Path for the workdir $workdir = "c:\ictwebsolution\" # Check if work directory exists if not create it If (Test-Path -Path $workdir -PathType Container) { Write-Host "$workdir already exists" -ForegroundColor Red} ELSE { New-Item -Path $workdir -ItemType directory } # Download the installer $so…
-
- 2 replies
- 9.6k views
-
-
It was requested I post this so hopefully someone else in the community can benefit. Until we are able to deploy Bitdefender from within Pulseway, this is the next best thing. I wrote this again, for my clientele who generally are PS 3.0 + so some small adjustments may be needed if you are attempting to run this on PS 2.0. This will download and silently install Bitdefender. All you need to edit is the $BitdefenderURL and possibly the $BaseURL depending. When you log into GravityZone and make a package and go to get install links, the base URL in your portal will always be the same followed by the remaining part of the URL which can change based on the package. …
-
- 0 replies
- 9.5k views
-
-
The Pulseway Automation contains the Builtin "Cleanup Temporary Files" powershell. I thought it might be worth a conversation. Here's the current code: $folders = @("C:\Windows\Temp\*", "C:\Documents and Settings\*\Local Settings\temp\*", "C:\Users\*\Appdata\Local\Temp\*", "C:\Users\*\Appdata\Local\Microsoft\Windows\Temporary Internet Files\*", "C:\Windows\SoftwareDistribution\Download", "C:\Windows\System32\FNTCACHE.DAT") foreach ($folder in $folders) {Remove-Item $folder -force -recurse -ErrorAction SilentlyContinue} exit 0 I'm not sure it is worth removing the SoftwareDistribution\Download files? From what I understand in Windows 10 you have to run, net stop…
-
- 0 replies
- 9.3k views
-
-
Hi, Is there a script to remotely enable o provide remote support the remote desktop client and ask users permission for connection? I have a number to remote users and would like to provide remote support to them Thanks Nick
-
- 3 replies
- 8.3k views
-
-
When u use the built-in script "Add Automatically Started Services in Pulseway" some services wil be monitored that are triggert and not always on. This wil result in unwanted notifications. The first variable has the servicenames you want to disable. $services = @('gupdate', 'ShellHWDetection', 'sppsvc', 'RemoteRegistry', 'MapsBroker', 'tiledatamodelsvc', 'WbioSrvc', 'WinDefend', 'CDPSvc') $servicesRegex = [string]::Join('|', $services) # create the regex $regservices = Get-ItemProperty "HKLM:\Software\MMSOFT Design\PC Monitor\Services" $regservicesSplit = $regservices -split ";" foreach ($regservice in $regservicesSplit) { If ($regservice -match $servic…
-
- 7 replies
- 7.8k views
- 1 follower
-
-
Good evening, I would like to use the standard script for windows that is in pulseway automation. But I get this error message: Checking for Windows updates Downloading updates Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) At C:\Program Files\Pulseway\automation_9fdca742_c373_41fb_80e3_ce2b245530ca.ps1:25 char:5 + $Downloader = $Session.CreateUpdateDownloader() + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: (:) [], UnauthorizedAccessException + FullyQualifiedErrorId : System.UnauthorizedAccessException The user used to execute the script (Settings…
- 6 replies
- 7.7k views