Search the Community
Showing results for 'how to powershell'.
Found 436 results
-
command line .exe......unique admin credentials
Hey @R.Rupert There are a number of ways to do it, When running anything through Pulseway, it will default to running as the system account. So trying to run those commands through Pulseway, you're opening the program (if it even supports non-interactive) as the system account, and no user will see it. You could check processes to confirm that though. You would need to run it under user context and right now, Pulseway only has that ability to do this if you log onto the machine in question, open Pulseway Manager, go to Settings - Runtime and scroll to the bottom to Enable PowerShell User Impersonation. This will run scripts through Pulseway as the user you entered. Here is a link to the article for more info - LINK I hope this helps and if you need any more help please let me know! Thanks, Stefan
-
Powershell commands
I'm looking to automate a lot more of my server update routines and part of that includes putting PCmonitor into Maint mode and then when the schedule is complete pulling it out of maint mode. I'm hoping there are powershell scripts to do this as the machines in question are Live and cant be downed every week so a monthly schedule is all can utilise otherwise I would have used the built in schedule service in the gui Though if there is a switch that can change this into a monthly view that would be great, ideally the 3rd Wednesday of the month so as to give Patch Tuesday a week to have the major bugs ironed out Any help greatly appreciated. Thanks.
-
Uninstall NINJARMM Agent
Hey, I have tried to use this powershell script and coming up with the below if you can help? (not running it via pulseway) cd : Cannot find drive. A drive with the name '"C' does not exist. At C:\WINDOWS\AdminArsenal\PDQDeployRunner\service-1\exec\user.ps1:13 char:1 + cd $path + ~~~~~~~~ + CategoryInfo : ObjectNotFound: ("C:String) [Set-Location], DriveNotFoundException + FullyQualifiedErrorId : DriveNotFound,Microsoft.PowerShell.Commands.SetLocationCommand ScriptHalted At C:\WINDOWS\AdminArsenal\PDQDeployRunner\service-1\exec\Error Handling Wrapper.ps1:58 char:2 + Throw $_.Exception.ErrorRecord + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: (:) [], RuntimeException + FullyQualifiedErrorId : ScriptHalted
-
Task (skipped)
Hello! We have identified the problem to be in the Windows Agent (v8.8.4) and have released an update (v8.8.5) to resolve the issue. It will take about 24 hours for all agents to pick up the update (36 hours for customers hosting their own server (on-premise version)). In the meantime to combat the issue you can run the following Powershell command, using Powershell terminal to get the automation working again right away: Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor' -Name 'EnableAutomation' -Value '1' Important: The Powershell script is only necessary in case you can't wait for the automatic 8.8.5 agent update and need access to automation immediately. In all other instances, the agent will be updated automatically and the issue will get resolved without the need for manual intervention. We apologize for any inconvenience caused. @Mark G38 @David Stanton @Jamie Taylor
-
Powershell: Start-Process ERROR
Hi There. Apologies if this is more of a case of my getting something wrong with my cmdlets but I'm struggling with the Powershell on my iPhone app. I have a batch file I would like to be able to execute from my phone however I'm struggling to get it to work. I'm using the following cmdlet... start-process c:\bat\filename.bat ... however I keep getting the following error message... "Error: This command cannot be executed due to the error: The system cannot find the file specified" I've checked the location of the batch file and it's definitely correct. I did try putting the file and location in ""'s and this returned a "Command executed successfully" message however the application my batch file is supposed to launch has not launched. My biggest fear is that this is probably my lack of knowledge of Powershell but any help would be gratefully received all the same. Thanks, Steve
-
Pulseway 9.4 has arrived we can't wait for you to try it!!
Exciting Updates with Pulseway 9.4: Dive Deeper, Automate Smarter, and Control Better! Hey IT Heroes! 🌟 We've rolled out some significant updates for Pulseway 9.4 that we believe will be game-changers. Here's a detailed breakdown: 1. Advanced Templates📊: Full Control: Our new module empowers you to decide what data you report, its presentation, and format. Tailored Reporting: Use our library of templates or craft your own reports from scratch. Branding: Customize the look and feel of your reports to align with any branding guidelines. 2. Enhanced Automation⚙️: API Call Workflow Action: Introducing webhooks to help you interact with apps outside of the Pulseway ecosystem. New Automations: Execute Azure Runbooks, send custom Teams/Slack messages, and more. 6 New Actions & 12 Conditions: From executing PowerShell commands to checking if a specific file exists. 3. Advanced Patching🛡️: MSRC Support: Enhance your patching rules with Microsoft Security Classification. Patching Overview: Quickly view installed and pending patches for online & offline devices. Dashboard Widgets: Visualize patching status in real-time across your environment. 4. Upgraded Remote Control📶: User Empowerment: End-users can now choose to accept or reject Remote Desktop sessions. Notifications: Users will be informed about the start and stop of RD sessions. Technician Control: Techs can decide if end-users can disconnect a session. 5. Local IP Address Info 🎊: Access local IP information for all active network interfaces right from the device card, Advanced Search, or Quick Search. 6. API V3 Refinements🛠️: We're pushing the envelope with support for new endpoints, allowing for more secure integrations to make your workdays even more efficient. If anybody would like to learn more about the Pulseway 9.4 update you can do so HERE And for anyone who's curious you can always dive in and try out the new Pulseway 9.4 features HERE with a free trial We've crafted these updates based on your feedback and the ever-evolving tech landscape. Would love to hear your thoughts, experiences, and any questions you might have! Happy tech-ing! 😊
-
Automatically restart my PC when it goes offline?
Automating a powershell command via scehduled tasks, or triggred from automation workflows should be able to assist you in this case. You can try PowerShell Commands like the below one restrart your remote device by entering your computer name.
-
Uninstall Teamviewer via Pulseway
Hi There, Here is my removal script. Hope it works for you ## Powershell Teamviewer Uninstall Script ## Scott Pepper ## Careys Freight Lines ## 6th November 2023 if(Get-Service Teamviewer) { Stop-Service TeamViewer Set-Service Teamviewer -StartupType Disabled Write-Host "Teamviewer is installed" if ([System.IO.File]::Exists("C:\Program Files\Teamviewer\uninstall.exe")) { $process = start-process "C:\Program Files\Teamviewer\uninstall.exe" -windowstyle Hidden -ArgumentList "`/S" -PassThru -Wait exit $process.ExitCode } elseif ([System.IO.File]::Exists("C:\Program Files (x86)\Teamviewer\uninstall.exe")) { $process = start-process "C:\Program Files (x86)\Teamviewer\uninstall.exe" -windowstyle Hidden -ArgumentList "`/S" -PassThru -Wait exit $process.ExitCode } else { write-host ("Teamviewer does not appear installed.") } } exit 0
-
Internet Speed Test
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="SilentlyContinue" Stop-Transcript | out-null $ErrorActionPreference = "Continue" Start-Transcript -path $LogPath -Append:$false #check for and delete existing log files function RunTest() { $test = & $SpeedTestEXEPath --accept-license $test } function sendMail ($subject, $message) { "Sending Email" #SMTP server name $smtpServer = "smtp.office365.com" $EmailSender = "noreply@yourdomain.com" $emailPassword = "password123_or_monkey" $port = '587' $from = "noreply@yourdomain.com" $to = "you@yourdomain.com" #Creating a Mail object $msg = new-object Net.Mail.MailMessage $emailCredential = New-Object System.Net.NetworkCredential($EmailSender, $emailPassword) #Creating SMTP server object $smtp = new-object Net.Mail.SmtpClient($smtpServer) $smtp.Port = $port $smtp.EnableSSl = $true $smtp.Credentials = $emailCredential #Email structure $msg.From = $from $msg.To.add($to) $msg.subject = $subject $msg.body = $message #Sending email $smtp.Send($msg) write-host "Email Sent" -ForegroundColor Green }; #check if file exists if (Test-Path $SpeedTestEXEPath -PathType leaf) { Write-Host "SpeedTest EXE Exists, starting test" -ForegroundColor Green RunTest } else { Write-Host "SpeedTest EXE Doesn't Exist, starting file download" #downloads the file from the URL wget $DownloadURL -outfile $DOwnloadPath #Unzip the file Add-Type -AssemblyName System.IO.Compression.FileSystem function Unzip { param([string]$zipfile, [string]$outpath) [System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath) } Unzip $DOwnloadPath $ExtractToPath RunTest } #get hostname $Hostname = hostname #read results out of log file into string $MailMessage = (Get-Content -Path $LogPath) -join "`n" #email results use log file string as body $MailSubject = $Hostname + " SpeedTest Results" sendMail $MailSubject $MailMessage #stop logging Stop-Transcript
-
Feature not enabled | Server Modules greyed out
Hi @Lwild & @Matt Stevens The reason that you two are both unable to see the Hyper-V module is because we are currently in the process of moving this module to be accessible within the Webapp and due to this for some reason it has disappeared. If you run the following PowerShell script Set-ItemProperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\' -name 'MonitorHyperV' -Value '1' it will effectively flip a switch and you should be able to access the Hyper-V module again. Dev is currently troubleshooting why the issues exists in the first place but if you need any more assistance please feel free to reach out. Thanks, Stefan
-
The new workflow commands are not responding
Hi @christian.krut So the run shell command doesn't run PowerShell commands, It does however run cmd, exe and bat files. I'm going to reach out to you AM and see if they can organize a demo for you to solve all your questions regarding Workflows and the execute shell command Thanks, Stefan
-
The new workflow commands are not responding
i got some command to work but just so im not confused. is shell CMD or powershell commands? please forward that any type of feedback from the run shell command would greatly help to understand when things are not working. thanks Christian
-
Update Computer Name with Logged on Username
Don't run it against those machines. Create a scope in Pulseway and apply the job / script to that scope and don't include those machines. If you don't want to do that, then modify the script and using this. Change the PCNames to the ones you don't want it to run on, and then yea, it will just exit with a success if it sees those names. If you are on machines that are all PowerShell 3.0 and above, then you can also use $env:computername -in $Exclusions as well. -contains is PowerShell 2 compatible. $Exclusions = @("PCName1", "PCName2", "PCName3") if ($Exclusions -contains $env:COMPUTERNAME) { Exit 0 } else { PLACE REST OF CODE HERE }
-
A How to Guide on Managing Bitlocker Encryption with Pulseway
I am having an issue where nothing is put into the custom variables. Through trial and error running the commands in Powershell, I see that the commands that run CLI.exe give an error "Missing Pulseway execution cookie". I'm assuming there's something I'm missing? I was able to produce this error by adding -NoNewWindow to the end of the CLI.exe statements, otherwise it wouldn't report the error. Ex. Start-Process -FilePath "C:\Program Files\Pulseway\CLI.exe" -ArgumentList ("setVariable recoverykey ""$recoverykey""") -Wait -NoNewWindow Edit: So I figured out what caused this error, I have the Powershell User Impersonation enabled to a domain account. When I unchecked that box, everything worked.
-
HELP - Pulseway Tasks User Registry Update
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 answer to that question was exactly what I found on the end user's where the registry values had been changed for the .DEFAULT user. This leads us to my question: What is a workaround to this issue? Is there a change to the script that can be made or is this simply a limitation of Pulseway? SCRIPT: $trustedPath = "C:\Users\Public\Pictures\Security-Photos" $excelPath = "HKCU:\Software\Microsoft\Office\16.0\Excel\Security\Trusted Locations" New-Item -Path $excelPath -Name "Location1" -Force | Out-Null Set-ItemProperty -Path "$excelPath\Location1" -Name "Path" -Value $trustedPath Set-ItemProperty -Path "$excelPath\Location1" -Name "AllowSubfolders" -Value 1 $accessPath = "HKCU:\Software\Microsoft\Office\16.0\Access\Security\Trusted Locations" New-Item -Path $accessPath -Name "Location1" -Force | Out-Null Set-ItemProperty -Path "$accessPath\Location1" -Name "Path" -Value $trustedPath Set-ItemProperty -Path "$accessPath\Location1" -Name "AllowSubfolders" -Value 1
-
Creata a Windows user account?
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?
-
Unable to monitor Windows Backup
My apologies, we do support Windows Server 2008R2 however Windows Server 2008 is not supported. Are you sure that the button is not disabled because of a configuration lock? Also make sure that you can load and use the WindowsServerBackup PowerShell module. If all's ok, you could try to force enable it by running this PowerShell command: Set-ItemProperty -Path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\' -Name 'MonitorWindowsServerBackup' -Value '1' -Paul
-
Install Sentinel One via Powershell script
May be late to the party, but we use a site token variable where we can set the required token per customer. We then host the 32bit and 64bit installers on our website (as you can't seem to download them straight from SentintelOne's site it seems). You can then use powershell to download the installer and run it: Invoke-WebRequest -Uri $URL -OutFile $Installer -ErrorAction Stop Start-Process $Installer -ArgumentList "/t $Token","/q" -Wait -ErrorAction Stop $URL is the download link to the installer file Works like a charm
-
How to start an application via a script using powershell
Hey Greg, There are a number of ways to start a program, however, when you say you go to the remote computer, are you actually logging into the remote computer and opening PowerShell on the local machine and running those commands? If so, that's the difference. When running anything through Pulseway, it will default to running as the system account. So trying to run those commands through Pulseway, you're opening the program (if it even supports non-interactive) as the system account, and no user will see it. You could check processes to confirm that though. You would need to run it under user context and right now, Pulseway only has that ability to do this if you log onto the machine in question, open Pulseway Manager, go to Settings - Runtime and scroll to the bottom to Enable PowerShell User Impersonation. This will run scripts through Pulseway as the user you entered. This will do the trick. You can then call them different ways. Start-Process "Path\to\exe\" also will work.
-
Set low disk space threshold via script
@Piers I just did some testing on this with one of my VMs, and I'm pretty sure I have a solution for you. For starters, the Id0, Id1, etc, is strictly just a pattern being used it seems. If I add 2 drives to monitor through the Pulseway Manager, it increments by 1. So I originally did a volume, E, and it made id0. I then did volume F and it did id1. I then added the C in as an exception as well, to test, and it bumped it to id0 and moved the others up by 1. So it appears for the most part, it's basically in order of the drive and then that unique "data" they are putting in those idx value fields. In this case, that value, is actually the VolumeSerialNumber which you can find in PowerShell by using the Get-WMIObject Win32_LogicalDisk. So you can use PowerShell to loop through a machine, grab the disks/volumes, pull their VolumeSerialNumber, and then insert the custom requirements into the registry. Make sure if you increase the HDDList to 2, that you make sure the Count value is also increased to 2, or 3, etc. My example below, since I tested on 3, you can see my count is 3, and of course all the other fields match Idx, Precentagex, Priorityx, etc. Hope this helps!
-
Unable to use "param" with Powershell Scripts
I have the same issue, I have found the script works fine deployed via Pulseway on Windows 10 but fails on Windows 11. The script works fine when run locally in PowerShell on both OS.
-
Remote lock/wipe
I know this is a little bit of an older post but there aren't many others along the same topic. You will need to set up scripts to remotely wipe and lock a system down. I have created a special agent group for stolen computers where the next time they go online, the public IP address and SSID gets recorded and the (I believe to be) irreversible process of reinstalling Windows OS starts. The only caveat to this is that the stolen computer has to go online, which is typically not the case in my experience. No, the remote wipes and locks aren't a 1-button solution. They're Powershell scripts that take 7 clicks in total to initiate if you're looking to run it manually. I'm OK with that considering the impact those have on the end system. The stolen computer group is all automated, however, which should fulfill those types of requirements.
-
Start/Stop Hyper-V VMs from a script
There is a whole set of Powershell commands to work with Hyper-V virtual machines: https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/try-hyper-v-powershell You can create a Powershell script in Pulseway - it's as simple as: Stop-VM -Name TestVM Start-VM -Name TestVM Just RTFM for other command uses.
-
launch EXE files with pulseway
hello, i just want to share my solution for this problem: often the parameter -i 1 will not work when your current user has a different interface ID, so when launching some programs, like PLEX Web Server for example the program will be launched with wrong settings/default settings instead of your current users settings. For some programs there are no difference but i found this problem for plex and others. You can get the current ID with this command on powershell: query session and use it on the script/remote powershell every time or if you want here my solution my solution, i hope can help someone on pulseway script editor run as powershell this script : cd\ cd "C:\myScriptRUN\PSTools" .\id_plex.cmd the script with this mod: id_plex.cmd for /f "tokens=4 delims= " %%G in ('tasklist /FI "IMAGENAME eq ctfmon.exe" /NH') do SET RDP_SESSION=%%G echo Current RDP Session ID: %RDP_SESSION% cd\ cd "C:\myScriptRUN\PSTools" .\psexec.exe -i %RDP_SESSION% -d -u YOURUSERNAME -p YOURPASSWORD "S:\....\plex.exe" This script will get the current ID from a classic process cftfom.exe (for example) that is usually with the current ID of the user and than run psexec with that ID Username and password are optional but I recommend them. PS: yes the first time run /accepteula and follow the guide to add psexec for windows %path% Also i will link my script (for windows), instead of running this script for every kind of program/path i will just run my own program with different parameter so replace this .\psexec.exe -i %RDP_SESSION% -d -u YOURUSERNAME -p YOURPASSWORD "S:....\plex.exe" with : .\psexec.exe -i %RDP_SESSION% -d --u YOURUSERNAME -p YOURPASSWORD "S:\myREPO\pulseway\pulseway.exe" 1 Where : pulseway.exe is this script and 1 = your program, in my example 1 = plex, 2 = Team Viewer , 3 = etc.. If you want it's here: https://github.com/iTZUNAMI/ahk-pulseway-quicklaunchexe
-
How to configure a systemd user service in pulseway?
Hi @Milind Patel, Usually, Pulseway runs the scripts as a root system account and not as a user account. You can try the below method and see if it works for you. ---> On the remote machine, please consider configuring the PowerShell impersonation by remoting into that affected machine, then launch Pulseway Manager -> Settings -> Runtime. Please enter the username and password on this field on the affected system. If the affected machine is on a domain, domain-level credentials should be used. If it is not on a domain, you can use the local admin account credentials and leave the domain field blank. You may refer to the below screenshot. Once you have the Powershell impersonation configured on Pulseway Manager, wait for 2-3 minutes, then run the command/script through Pulseway Webapp.