Jump to content
Pulseway 9.14 🔥

PowerShell

Share your PowerShell scripts

  1. Hi, Is it possible to continue a script after a reboot using Tasks? I build a PowerShell script where a reboot is required and needs to continue after te reboot.

    • 3 replies
    • 4.3k views
  2. Hi, I'm trying to give all my users a new rdp icon on their desktop to log into our remote environment. How would I do so using powershell? I know .bat would work as well but Im not sure how I would go about it using pulseway.

  3. I created a script to install an MSI installer. However is I point to a Mapped Drive such as Z:\Working Directory\Installer.MSI it does not execute. If I execute the script from the C:\Temp\Installer.MSI it installs successfully. I've even tried using a UNC Path \\SERVERNAMER\Working Directory\Installer.MSI and it does not execute. Why is this? Does Pulseway not have permission to see the network share? Is there an area when creating the task that I need to enter network credentials. I don't see this. Please advise what I am doing wrong or overlooking Greg

  4. Started by eDecisions,

    Great for onboarding new station, you can grab any other short cuts such as to shared rive, or network folders, the users C drive or the my documents folder as well, I just did the office apps. #By eDcisions $Officepath = (New-Object -ComObject WScript.Shell).RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Winword.exe\Path") $WshShell = New-Object -comObject WScript.Shell $Shortcut = $WshShell.CreateShortcut("$Home\Desktop\Excel.lnk") $Shortcut.TargetPath = "$Officepath\Excel.exe" $Shortcut.Save() $WshShell = New-Object -comObject WScript.Shell $Shortcut = $WshShell.CreateShortcut("$Home\Desktop\Outlook…

    • 3 replies
    • 3.9k views
  5. I want to start a program after rebooting and used this script, but it's not working. When I run it local in powershell it works. Someone who can help me? pushd "\\fax-dataserver\IT\WVL\04. Software\IT_Monitor\IT_Monitor_live\" & '.\IT Monitor.exe' popd

    • 3 replies
    • 2.7k views
  6. Update 3rd Party applications eg, adobe, quickbooks, zoom, etc

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

  8. 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"

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

  10. Started by pat,

    Hi, I am trying to automate the run of disk clean-up tool (cleanmgr) on my managed computers. I have created a script that prepares the "sageset" on computers and that seems to be working OK. The problem I am running into is that when I remotely launch the script/1-liner that executes the cleanmgr to effectively run the created sageset, it just hangs while using a certain percentage of CPU. Do you have any idea what I'm doing wrong? prepare.sageset.ps1: this prepares the "sageset" in registry. I'm using sageset 0x0100. run.cleanup.ps1: this starts the "sagerun". It works just fine when executed manually from powershell but I'm running into the above-descrip…

  11. Started by kavaa,

    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
  12. Started by kavaa,

    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
  13. Started by SilverAnt,

    I'm not sure this is the correct section to post in, but I am having issues with a sample script I wrote. In testing out the automation features of Pulseway, I wrote a script to start the PC Monitor service (because I am having issues with it not starting all of the time). Here is the script: Get-Service "PC Monitor" | Where {$_.status –eq 'Stopped'} | Start-Service Here is the error I get in return : At C:\Program Files\Pulseway\automation_a5487285_b624_4996_8bc3_3440ed567e5a.ps1:1 char:47 + ... ice "PC Monitor" | Where {$_.status Æ’?"eq 'Stopped'} | Start-Service + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The s…

  14. 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" }

  15. Hi, is it possible to use the PowerShell scripts from https://gallery.technet.microsoft.com/scriptcenter/2d191bcd-3308-4edd-9de2-88dff796b0bc (= PSWindowsUpdate) over Pulseway. My idea is to create a new category unter Automation -> Scripts with all the scripts of PSWindowsUpdate, but I have no idea if they would work... Thanks, Christian.

  16. I created a simple script to update the Pulseway Manager settings. The script verifies if a directory exists, and if it doesn't then creates it. Afterwards, it downloads the file from the URL and saves it to the outpath. Then updates Pulseway Manager config with the file located in the outpath. This has been extremely useful for modifying settings and updating all agents with the new settings. The flow for this process is as follows: 1. Update settings on the Pulseway Manager application, export settings. 2. Upload the settings file to a cloud or web-based URL, I use AWS S3 buckets with a public URL. 3. Add the URL to the $url variable, and change the paths…

    • 2 replies
    • 3.5k views
  17. Pulseway doesn't seem to send the following script to create an INI file correctly to the target computer. The script runs fine on local Powershell, but it creates a setupconfig.ini file with text as a long string when run through Pulseway. $fqdn=(Get-WmiObject win32_computersystem).DNSHostName+"."+(Get-WmiObject win32_computersystem).Domain $fqdn=$fqdn.Substring($fqdn.IndexOf(".") + 1) $sysfolder="\\$env:computername\sysvol\$fqdn\policies\" $setupconfig="\\$env:computername\sysvol\$fqdn\policies\setupconfig.ini" $functiontext = @" [Setupconfig] auto=upgrade BitLocker=AlwaysSuspend Compat=IgnoreWarning Priority=Normal DynamicUpdate=Enable ShowOOBE=None Telemetry=Enab…

  18. Don't you hate it, turn on the computer and you got all this cra# that comes up before you can start using your computer, users had enough of it, and go figure Microsoft put the run commmand in HKCU rather than HKLM I can't take credit for this one, I added the remove the run item but the balance of the script I found on ChristopherKibble.com, this script loops thru every users of the computer and edit's their HKCU, you run the script once and its fixed for all users on that system. #******************************************************************************************************************************* #** All code is for demonstration only and s…

    • 2 replies
    • 3.5k views
  19. Started by PaulWTech,

    I have a Windows 10 Pro (local) machine that is not responding to: wmic UserAccount set PasswordExpires=True I've been digging a big hole looking for a comparable powershell command. Anyone know? Also, how to check if the user cannot change password is set. It does not list using net accounts

    • 2 replies
    • 2.4k views
  20. Started by Brant,

    I've implemented a script that retrieves and stores the Windows Build Version number to a custom field in the system overview. It works fine on MOST systems. However, there are a small number systems that are unable to run the script. The error message displayed includes: Start-Process : This command cannot be run due to the error: The system cannot find the file specified. I used the "Insert Output Variable Code" in the script and verified that it includes the inserted text "Start-Process -FilePath "$env:PWY_HOME\CLI.exe" -ArgumentList ("setVariable .....". For some reason, a few systems do not seem to have the environment variable PWY_HOME set. It ap…

  21. 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?

  22. I am looking fo a script that I can deploy where Pulseway can check to see if a specific local admin account has been created. If not have it create it. With that local admin account, there is a rotating password, which is recorded in a report per computer.

  23. Started by DarienAL,

    I've been experimenting with a scheduled task to restart some machines based on scope and I've had mixed success. Some machines in the scope restart as scheduled some don't. My powershell skills are limited so right now the pulseway script that I created to do restarts just has the powershell command Restart-Computer. Should there be more?

    • 2 replies
    • 3.7k views
  24. Is there a way to prompt when a script is ran for input? Like say I make a script that changes the name of the computer, is it possible to make pulseway prompt for what you want the new system name to be? If I could figure this out it would be huge.

    • 2 replies
    • 2.5k views
  25. It's fairly simple to create a Windows user account with Powershell. Are there any reasons why this cannot be done with Pulseway via Powershell scripting?