-
-
haylebop reacted to a post in a topic: Script to send alert about machines that have uptime for X amount of days (14 days)
-
-
Script to send alert about machines that have uptime for X amount of days (14 days)
I am not a Pusleway user anymore, but there are a couple of ways you could do this. You mention event ID, but I don't see any logic in your script to write an event ID to the event log. However, that would probably be the easiest way, and then have Pulseway look for (and alert off of) that event entry. I always set up a custom Event Log and then use my own codes so that I never have to worry about looking through logs with other stuff in it. All my stuff goes to a custom log I set up. As far as your code, your logic seems, a bit off to me unless I'm just too tired lol, but your first if statement, your essentially saying if lastboot is BEFORE 14 days ago, SetCustomeFieldNo... Would you want that to be a yes, since that means it hasn't rebooted in over 14 days? I think your statements are backwards. I assume your SetCustomField Yes would be used for if it's been up for over 14 days. Maybe I'm just reading it wrong. I personally wouldn't bother with setting the custom fields. I would again, just write to whatever event log you want, with whatever event ID you want, set Pulseway to alert off that event ID, and then schedule your script to run once a day. As soon as it runs and sees a machine over 14 days, it creates event log entry which Pulseway will then alert you to.
-
-
-
Adobe Acrobat Update Script | AzureADUser Delete
I wrote and used this often (before using a 3PP solution). The only thing is I couldn't find a static link to Adobe Reader DC when I wrote this, so I simply downloaded the latest version, and hosted it in AWS S3 and pulled it from there. So feel free to find a static URL or do the same I did. Function New-FileDownload { param( [Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [string]$Url, [Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [string]$Destination ) $webClient = New-Object System.Net.WebClient $webClient.DownloadFile($Url, $Destination) if (Test-Path -LiteralPath $Destination) { Write-Verbose "File downloaded Successfully" return $true } else { Write-Verbose "File download Failed" return $false } } $AppName = "Adobe Acrobat Reader DC" $InstallStatus = Get-ItemProperty "HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*" | Where-Object { $_.DisplayName -eq $AppName } if ($InstallStatus) { Write-Output "$($AppName) already installed." Exit 0 } $AdobeURL = "ENTER YOUR URL TO AdobeReaderDC.exe" $Destination = "$($env:temp)\adobeinstall.exe" $FileDownload = New-FileDownload -Url $AdobeURL -Destination $Destination if ($FileDownload) { Write-Output "Download succeeded, beginning Adobe Reader install..." Start-Process "$($Destination)" -ArgumentList "/sAll /rs /msi EULA_ACCEPT=YES" -Wait -NoNewWindow $InstallStatus = Get-ItemProperty "HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*" | Where-Object { $_.DisplayName -eq $AppName } if ($InstallStatus) { Write-Output "$($AppName) successfully installed." Exit 0 } else { Write-Output "$($AppName) failed to install." Exit 1 } } else { Write-Output "Failed to download installation file. Exiting." Exit 1 }
-
-
Jamie Taylor reacted to a post in a topic: How do I pause a schedules OS patch update until next month?
-
issue running cmdlet
You can just use the RunAs PowerShell module as well to accomplish this if you don't feel like dealing with psexec and having to distribute the package yourself. This works fine for logged in users. It will check if you have the RunAs module installed and if not, install it first. $ErrorActionPreference = "SilentlyContinue" if (!(Get-InstalledModule | Where-Object { $_.Name -eq "RunAsUser" })) { Write-Host "Not Installed. Installing" Install-Module RunAsUser -Force } $ScriptBlock = { winget install Microsoft.PowerToys --source winget } Invoke-ASCurrentUser -ScriptBlock $ScriptBlock Write-Host "Check Device to ensure PowerToys installed successfully." Exit 0
-
How do I pause a schedules OS patch update until next month?
Why not just exclude the updates that are giving you trouble?
-
-
-
-
New Phone
You should have saved backup codes when you set up your 2FA the first time, that allow you into the account. You have to select Try Another Way after entering your creds. Assuming you no longer have your old phone. Aside from this, if you don't have your codes, good luck, you should probably reach out directly to support.
- What is this and how do I get rid of it?
-
Show number of servers and clients from one customer
Systems - Groups - Look at the total in the group assuming you have them set up as each client is a group/organization. Account - Manage Systems - Download CSV, Sort, Sum them. Server Admin - Configuration - Click Organziation/Group - Show Systems Or use API to make your own quick report.
-
-
Mark G38 reacted to a post in a topic: Remote Login for Windows, Allow End-Users to Disable Remote Control, and Remote Control Performance Metrics
-
-
-
Scripts for MacOS
Nope. Still not possible.
-
Can't uninstall or reinstall
First off, you should never call Win32_Product. It's slow for starters, but it also triggers Windows to perform a Windows Installer reconfiguration on EVERY single msi app installed on the system. This is terrible and could cause apps to do a repair if it thinks it found an issue. The impact and possible damage that could be caused by running that command is not worth the hassle. I highly recommend instead you run this: Get-ItemProperty "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*" | Where-Object {$_.DisplayName -eq "Pulseway"} You can grab the UninstallString and perform an uninstall that way. LMK if you need further assistance scripting this.
-
Powershell use variables
lol nope. This is not possible unfortunately, but it's something that is constantly requested by users of Pulseway. The thread below contains a list of improvements and links to the Feature Upvote section so you can upvote this very idea.
-
-
Q - Installing Pulseway during AutoPilot enrollment?
Yea no problem. If you go into Onboarding - Downloads - And then select your Windows download, you can make one for each customer, or if it's just for your internal machines (if that's what you use Pulseway for) then you just make the one, and you just do "Copy Link" and throw that link into your PowerShell script, call the URL to download the file, and then run it. It's an MSI so you can do silent install and it will fully register with Pulseway.
-
-
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 }
-
Patch Management: Reboot if Required
I haven't experience these issues personally, but the only other thing I can offer as a possible solution than, is to tell your patch policy to NOT reboot anything, and then schedule a job/task on a recurring schedule to reboot the devices at a specific time.
-
Q - Installing Pulseway during AutoPilot enrollment?
I do not have the exact steps, and it's been awhile since I've actually done much inside Intune, but I do know using Intune, you can push scripts to systems. Pulseway can definitely be scripted using PowerShell, so there should be no reason you can't push Pulseway to the machine once it's inside Intune. I've pushed other RMMs in the past, such as Datto RMM via Intune.
- Manage Windows Processes via Endpoint Policies