PowerShell
Share your PowerShell scripts
112 topics in this forum
-
Hi everyone, I wanted to share a simple PowerShell script that you can use within Pulseway Automation to remotely eject any USB storage devices connected to a system. This can be helpful for security-conscious environments or in scenarios where USB usage needs to be tightly controlled. Works well in combination with the Disable USB Storage Access script in the built in category. The script uses Shell.Application to trigger the native "Eject" action for removable drives (DriveType = 2). Here's the version that loops through all mounted USB volumes: ✅ Works great in Pulseway automation tasks 💡 You can modify it to eject a specific drive letter if ne…
-
- 1 reply
- 172 views
- 1 follower
-
-
This script below runs find when ran locally. When I use it in pulseway it doesnt work. This is what I get as an error message. Can someone help me please. Thanks, Output At C:\Program Files\Pulseway\automation_6d035661_a3a3_4e34_b6c2_8e997a18878a.ps1:5 char:149 + ... owsdesktop-runtime-6.0.24-win-x64.exe" -wait -ArgumentList '/S /v/qn' + ~ You must provide a value expression following the '/' operator. At C:\Program Files\Pulseway\automation_6d035661_a3a3_4e34_b6c2_8e997a18878a.ps1:5 char:149 + …
-
- 1 reply
- 1.6k 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.5k views
- 1 follower
-
-
Hello Pulseway Support, I am currently using the Pulseway Task module to execute PowerShell scripts. My scripts require PowerShell 7 (pwsh.exe) to function properly, as certain modules like HuduAPI are not supported in PowerShell 5.1. However, when I attempt to run scripts that rely on PowerShell 7 functionality, they default to PowerShell 5.1, resulting in compatibility issues and failures. I would like to request guidance on how to: Configure Pulseway to explicitly run scripts using PowerShell 7 (pwsh.exe). Verify if the Pulseway PowerShell module supports PowerShell 7, and if not, what workaround or timeline is available to ensure compatibi…
-
- 1 reply
- 558 views
-
-
Is it possible to get a report of all devices CPU generation?
-
- 1 reply
- 750 views
- 1 follower
-
-
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.4k views
-
Does anyone have a working script to install Sentinel One silently on managed machines?
-
- 4 replies
- 9.9k 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
- 9.8k views
-
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
- 13k views
- 1 follower
-
-
Hi, I have created a powershell script to activate a specific screensaver, password enable it and set the idle timeout value, but it does not work when I try to run it from the PulseWay Web interface. I have also tried it from a batch script, but it does not work either. Both scripts work fine when running them directly from the local computer. The Powershell script it as follows: #Values to customize $ScreenSaveActive = 1 #set to 1 if you want the screensaver enabled, 0 to disable $TimeOutValue = 60 # number of idle seconds before screensaver gets active $ScreenSaverFile = "C:\Windows\system32\mystify.scr" # full path to scree…
- 3 replies
- 2.7k views
- 1 follower
-
Hello Everyone ! I could find a script that is going to show the internet speed for end-users through Powershell. You can use the follow script to also send an automated email with the results : #https://www.speedtest.net/apps/cli cls $DownloadURL = "https://install.speedtest.net/app/cli/ookla-speedtest-1.0.0-win64.zip" #location to save on the computer. Path must exist or it will error $DOwnloadPath = "c:\temp\SpeedTest.Zip" $ExtractToPath = "c:\temp\SpeedTest" $SpeedTestEXEPath = "C:\temp\SpeedTest\speedtest.exe" #Log File Path $LogPath = 'c:\temp\SpeedTestLog.txt' #Start Logging to a Text File $ErrorActionPreference="Silent…
-
- 1 reply
- 2.1k views
-
-
I made a script that installs lenovo vantage from microsoft store: winget install "Lenovo Vantage" --source=msstore --accept-package-agreements --accept-source-agreements When i want to run it from the pc i am working on it works just fine, but if i want to run it from pulseway i get this error: winget : The term 'winget' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:\Program Files (x86)\Pulseway\automation_55824cad_0bdb_4995_a6e0_9b420b5b32b1.ps1:1 char:1 + winget install "Lenovo Vantage" --source=ms…
-
- 1 reply
- 1.4k views
-
-
This will stop and restart EXPLORER.EXE for the currently logged in user. #By eDecisions $TasknameStop = "ExplorerStop" $TasknameStart = "ExplorerStart" $lastlogon = (New-Object -ComObject WScript.Shell).RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\LastLoggedOnUser") SCHTASKS /CREATE /sc ONCE /st 00:00 /TN $TasknameStop /RU $lastlogon /TR "taskkill /f /im explorer.exe" SCHTASKS /CREATE /sc ONCE /st 00:00 /TN $TasknameStart /RU $lastlogon /TR "explorer.exe" start-sleep -s 1 schtasks /Run /TN $TasknameStop start-sleep -s 1 schtasks /Run /TN $TasknameStart start-sleep -s 1 schtasks /delete /tn …
-
- 1 reply
- 4.5k views
-
-
Deze script werkt als het gerunt is van een user account maar niet vanuit pulseway. $password = ConvertTo-SecureString "your_password" -AsPlainText -Force $credentials = New-Object System.Management.Automation.PSCredential("your_username", $password) $scriptBlock = { Start-Process powershell -Verb RunAs Write-Host "Running with elevated privileges!" } $encodedCommand = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($scriptBlock)) Start-Process powershell.exe -ArgumentList "-NoProfile -EncodedCommand $encodedCommand" -Credential $credentials
-
- 1 reply
- 1.2k views
-
-
Hi All we are trying to run the following as a PS script in Pulseway. We have no issues with running the script from the machine but when we running the script via Automation it says it worked and was successful but it makes no changes. thanks Nick New-Item -Path "HKCU:\SOFTWARE\Microsoft\Office\16.0\Outlook\Profiles" -Name "GO_365" -Force Set-ItemProperty "HKCU:\SOFTWARE\Microsoft\Office\16.0\Outlook" -Name "DefaultProfile" -Value "GO_365"
-
- 3 replies
- 2.1k views
- 1 follower
-
-
Hi Everyone! We are looking to deploy a script to all of our laptops/desktops that will add a Trusted Location to both Excel and Access. It does this by changing Registry values on the users profile. Unfortunately, we are running into an issue though. When I test the script using PowerShell ISE, everything works perfectly. When I try deploying the script via Pulseway RMM Tasks, it will say the script deployment was "successful" but when I remote into the end user's computer, the Registry Editor won't show any changes being made to the Trusted Locations for either program. After searching through the forums, I found someone who ran into a similar issue. The answe…
-
- 1 reply
- 1.3k 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
- 2k views
- 1 follower
-
-
This took me a while to get working, so I figured I'd share the detail in case anyone else would like to use something similar. I've been working on identifying computers that have local user accounts with blank passwords. This problem is more a relic of launching our RMM journey late and not being ready to enforce a password policy, but it might be useful for someone else. I used the variable 'offenders,' and it returns a comma-separated list of the local user accounts that have blank passwords or just the word "Secured" if all accounts have a password. Add-Type -AssemblyName System.DirectoryServices.AccountManagement $script = { Param($cred) try…
-
- 0 replies
- 1.2k views
-
-
HI Team Is there a way to remotely enable/disable notifications for a specific endpoint via the Admin Console (mydomain.pulseway.com/app/main/systems/{system_id}/details) under Manage > Execute Powershell? I want to disable the "Send notification when computer is offline" but is there a way i can do it with remote powershell/scripting without logging into the computer?
-
- 1 reply
- 1.3k views
-
-
Hello, i am trying to setup a very simple script to install powertoys as we have a need for the image resize feature on some computers. it can be installed using the winget cmdlet in powershell or the windows terminal, i have run it manually on both widows 10 and 11, but running the script the pulseway give be the following $ winget install Microsoft.PowerToys --source winget winget : The term 'winget' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + winget install Microsoft.PowerToys …
- 3 replies
- 3.6k views
- 1 follower
-
I want to add the below PowerShell command into Pulseway script, any help with creating or articles would be great. Powershell cd HKLM:\ New-Item -Path "SOFTWARE\Policies\" -Name "Google" New-Item -Path "SOFTWARE\Policies\Google\" -Name "Chrome" cd HKLM:\ New-ItemProperty -Path SOFTWARE\Policies\Google\Chrome -Name "IntensiveWakeUpThrottlingEnabled" -Value "0" -PropertyType "DWord" New-ItemProperty -Path SOFTWARE\Policies\Google\Chrome -Name "WindowOcclusionEnabled" -Value "0" -PropertyType "DWord"
-
- 2 replies
- 2.8k views
- 1 follower
-
-
I am looking to create an automated pop up message via powershell to alert users in a certain scope. Example: Systems will be under going maintenance, please ensure you leave the system on. However, I noticed due to powershell being in 'session 0' it won't show the pop up box for the user. How can I get around this or does anybody have another method? Side note: I did notice you can send group messages via Pulseway Group section, but I don't think I could automate that?
-
- 2 replies
- 4.2k views
- 1 follower
-
-
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
- 53.5k views
-
Hello to all, I have a big problem in one of my tasks (in the Automation -> Tasks section) I want to execute a script in PowerShell quite simple: "Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" -Name "XXXXX" " When I run the script on a single machine everything is fine the execution is done super fast and works perfectly, but when I run the same script in "Tasks" mode nothing happens. I just get a "Skipped" return on the task see the screenshot. But I don't understand at all why? Thanks a lot for your help. Sincerely Dimitri
-
- 1 reply
- 1.5k views
-
-
I create a PS script that won't run on my workstation, nothing happens. After investigation the script download the EXE file but the installation next runs or executes. Not sure if this is permission issue or a scripting error? Please help me. Below is my current script # Silent Install Dropbox # Download URL: https://vbc-downloads.vonage.com/win/VonageBusinessSetup.exe # Path for the workdir $workdir = "c:\temp\Vonage" # 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 directo…
-
- 1 reply
- 2k views
-