PowerShell
Share your PowerShell scripts
112 topics in this forum
-
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
-
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
-
-
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
-
-
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
-
So, I have this: Set-ItemProperty -Path "HKLM:\Software\MMSOFT Design\PC Monitor\" -Name ComputerName -Value "$env:UserName" Which works great from the local machine via PowerShell, However, when I try to run this as a script/task, the name just shows up as "HOSTNAME$" Any ideas why?
-
- 8 replies
- 6.9k views
- 1 follower
-
-
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
-
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
-
After noticing the addition of Custom Fields to the Scripts section, I was testing it out and wanted to store a value in a Custom Field for each system. I have setup a powershell script that should save a variable value to the Custom Field and ran it against my computer. The script ran successfully, but I am not able to find the Custom Field to see if value was saved properly. Where can the Custom Field be found?
- 6 replies
- 5.6k 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
-
Up until the most recent update to Pulseway, I was able to install the Huntress agent via their provided Powershell script at: https://github.com/huntresslabs/deployment-scripts/blob/main/Powershell/InstallHuntress.powershellv2.ps1 This script includes the "param" command, which has to be the first line of the script in order to run. After the recent update to Pulseway, all scripts that are run add an $ENV_AgentTemp variable to the top of the script, see screenshot below: This prevents the script from running correctly, see screenshot below of the error: Please note that the powershell output shows the error on line 32, whereas in the scr…
-
- 6 replies
- 2.2k views
- 1 follower
-
-
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
-
This has been bugging the h ell out of me, I need to map a drive, or run a program that can only be run by the logged in user, and if I map the drive from session 0 the user does not see it. The below script works but wish Pulseway had better run as user features built in. This script will map a drive letter for the logged in user, change server and share name to your info. you can change the /TR "any commoand you want to run as the user" $Taskname = "MapX" $lastlogon = (New-Object -ComObject WScript.Shell).RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\LastLoggedOnUser") SCHTASKS /CREATE /sc ONCE /st 00:00 /TN $T…
-
- 5 replies
- 5.1k views
-
-
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 want to start a project, ADD-Printer via power shell, anyone want to help? Or you doing it alrady?
-
- 5 replies
- 5.5k views
-
-
I'm trying to run just a simple wusa /uninstall /kb:5000802 script in a task but the task just hangs forever and never makes progress on the machines. I don't have too much experience running any type of scripting through an RMM so any help would be greatly appreciated.
- 5 replies
- 5.6k views
- 1 follower
-
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
-
Would like to execute powershell and batch scripts as admin. Is this possible? For example, I would like to run sfc. Is my only option scheduling tasks?
-
- 4 replies
- 6.8k views
-
-
This is more of a general script question about Pulseway. There are a number of the built-in script that appear like they should return data. When I review the scripts they are PowerShell scripts that would return data to the screen. I don't understand where the data is returned when they are run remotely via Pulseway. Is there someplace that Pulseway returns the data from a script after it is run? This would be super convenient but I surely cannot find this. Examples: List Installed Hotfixes List System Restore Points List Computers in the Active Directory These are built in but I don't understand where the results are supposed to be r…
-
- 4 replies
- 4.8k 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've written a script that retrieves the application name, publisher and version from the registry entries located in "HKLM:\Software\MMSOFT Design\PC Monitor\InstalledApplicationsSnapshot". How can I make sure the software versions listed in this location are updated to the latest version of the applications installed? Is there a way to force update these records? For example, I have a mismatch in a system that the PW web dashboard is reporting Citrix Files being at version 20.9.1.0 (which is correct as of the last 24 hours), and the local registry entry for this application under the PC Monitor\InstalledApplicationsSnapshot is still reporting the previous version 20.…
- 4 replies
- 3.6k views
-
HI All, I am trying to enable SSO on my endpoint running Windows 10 x64 by running the below PowerShell Script through Pulseway RMM, however the Task runs successfully, but does not execute on the computer and doesn't give me any errors. I have however ran the script on Windows PowerShell ISE locally on the computer and it executes without any problems. Please can someone help me understand why this script will not execute on the endpoint via Pulseway RMM. i have however ran other scripts on my test machine and they work, but for some reason this one doesn't seem to want to execute. PowerShell Script: # Set variables to indicate value and key to set $Regi…
- 4 replies
- 3.6k views
-
Does anyone have a working script to install Sentinel One silently on managed machines?
-
- 4 replies
- 10.4k 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
-
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
-