PowerShell
Share your PowerShell scripts
112 topics in this forum
-
My current RMM (the one I'm trying to migrate from) allows me to install both .exe and .MSI's without a UAC prompt. It seems to run in the background. Even with UAC turned on, however, with Pulseway I'm unable to run scripts (with either system or local admin account) without turning off UAC completely. What am I missing?
- 1 reply
- 3k views
-
I feel like I am missing something simple here. I cannot get any PS scripts or commands to execute on client machines from the Pulseway Dashboard. I began by making some simple cache clearing scripts I need to run daily/weekly, and quickly realized those as well as many scripts from my predecessor in the Dashboard were simply not working (folders marked for deletion were still present). In testing, I am now trying to run something as simple as "Restart-Computer" and when ran from the Dashboard (Systems > SystemName > Scripts) it shows as if it ran successfully, but the machine does not reboot. Of course running this command in a non elevated PS prompt directly on th…
- 1 reply
- 2.5k views
-
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.6k views
-
-
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?
-
- 1 reply
- 3.5k views
- 1 follower
-
-
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"
- 1 reply
- 2.1k views
- 1 follower
-
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.8k 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
- 2.1k 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.6k 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.4k views
-
-
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.4k 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.3k 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.6k views
-
-
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.2k views
-
-
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
-
-
Is it possible to get a report of all devices CPU generation?
-
- 1 reply
- 811 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
- 676 views
-
-
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
- 372 views
- 1 follower
-
-
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
-
-
Windows will sometimes refuse to start non-critical services on boot (eg. Pulseway), when resources are low. I've noticed a few Win7 machines have run for weeks without Pulseway being allowed to start. As the powershell cmdlet "Set-Service –Name –Computer -StartupType" doesn't seem to allow delayed-start, I'm using this script as a work-around. You'll need to manually stop the service before running this script and then manually re-start it afterwards. I have NOT thoroughly tested this script and I take no credit or responsibility for it - it is something that I poached and re-factored and I'm not experienced in PowerShell. Regards, Delay PC Monitor service s…
-
- 0 replies
- 3.6k views
-
-
## Downloads latest PDQ from Company Dropbox and silently installs or updates if already installed # 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 $url = "https://www.dropbox.com/PDQ13.exe?dl=1" # Put your Url with the file here..I use dropbox, you can use whatever file hosting service. $destination = "$workdir\pdq13.exe" # Check if Invoke-Webrequest exists otherwise execute WebClient if (Get-…
-
- 0 replies
- 5.2k views
-
-
This script will update Hyper V integration services. Be sure and change your server names to match. Server0 is host and server1 is the Hyper V. Run on Host. Get-VM -Name SERVER1 –ComputerName server0 Set-VMDvdDrive -ComputerName server0 -VMName SERVER1 -Path 'C:\Windows\System32\vmguest.iso' $DVDriveLetter = (Get-VMDvdDrive -ComputerName server0 -VMName SERVER1).Id | Split-Path –Leaf Invoke-Command –ComputerName SERVER1 -ScriptBlock { if ($ENV:PROCESSOR_ARCHITECTURE -eq 'AMD64') { $folder = 'amd64' } else { $folder = 'x86' } Start-Process -FilePath "$($using:DVDriveLetter):\support\$folde…
-
- 0 replies
- 5.5k views
-
-
This script will set the virtual machine to auto start whenever the host reboots, it will also update Hyper V integration services. Be sure and change your server names to match. Server0 is host and server1 is the Hyper V. Run on Host. Get-VM –VMname * | Set-VM –AutomaticStartAction Start Get-VM -Name SERVER1 –ComputerName server0 Set-VMDvdDrive -ComputerName server0 -VMName SERVER1 -Path 'C:\Windows\System32\vmguest.iso' $DVDriveLetter = (Get-VMDvdDrive -ComputerName server0 -VMName SERVER1).Id | Split-Path –Leaf Invoke-Command –ComputerName SERVER1 -ScriptBlock { if ($ENV:PROCESSOR_ARCHITECTURE -eq 'AMD64') { $folder =…
-
- 0 replies
- 3.9k 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
-
-
1: ENABLE MANAGER LOCK (PASSWORD 123) Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor' -Name 'PreventChanges' -value '1' Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor' -Name 'PreventChangesPassword' -value 'u9jnMTCy8Op4FP7ojbHApnslkq4g2bxhTW8uvNKsURYntjFyJKp302SXGSI+d7lCghuzlNhB6kZb71JpwMiHIw==' Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor' -Name 'PreventChangesPasswordCtrl' -value 'A1-B9-23-A3-6D-C6-BD-A4-DF-CE-82-F5-F3-F6-69-81' 2: DISABLE MANAGER LOCK: Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor' -Name 'PreventChanges' -value '0' Set-Itemproperty …
-
- 0 replies
- 2.7k views
-
-
Disable IPv6 All Network Adapters, the second line allows you to check status of all adapters after run. Carefull, suggest you run on workstations only. Disable-NetAdapterBinding -Name "*" -ComponentID ms_tcpip6 Get-NetAdapterBinding -ComponentID ms_tcpip6 Enable IPv6 All Network Adapters enable-NetAdapterBinding -Name "*" -ComponentID ms_tcpip6 Get-NetAdapterBinding -ComponentID ms_tcpip6
-
- 0 replies
- 2.8k views
-