Jump to content
Pulseway 9.14 🔥

PowerShell

Share your PowerShell scripts

  1. 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…

  2. Started by Innobras,

    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…

  3. Is it possible to get a report of all devices CPU generation?

  4. 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.7k views
  5. Started by Youssef Heiba,

    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
  6. 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.5k views
  7. 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…

  8. Started by Cezar,

    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
  9. Started by Nick Grey,

    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"

  10. 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
  11. Started by Infotel,

    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.3k views
  12. 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…

  13. 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.4k views
  14. Does anyone have a working script to install Sentinel One silently on managed machines?

    • 4 replies
    • 10.2k views
  15. Started by NoobTube,

    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"

  16. Started by dimitri.gillet,

    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

  17. Started by dbeckwitt,

    Is there a way to force use of Powershell 7.2 when running powershell scripts in Pulseway?

    • 0 replies
    • 1.4k views
  18. 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…

  19. 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…

  20. Hi, My requirement is to monitor hardware components in a server using the REST API and Powershell. Currently I'm working at Fujitsu servers and I'm able to get the necessary monitoring information to Powershell objects from Fujitsu iRMC (Baseboard Management Controller) using the REST API. However, proceeding from here is the issue. I want to know how to feed the queried information to Pulseway and generate notifications based on the thresholds that will be defined. Based on the research I've done it seems like I need to create a plugin and add it to the Pulseway Manager. (Not 100% sure about this) Could you please help on how to get this done? …

    • 0 replies
    • 2.9k views
  21. Started by Evan Newton,

    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 …

  22. Hi, I work for a small IT business that is attempting to set up Network Glue (Basically a network information collector) which uses SNMP to collect information. I'm looking for a script that can install the SNMP service, and then adjust the settings to change startup to automatic, set the service to allow sending all possible information, (example shown in screenshot), set the community name to public, allow that community READ ONLY rights, and only accept SNMP packets from the Hostname "Twiz-PC". I've seen some stuff online but we are not fluent enough in Powershell to risk editing registry stuff ourselves, and having this automation will greatly help us in deploying to …

    • 1 reply
    • 3.7k views
  23. I have created this small script to enable monitoring of the active network adapter on a given machine. Hope this can be of some help for others in the forum. $activeadapter = Get-NetAdapter | Where-Object {$_.status -EQ "UP" -and $_.HardwareInterface -and $_.Name -notlike "*npcap*"} | select DeviceID $DeviceID = $activeadapter.DeviceID Set-ItemProperty "HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\NetworkInterfaces\" -Name count -Value 1 Set-ItemProperty "HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\NetworkInterfaces\" -Name service0 -Value "$DeviceID"

  24. Started by AMC,

    Hi Folks, I'm new to Pulsewau scripting, please bear with me. I've tried to run the following PowerShell command, but it doesnt seem to run. Rename-Computer -NewName "Computer123" -DomainCredential MyDomain\Administrator -Restart Any advice on what I should do, to rename a computer?

  25. Started by beli3ver,

    Hello, Good morning, I have a Powershell script which should install a certain software at our customer. During the installation a key is needed. I would like to enter this key every time I run the script, is this possible? Background is that we have different keys for each customer, so I do not have to create 10 versions of the script with different keys.

    • 1 reply
    • 2.5k views