<?xml version="1.0"?>
<rss version="2.0"><channel><title>PowerShell Latest Topics</title><link>https://forum.pulseway.com/forum/80-powershell/</link><description>PowerShell Latest Topics</description><language>en</language><item><title>PowerShell Script to Eject USB Storage Devices via Pulseway Automation</title><link>https://forum.pulseway.com/topic/5290-powershell-script-to-eject-usb-storage-devices-via-pulseway-automation/</link><description><![CDATA[<p>
	Hi everyone,
</p>

<p>
	I wanted to share a simple PowerShell script that you can use within <strong>Pulseway Automation</strong> to remotely eject any <strong>USB storage devices</strong> connected to a system. This can be helpful for security-conscious environments or in scenarios where USB usage needs to be tightly controlled.
</p>

<p>
	Works well in combination with the <strong style="color:rgb(0,0,0);font-size:13px;">Disable USB Storage Access</strong><span> script in the built in category.</span>
</p>

<p>
	 
</p>

<p>
	The script uses <code>Shell.Application</code> to trigger the native <strong>"Eject"</strong> action for removable drives (DriveType = 2). Here's the version that loops through all mounted USB volumes:
</p>

<pre><span class="ipsEmoji">✅</span> Works great in Pulseway automation tasks
<span class="ipsEmoji">💡</span> You can modify it to eject a specific drive letter if needed
</pre>

<div>
	<div>
		powershell
	</div>

	<div>
		<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln"># Eject all USB volumes using Shell.Application COM object
$Eject = New-Object -ComObject Shell.Application

# Get all removable (DriveType = 2) volumes with drive letters
$volumes = Get-WmiObject -Class Win32_Volume | Where-Object { $_.DriveType -eq 2 -and $_.DriveLetter }

foreach ($vol in $volumes) {
    Write-Host "Ejecting drive $($vol.DriveLetter)..."
    $Eject.NameSpace(17).ParseName($vol.DriveLetter).InvokeVerb("Eject")
}</span></pre>
	</div>
</div>

<p>
	 
</p>

<p>
	<strong>Notes:</strong>
</p>

<p>
	During my testing, I've seen that USB devices will not be removed if a process is running from the disks in question.<br />
	In other words, if there is a write/read process running, the disk is not ejected.
</p>

<p>
	 
</p>

<p>
	Let me know if you have questions or enhancements!
</p>
]]></description><guid isPermaLink="false">5290</guid><pubDate>Wed, 02 Apr 2025 07:55:06 +0000</pubDate></item><item><title>HELP - Successfully runs the Enable SSO PowerShell script via Pulseway RMM, but does not execute on the endpoint</title><link>https://forum.pulseway.com/topic/4778-help-successfully-runs-the-enable-sso-powershell-script-via-pulseway-rmm-but-does-not-execute-on-the-endpoint/</link><description><![CDATA[<p>
	HI All,
</p>

<p>
	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.
</p>

<p>
	<strong>PowerShell Script:</strong>
</p>

<p>
	# Set variables to indicate value and key to set<br />
	$RegistryPath = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\microsoftazuread-sso.com\autologon'<br />
	$Name         = 'https'<br />
	$Value        = '1'<br />
	$Path         = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\microsoftazuread-sso.com\autologon'
</p>

<p>
	# Create the keys if it does not exist<br />
	If (-NOT (Test-Path $RegistryPath)) {<br />
	  New-Item -Path "$Path" -Force | Out-Null<br />
	}<br />
	# Now set the value<br />
	New-ItemProperty -Path $RegistryPath -Name $Name -Value $Value -PropertyType DWORD -Force
</p>

<p>
	 
</p>

<p>
	 
</p>
]]></description><guid isPermaLink="false">4778</guid><pubDate>Thu, 11 Aug 2022 15:50:41 +0000</pubDate></item><item><title>Bitdefender (password secured) distribution and uninstall</title><link>https://forum.pulseway.com/topic/5350-bitdefender-password-secured-distribution-and-uninstall/</link><description><![CDATA[<p>Hi</p><p></p><p>I am experimenting with Bitdefender distribution. At our company, Bitdefender packages are protected against unauthorized uninstallation by a password. When I initiate uninstallation via the Pulseway portal, it fails. I would still like to automate this process.</p><p></p><p>What would be the best way to do this? A powershell script with an integrated password, or is there a possibility via workflow?</p><p></p><p>Many thanks in advance.</p><p>Best regards, Geko</p>]]></description><guid isPermaLink="false">5350</guid><pubDate>Mon, 28 Jul 2025 08:29:09 +0000</pubDate></item><item><title>Powershell Script works when run Locally but not through pulseway.</title><link>https://forum.pulseway.com/topic/5054-powershell-script-works-when-run-locally-but-not-through-pulseway/</link><description><![CDATA[<p>
	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.
</p>

<p>
	 
</p>

<p>
	Thanks,
</p>

<div style="background-color:#ffffff;color:#000000;font-size:1.15em;padding:5px;">
	<div title="Output">
		<div style="font-size:13px;">
			<span style="color:#000000;">Output</span>
		</div>
	</div>
</div>

<div style="background-color:#ffffff;color:rgba(0,0,0,0.87);font-size:13px;">
	<ul>
		<li>
			<div>
				<div style="border-bottom:1px solid #eeeeee;color:#000000;padding:6px 10px;">
					<div>
						<div>
							<div>
								<span style="color:#000000;font-size:12px;" title="">At C:\Program Files\Pulseway\automation_6d035661_a3a3_4e34_b6c2_8e997a18878a.ps1:5 char:149 </span>
							</div>

							<div>
								<span style="color:#000000;font-size:12px;" title="">+ ... owsdesktop-runtime-6.0.24-win-x64.exe" -wait -ArgumentList '/S /v/qn' </span>
							</div>

							<div>
								<span style="color:#000000;font-size:12px;" title="">+ ~ </span>
							</div>

							<div>
								<span style="color:#000000;font-size:12px;" title="">You must provide a value expression following the '/' operator. At C:\Program Files\Pulseway\automation_6d035661_a3a3_4e34_b6c2_8e997a18878a.ps1:5 char:149 </span>
							</div>

							<div>
								<span style="color:#000000;font-size:12px;" title="">+ ... owsdesktop-runtime-6.0.24-win-x64.exe" -wait -ArgumentList '/S /v/qn' </span>
							</div>

							<div>
								<span style="color:#000000;font-size:12px;" title="">+ ~ </span>
							</div>

							<div>
								<span style="color:#000000;font-size:12px;" title="">Unexpected token 'S' in expression or statement. At C:\Program Files\Pulseway\automation_6d035661_a3a3_4e34_b6c2_8e997a18878a.ps1:17 char:212 </span>
							</div>

							<div>
								<span style="color:#000000;font-size:12px;" title="">+ ... portAssistConfiguration.mst" DEPLOYMENTKEY="855asd$#" /norestart /qn'</span>
							</div>

							<div>
								<span style="color:#000000;font-size:12px;" title="">+ ~ </span>
							</div>

							<div>
								<span style="color:#000000;font-size:12px;" title="">The string is missing the terminator: '. </span>
							</div>

							<div>
								<span style="color:#000000;font-size:12px;" title="">+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException </span>
							</div>

							<div>
								<span style="color:#000000;font-size:12px;" title="">+ FullyQualifiedErrorId : ExpectedValueExpression </span>
							</div>
						</div>
					</div>
				</div>
			</div>
		</li>
	</ul>
</div>

<p>
	 
</p>

<pre class="ipsCode prettyprint lang-html prettyprinted"><span class="pln">#Runs file from Fileserv01 if it can
$folder = '\\Fileserv01\Public\IT\Software\DellSupport For Business\SupportAssist.bat
if (Test-Path -Path $folder) {
	PowerShell.exe -ExecutionPolicy Bypass -File "\\Fileserv01\Public\IT\Software\DellSupport For Business\SupportAssistCleanup.ps1"
	Start-Process -FilePath "\\Fileserv01\Public\IT\Software\DellSupport For Business\windowsdesktop-runtime-6.0.24-win-x64.exe" -wait -ArgumentList '/S /v/qn'
	Start-Process msiexec -wait -argumentlist '/i "\\Fileserv01\Public\IT\Software\DellSupport For Business\SupportAssistInstaller-x64.msi" TRANSFORMS="\\Fileserv01\Public\IT\Software\DellSupport For Business\SupportAssistConfiguration.mst" DEPLOYMENTKEY="855asd$#" /norestart /qn'    
}
else {
	New-Item -path "C:\Temp\SupportBusiness -Itemtype Directory
	Invoke-WebRequest -Uri "https://www.dropbox.com/scl/fi/nxdsz42jkcu5ss4tpdsvf/SupportAssistCleanup.ps1?rlkey=lidz0ms8aatgwhiv8dtvxr6dw&amp;dl=1" -Destination "c:\temp\SupportBusiness\SupportAssistCleanup.ps1"
	Invoke-WebRequest -Uri "https://www.dropbox.com/scl/fi/j75w4oqajfbjpw2sdrpxg/SupportAssistConfiguration.mst?rlkey=he4shs9vzts47reav8d5ziv6x&amp;dl=1" -Destination "c:\temp\SupportBusiness\SupportAssistConfiguration.mst"
    Invoke-WebRequest -Uri "https://www.dropbox.com/scl/fi/cuyvomxuui4z29bpk9x2r/SupportAssistInstaller-x64.msi?rlkey=g1lmxvprpb0nv1wxvtefwizii&amp;dl=1" -Destination "c:\temp\SupportBusiness\SupportAssistInstaller-x64.msi"
    Invoke-WebRequest -Uri "https://www.dropbox.com/scl/fi/p7ctmo837kv9cnsyi6779/windowsdesktop-runtime-6.0.24-win-x64.exe?rlkey=e0ehydmwf1t86bu461b3xp1t9&amp;dl=1" -Destination "c:\temp\SupportBusiness\windowsdesktop-runtime-6.0.24-win-x64.exe"
    PowerShell.exe -ExecutionPolicy Bypass -File "c:\temp\SupportBusiness\SupportAssistCleanup.ps1"
	Start-Process -FilePath "\\Fileserv01\Public\IT\Software\DellSupport For Business\windowsdesktop-runtime-6.0.24-win-x64.exe" -wait -ArgumentList '/S /v/qn'
    Start-Process -FilePath "c:\temp\SupportBusiness\windowsdesktop-runtime-6.0.24-win-x64.exe" -wait -ArgumentList '/S /v/qn'
	Start-Process msiexec -wait -argumentlist '/i "c:\temp\SupportBusiness\SupportAssistInstaller-x64.msi" TRANSFORMS="c:\temp\SupportBusiness\SupportAssistConfiguration.mst" DEPLOYMENTKEY="855asd$#" /norestart /qn'    
	
    #Removes Folder after install
    Remove-Item "c:\temp\SupportBusiness" -recurse
}</span></pre>

<p>
	 
</p>
]]></description><guid isPermaLink="false">5054</guid><pubDate>Fri, 15 Mar 2024 21:36:56 +0000</pubDate></item><item><title>Disable Services monitoring for specific Services</title><link>https://forum.pulseway.com/topic/2152-disable-services-monitoring-for-specific-services/</link><description><![CDATA[<p>
	When u use the built-in script "Add Automatically Started Services in Pulseway" some services wil be monitored that are triggert and not always on.
</p>

<p>
	This wil result in unwanted notifications.
</p>

<p>
	The first variable has the servicenames you want to disable.
</p>

<pre class="ipsCode">
$services = @('gupdate', 'ShellHWDetection', 'sppsvc', 'RemoteRegistry', 'MapsBroker', 'tiledatamodelsvc', 'WbioSrvc', 'WinDefend', 'CDPSvc')
$servicesRegex = [string]::Join('|', $services) # create the regex
$regservices = Get-ItemProperty "HKLM:\Software\MMSOFT Design\PC Monitor\Services"
$regservicesSplit = $regservices  -split ";"

foreach ($regservice in $regservicesSplit) {
	If ($regservice -match $servicesRegex ) {
		$servicesSplit = $regservice -split "="
		$servicesTrim = $servicesSplit[0]
		$servicesTrim = $servicesTrim.Trim()
        Remove-ItemProperty -Path "HKLM:\Software\MMSOFT Design\PC Monitor\Services" -Name $servicesTrim
        Write-Host $regservice " Verwijderd"
	}
}</pre>

<p>
	Hope it helps.
</p>
]]></description><guid isPermaLink="false">2152</guid><pubDate>Mon, 27 Nov 2017 14:07:41 +0000</pubDate></item><item><title>Execute Script with Powershell 7</title><link>https://forum.pulseway.com/topic/5253-execute-script-with-powershell-7/</link><description><![CDATA[<p>
	
</p>

<p style="color:#000000;">
	Hello Pulseway Support,
</p>

<p style="color:#000000;">
	I am currently using the Pulseway Task module to execute PowerShell scripts. My scripts require<span> </span><strong>PowerShell 7 (pwsh.exe)</strong><span> </span>to function properly, as certain modules like<span> </span><strong>HuduAPI</strong><span> </span>are not supported in PowerShell 5.1.
</p>

<p style="color:#000000;">
	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.
</p>

<p style="color:#000000;">
	I would like to request guidance on how to:
</p>

<ol style="color:#000000;">
	<li>
		Configure Pulseway to explicitly run scripts using PowerShell 7 (<code>pwsh.exe</code>).
	</li>
	<li>
		Verify if the Pulseway PowerShell module supports PowerShell 7, and if not, what workaround or timeline is available to ensure compatibility.
	</li>
</ol>

<p style="color:#000000;">
	Please let me know how I can resolve this issue or if Pulseway tasks can be configured to execute PowerShell 7 scripts ( Powershell 7 is installed at the endpoints and the script executes as expected locally).
</p>

<p style="color:#000000;">
	Thank you for your support.
</p>

<p style="color:#000000;">
	<strong>Best regards,</strong>
</p>
]]></description><guid isPermaLink="false">5253</guid><pubDate>Sun, 15 Dec 2024 16:42:47 +0000</pubDate></item><item><title>Report of devices CPU information - specifically the generation</title><link>https://forum.pulseway.com/topic/5217-report-of-devices-cpu-information-specifically-the-generation/</link><description><![CDATA[<p>
	Is it possible to get a report of all devices CPU generation?
</p>
]]></description><guid isPermaLink="false">5217</guid><pubDate>Wed, 02 Oct 2024 11:25:51 +0000</pubDate></item><item><title>Install Sentinel One via Powershell script</title><link>https://forum.pulseway.com/topic/4862-install-sentinel-one-via-powershell-script/</link><description><![CDATA[<p>
	Does anyone have a working script to install Sentinel One silently on managed machines?
</p>
]]></description><guid isPermaLink="false">4862</guid><pubDate>Fri, 17 Feb 2023 05:46:21 +0000</pubDate></item><item><title>A How to Guide on Managing Bitlocker Encryption with Pulseway</title><link>https://forum.pulseway.com/topic/4081-a-how-to-guide-on-managing-bitlocker-encryption-with-pulseway/</link><description><![CDATA[<p>
	A number of folks have requested the ability to manage bitlocker with Pulseway, so I thought I would share how I am doing this with Powershell scripts and Pulseway's custom fields feature. 
</p>

<p>
	First, you will need to create a custom fields in Pulseway (Automation Tab --&gt; Custom Fields). This fields should be a text variable that has the system context. I personally have 3, BitlockerKey, Protection Status (On/Off), and BitLockerVolumeStatus. BitlockerKey is probably the one most people will care about. . 
</p>

<p>
	<img alt="image.png.7df3b09cd4bb052e976c4122fb273cac.png" class="ipsImage ipsImage_thumbnailed" data-fileid="860" width="590" src="https://forum.pulseway.com/uploads/monthly_2021_04/image.png.7df3b09cd4bb052e976c4122fb273cac.png" loading="lazy" height="678.5">
</p>

<p>
	After Configuring the Custom fields, you will then need to create your PowerShell script. Notice you have inputs and outputs. You will want to click New for output. Name it what you wish, ensure it is a text variable type, and then turn on "set Custom Field Value"
</p>

<p>
	<img alt="image.png.1d370e8645f049607d6737568ed275a2.png" class="ipsImage ipsImage_thumbnailed" data-fileid="861" width="507" src="https://forum.pulseway.com/uploads/monthly_2021_04/image.png.1d370e8645f049607d6737568ed275a2.png" loading="lazy" height="517.14">
</p>

<p>
	Now we toggle the flag for it being a windows powershell script. You should see in the top that it has created a comment #outputs with your defined output variable assigned the default value you gave it. 
</p>

<p>
	Now we have our script: Update as of 4/18/2021, script now tracks 3 custom fields and will account for if a drive is encrypted but protection is off and no protectors have been added yet.
</p>

<pre class="ipsCode">
# Outputs
$ProtectionStatus = "na"
$recoveryKey = "na"
$VolumeStatus = "na"
#region functions
function Start-BitlockerEnable {
    Enable-BitLocker -MountPoint c: -EncryptionMethod XtsAes128 -UsedSpaceOnly -TpmProtector
    $today = Get-Date
    $scheduledtime = $today.Date.AddHours(23)
    [int]$SecondsToMidnight = ($scheduledtime - $today).TotalSeconds
    shutdown /r /t $SecondsToMidnight
    msg.exe * "Bitlocker Encryption has been enabled. A reboot is needed before the encryption will apply and has been scheduled for $scheduledtime local time. You can reboot before this if you prefer."
    #start-sleep 90
    #msg.exe * "This Computer will reboot in 30 seconds to bitlocker Encryption"
    #start-sleep 30
    #Restart-computer -force
}
#endregion functions

#region execution
$BitLockerStatus = Get-BitLockerVolume -MountPoint c:
if ((Get-Tpm).tpmpresent -eq $true) {
    #If Volume is in the process of encrypting or decrypting the Volume status will not say fully. Don't make changes when it changes
    if (($BitLockerStatus.ProtectionStatus -match 'off') -and ($bitlockerstatus.VolumeStatus -notmatch 'progress')) {
        #NoBitlocker is enabled so run it.
        if ($BitLockerStatus.VolumeStatus -eq 'FullyDecrypted') {
            $recoverykey = $BitLockerStatus.KeyProtector | Select-Object -ExpandProperty recoverypassword
            if(!($recoveryKey)){
                Add-BitLockerKeyProtector -MountPoint c: -RecoveryPasswordProtector
            }
            $newStatus = Get-BitLockerVolume -MountPoint c:
            $recoverykey = $newStatus.KeyProtector | Select-Object -ExpandProperty recoverypassword
            Start-Process -FilePath "$env:PWY_HOME\CLI.exe" -ArgumentList ("setVariable recoverykey ""$recoverykey""") -Wait
            if ($newStatus.KeyProtector -match 'Recovery') {
                Start-BitlockerEnable
            }
        }
        #Bitlocker must be Partially enabled where drive is fully encrypted, but protection is off and no protectors exist.
        #Typically this is using xtsAES128 so you may wish to disable-bitlocker, then re-enable it with your protectors and prefered encryption level.
        else{
            Disable-BitLocker -MountPoint 'c:'
            $decryptInProgress = $true 
            While($decryptInProgress -eq $true){
                $decryptstatus = Get-BitLockerVolume -MountPoint 'c:'
                if($decryptstatus.VolumeStatus -match 'progress'){
                    Start-Sleep 2
                }
                else{
                    $decryptInProgress = $false
                }
            }
            Add-BitLockerKeyProtector -MountPoint c: -RecoveryPasswordProtector
            $newStatus = Get-BitLockerVolume -MountPoint c:
            $recoverykey = $newStatus.KeyProtector | Select-Object -ExpandProperty recoverypassword
            Start-Process -FilePath "$env:PWY_HOME\CLI.exe" -ArgumentList ("setVariable recoverykey ""$recoverykey""") -Wait
            if ($newStatus.KeyProtector -match 'Recovery') {
                Start-BitlockerEnable
            }
        }
    }
    #BitLocker should already be enabled so log keys, volume status etc. 
    else {
        $recoverykey = $BitLockerStatus.KeyProtector | Select-Object -ExpandProperty recoverypassword
        $ProtectionStatus = $BitLockerStatus.ProtectionStatus
        $VolumeStatus = $BitLockerStatus.VolumeStatus
        Start-Process -FilePath "$env:PWY_HOME\CLI.exe" -ArgumentList ("setVariable recoverykey ""$recoverykey""") -Wait
        Start-Process -FilePath "$env:PWY_HOME\CLI.exe" -ArgumentList ("setVariable ProtectionStatus ""$ProtectionStatus""") -Wait
        Start-Process -FilePath "$env:PWY_HOME\CLI.exe" -ArgumentList ("setVariable VolumeStatus ""$VolumeStatus""") -Wait
    }
}
else {
    $recoverykey = 'NoTpm'
    Start-Process -FilePath "$env:PWY_HOME\CLI.exe" -ArgumentList ("setVariable recoveryKey ""$recoveryKey""") -Wait
}
#endregion execution

</pre>

<p>
	You can modify the above script as you wish. I personally have gone with a bit of a cautious approach where it will not skip the hardware check which will reboot the pc, but for me I prefer this approach to having it encrypt the drive without checking tpm is all good which could then result in the drive being encrypted and locking out the end user. 
</p>

<p>
	 
</p>

<p>
	At the end of all this, you now should be able to Both Enable bitlocker encryption as well as pull your recovery keys from pulseway like so <span>:</span>
</p>

<p>
	<img alt="image.png.55c716a1614c678458c6340fa85a3b16.png" class="ipsImage ipsImage_thumbnailed" data-fileid="862" width="675" src="https://forum.pulseway.com/uploads/monthly_2021_04/image.png.55c716a1614c678458c6340fa85a3b16.png" loading="lazy" height="202.5"><br>
	 
</p>
]]></description><guid isPermaLink="false">4081</guid><pubDate>Fri, 16 Apr 2021 18:21:30 +0000</pubDate></item><item><title>Install General Programs</title><link>https://forum.pulseway.com/topic/3018-install-general-programs/</link><description><![CDATA[<p>
	Are any of you using Pulseway to install applications not currently installed by third party management? I have applications that I need to install on my network that I would like to use Pulseway Automation for. I'm currently using PDQ Deploy but would like to get rid of it. Any suggestions on how to use Pulseway in this way? I attempted to work with support because I am getting a 1619 error... I tried everything I could find online to resolve this issue, but continued to get this error... I reached out to Pulseway Support, but they were less than helpful. 
</p>

<p>
	 
</p>

<p>
	Any thoughts? 
</p>]]></description><guid isPermaLink="false">3018</guid><pubDate>Tue, 22 Oct 2019 14:39:33 +0000</pubDate></item><item><title>Powershell script to change registry values</title><link>https://forum.pulseway.com/topic/4960-powershell-script-to-change-registry-values/</link><description><![CDATA[<p>
	Hi,
</p>

<p>
	 
</p>

<p>
	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.
</p>

<p>
	I have also tried it from a batch script, but it does not work either.
</p>

<p>
	Both scripts work fine when running them directly from the local computer.
</p>

<p>
	 
</p>

<p>
	The Powershell script it as follows:
</p>

<p>
	#Values to customize<br />
	$ScreenSaveActive = 1 #set to 1 if you want the screensaver enabled, 0 to disable<br />
	$TimeOutValue = 60 # number of idle seconds before screensaver gets active<br />
	$ScreenSaverFile = "C:\Windows\system32\mystify.scr" # full path to screensaver file<br />
	$ScreenSaverIsSecure = 1 # set to 1 if you need a password to get out of screensaver, a.k.a. unlocking the pc
</p>

<p>
	#If the screensaver is not compliant with $ScreenSaveActive, we reset it to the preferred value<br />
	if((Get-ItemProperty -Path "hkcu:control panel\desktop" -Name "ScreenSaveActive").ScreenSaveActive -ne $ScreenSaveActive)<br />
	    { Set-ItemProperty -Path "hkcu:control panel\desktop" -Name "ScreenSaveActive" -Value $ScreenSaveActive }
</p>

<p>
	#If user set screensaver timeout to a value larger than 1200 seconds (20 minutes), we set the value back to 1200 seconds<br />
	[int]$Current_TimeOutValue = (Get-ItemProperty -Path "hkcu:control panel\desktop" -Name "ScreenSaveTimeOut").ScreenSaveTimeOut<br />
	if($Current_TimeOutValue -eq 0 -OR $Current_TimeOutValue -gt 1200)<br />
	   { Set-ItemProperty -Path "hkcu:control panel\desktop" -Name "ScreenSaveTimeOut" -value 1200 }
</p>

<p>
	#If no screensaver file is set or if the path doesn't exist anymore, we set it to the blank screensaver<br />
	$Current_ScreenSaverFile = (Get-ItemProperty -Path "hkcu:control panel\desktop" -Name "SCRNSAVE.EXE")."SCRNSAVE.EXE"<br />
	if($Current_ScreenSaverFile -eq "" -OR (Test-Path $Current_ScreenSaverFile) -eq $false)<br />
	    { Set-ItemProperty -Path "hkcu:control panel\desktop" -Name "SCRNSAVE.EXE" -Value $ScreenSaverFile }
</p>

<p>
	#If the screensaver "lock" is not compliant with $ScreenSaverIsSecure, we reset it to the preferred value<br />
	if((Get-ItemProperty -Path "hkcu:control panel\desktop" -Name "ScreenSaverIsSecure").ScreenSaverIsSecure -ne $ScreenSaverIsSecure)<br />
	    { Set-ItemProperty -Path "hkcu:control panel\desktop" -Name "ScreenSaverIsSecure" -Value $ScreenSaverIsSecure }
</p>

<p>
	#Before our changes become active in the current Windows session, we need to run the following command more than 3 times<br />
	for ($i=1; $i -le 4; $i++)<br />
	    { rundll32.exe user32.dll, UpdatePerUserSystemParameters }<br />
	 
</p>

<p>
	 
</p>

<p>
	I have also tried this from batch script, but it does not work either.
</p>

<p>
	@echo off<br />
	reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v SCRNSAVE.EXE /t REG_SZ /d C:\Windows\System32\Mystify.scr /f<br />
	reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v ScreenSaveActive /t REG_SZ /d 1 /f<br />
	reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v ScreenSaveTimeOut /t REG_SZ /d 60 /f<br />
	reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v ScreenSaverIsSecure /t REG_SZ /d 1 /f<br />
	 
</p>

<p>
	 
</p>

<p>
	 
</p>
]]></description><guid isPermaLink="false">4960</guid><pubDate>Tue, 12 Sep 2023 10:15:25 +0000</pubDate></item><item><title>Internet Speed Test</title><link>https://forum.pulseway.com/topic/4995-internet-speed-test/</link><description><![CDATA[<p>
	<strong>Hello Everyone ! </strong>
</p>

<p>
	 
</p>

<p>
	I could find a script that is going to show the internet speed for end-users through Powershell. 
</p>

<p>
	 
</p>

<p>
	You can use the follow script to also send an automated email with the results <span>: </span>
</p>

<p>
	 
</p>

<p>
	 
</p>

<pre style="background-color:#ffffff;border:0px;color:#4a4a4a;font-size:12px;padding:0px 10px 10px;">#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 = &amp; $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</pre>
]]></description><guid isPermaLink="false">4995</guid><pubDate>Thu, 02 Nov 2023 20:24:40 +0000</pubDate></item><item><title>Microsoft Store application install from pulseway</title><link>https://forum.pulseway.com/topic/4992-microsoft-store-application-install-from-pulseway/</link><description><![CDATA[<p>
	I made a script that installs lenovo vantage from microsoft store:
</p>

<p>
	winget install "Lenovo Vantage" --source=msstore --accept-package-agreements --accept-source-agreements
</p>

<p>
	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:
</p>

<p>
	 
</p>

<p>
	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=msstore --accept-package-agr ... + ~~~~~~ + CategoryInfo : ObjectNotFound: (winget:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
</p>

<p>
	I already tried to run it from a workflow as a run shell command as current logged in user and still did not work.
</p>
]]></description><guid isPermaLink="false">4992</guid><pubDate>Tue, 31 Oct 2023 13:36:56 +0000</pubDate></item><item><title>Restart EXPLORER.EXE current logged in user</title><link>https://forum.pulseway.com/topic/3549-restart-explorerexe-current-logged-in-user/</link><description><![CDATA[<p>
	This will stop and restart EXPLORER.EXE for the currently logged in user.
</p>

<p>
	 
</p>

<p>
	 
</p>

<p>
	#By eDecisions
</p>

<p style="background-color:#ffffff;color:#353c41;font-size:14px;">
	$TasknameStop = "ExplorerStop"<br>
	$TasknameStart = "ExplorerStart"<br>
	$lastlogon = (New-Object -ComObject WScript.Shell).RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\LastLoggedOnUser")
</p>

<p style="background-color:#ffffff;color:#353c41;font-size:14px;">
	SCHTASKS /CREATE /sc ONCE /st 00:00 /TN $TasknameStop /RU $lastlogon /TR "taskkill /f /im explorer.exe"<br>
	SCHTASKS /CREATE /sc ONCE /st 00:00 /TN $TasknameStart /RU $lastlogon /TR "explorer.exe" <br>
	start-sleep -s 1<br>
	schtasks /Run /TN $TasknameStop<br>
	start-sleep -s 1<br>
	schtasks /Run /TN $TasknameStart<br>
	start-sleep -s 1<br>
	schtasks /delete /tn $TasknameStop /f<br>
	schtasks /delete /tn $TasknameStart /f
</p>
]]></description><guid isPermaLink="false">3549</guid><pubDate>Wed, 05 Aug 2020 15:23:09 +0000</pubDate></item><item><title>Run powershell on user site elevated user.</title><link>https://forum.pulseway.com/topic/4955-run-powershell-on-user-site-elevated-user/</link><description><![CDATA[<p>
	Deze script werkt als het gerunt is van een user account maar niet vanuit pulseway.
</p>

<p>
	 
</p>

<p>
	$password = ConvertTo-SecureString "your_password" -AsPlainText -Force<br />
	$credentials = New-Object System.Management.Automation.PSCredential("your_username", $password)
</p>

<p>
	$scriptBlock = {<br />
	    Start-Process powershell -Verb RunAs<br />
	    Write-Host "Running with elevated privileges!"<br />
	}
</p>

<p>
	$encodedCommand = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($scriptBlock))<br />
	Start-Process powershell.exe -ArgumentList "-NoProfile -EncodedCommand $encodedCommand" -Credential $credentials<br />
	 
</p>
]]></description><guid isPermaLink="false">4955</guid><pubDate>Mon, 04 Sep 2023 14:38:32 +0000</pubDate></item><item><title>Running PS script from Automation</title><link>https://forum.pulseway.com/topic/4945-running-ps-script-from-automation/</link><description><![CDATA[<p>
	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 
</p>

<p>
	New-Item -Path "HKCU:\SOFTWARE\Microsoft\Office\16.0\Outlook\Profiles" -Name "GO_365" -Force
</p>

<p>
	Set-ItemProperty "HKCU:\SOFTWARE\Microsoft\Office\16.0\Outlook" -Name "DefaultProfile" -Value "GO_365"<br />
	 
</p>
]]></description><guid isPermaLink="false">4945</guid><pubDate>Fri, 25 Aug 2023 07:40:31 +0000</pubDate></item><item><title>HELP - Pulseway Tasks User Registry Update</title><link>https://forum.pulseway.com/topic/4910-help-pulseway-tasks-user-registry-update/</link><description><![CDATA[<p>
	Hi Everyone!
</p>

<p>
	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.
</p>

<p>
	After searching through the forums, I found someone who ran into a <a href="https://forum.pulseway.com/topic/4778-help-successfully-runs-the-enable-sso-powershell-script-via-pulseway-rmm-but-does-not-execute-on-the-endpoint/" rel="">similar issue</a>. 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.
</p>

<p>
	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?
</p>

<p>
	 
</p>

<p>
	<strong>SCRIPT:</strong>
</p>

<p>
	$trustedPath = "C:\Users\Public\Pictures\Security-Photos"
</p>

<p style="font-size:11pt;">
	$excelPath = "HKCU:\Software\Microsoft\Office\16.0\Excel\Security\Trusted Locations"
</p>

<p style="font-size:11pt;">
	New-Item -Path $excelPath -Name "Location1" -Force | Out-Null
</p>

<p style="font-size:11pt;">
	Set-ItemProperty -Path "$excelPath\Location1" -Name "Path" -Value $trustedPath
</p>

<p style="font-size:11pt;">
	Set-ItemProperty -Path "$excelPath\Location1" -Name "AllowSubfolders" -Value 1
</p>

<p style="font-size:11pt;">
	$accessPath = "HKCU:\Software\Microsoft\Office\16.0\Access\Security\Trusted Locations"
</p>

<p style="font-size:11pt;">
	New-Item -Path $accessPath -Name "Location1" -Force | Out-Null
</p>

<p style="font-size:11pt;">
	Set-ItemProperty -Path "$accessPath\Location1" -Name "Path" -Value $trustedPath
</p>

<p style="font-size:11pt;">
	Set-ItemProperty -Path "$accessPath\Location1" -Name "AllowSubfolders" -Value 1
</p>

<p>
	 
</p>

<p>
	 
</p>
]]></description><guid isPermaLink="false">4910</guid><pubDate>Thu, 22 Jun 2023 18:31:22 +0000</pubDate></item><item><title>Unable to use "param" with Powershell Scripts</title><link>https://forum.pulseway.com/topic/4886-unable-to-use-param-with-powershell-scripts/</link><description><![CDATA[<p>
	Up until the most recent update to Pulseway, I was able to install the Huntress agent via their provided Powershell script at: <a href="https://github.com/huntresslabs/deployment-scripts/blob/main/Powershell/InstallHuntress.powershellv2.ps1" rel="external nofollow">https://github.com/huntresslabs/deployment-scripts/blob/main/Powershell/InstallHuntress.powershellv2.ps1</a>
</p>

<p>
	This script includes the "param" command, which has to be the first line of the script in order to run. 
</p>

<p>
	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:<br>
	<a class="ipsAttachLink ipsAttachLink_image" href="https://forum.pulseway.com/uploads/monthly_2023_04/PastedGraphic1.png.94bc3ab86dbd395cde01d0f5906301a6.png" data-fileid="1118" data-fileext="png" rel=""><img class="ipsImage ipsImage_thumbnailed" data-fileid="1118" width="1000" alt="PastedGraphic1.thumb.png.57cf7104efe98d6d7624bcfcc59b537e.png" src="https://forum.pulseway.com/uploads/monthly_2023_04/PastedGraphic1.thumb.png.57cf7104efe98d6d7624bcfcc59b537e.png" loading="lazy" height="240"></a>
</p>

<p>
	This prevents the script from running correctly, see screenshot below of the error:<br>
	<img class="ipsImage ipsImage_thumbnailed" data-fileid="1119" width="718" alt="PastedGraphic.png.b8423716bb785b176d22c5dfbd3c79ac.png" src="https://forum.pulseway.com/uploads/monthly_2023_04/PastedGraphic.png.b8423716bb785b176d22c5dfbd3c79ac.png" loading="lazy" height="179.5">
</p>

<p>
	 
</p>

<p>
	Please note that the powershell output shows the error on line 32, whereas in the script it is on line 31, which is what led me on the path to find that the extra line was being added at the top of the script by Pulseway. 
</p>

<p>
	Is there a way to prevent that first line from being added to the script, or do I need to contact Huntress and have them rework a different version of the script that doesn't include the "param" command?
</p>

<p>
	Cheers.
</p>
]]></description><guid isPermaLink="false">4886</guid><pubDate>Wed, 19 Apr 2023 03:35:56 +0000</pubDate></item><item><title>Query do all users have a Password</title><link>https://forum.pulseway.com/topic/4892-query-do-all-users-have-a-password/</link><description><![CDATA[<p>
	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.<br />
	<br />
	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.
</p>

<p>
	 
</p>

<pre class="ipsCode prettyprint lang-c prettyprinted"><span class="typ">Add</span><span class="pun">-</span><span class="typ">Type</span><span class="pln"> </span><span class="pun">-</span><span class="typ">AssemblyName</span><span class="pln"> </span><span class="typ">System</span><span class="pun">.</span><span class="typ">DirectoryServices</span><span class="pun">.</span><span class="typ">AccountManagement</span><span class="pln">

$script </span><span class="pun">=</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
    </span><span class="typ">Param</span><span class="pun">(</span><span class="pln">$cred</span><span class="pun">)</span><span class="pln">

    </span><span class="kwd">try</span><span class="pun">{</span><span class="pln">
        $obj </span><span class="pun">=</span><span class="pln"> </span><span class="typ">New</span><span class="pun">-</span><span class="typ">Object</span><span class="pln"> </span><span class="typ">System</span><span class="pun">.</span><span class="typ">DirectoryServices</span><span class="pun">.</span><span class="typ">AccountManagement</span><span class="pun">.</span><span class="typ">PrincipalContext</span><span class="pun">(</span><span class="str">'machine'</span><span class="pun">,</span><span class="pln">$env</span><span class="pun">:</span><span class="typ">ComputerName</span><span class="pun">)</span><span class="pln">

        $obj</span><span class="pun">.</span><span class="typ">ValidateCredentials</span><span class="pun">(</span><span class="pln">$cred</span><span class="pun">.</span><span class="pln">username</span><span class="pun">,</span><span class="pln"> $cred</span><span class="pun">.</span><span class="typ">GetNetworkCredential</span><span class="pun">().</span><span class="pln">password</span><span class="pun">)</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
    </span><span class="kwd">catch</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
        </span><span class="kwd">if</span><span class="pun">(</span><span class="pln">$_</span><span class="pun">.</span><span class="typ">Exception</span><span class="pun">.</span><span class="typ">InnerException</span><span class="pln"> </span><span class="pun">-</span><span class="pln">like </span><span class="str">"*blank passwords aren't allowed*"</span><span class="pun">){</span><span class="pln">
            $true
        </span><span class="pun">}</span><span class="pln">
        </span><span class="kwd">else</span><span class="pun">{</span><span class="pln">
            </span><span class="typ">Write</span><span class="pun">-</span><span class="typ">Warning</span><span class="pln"> $_</span><span class="pun">.</span><span class="pln">exception</span><span class="pun">.</span><span class="pln">message
            $false
        </span><span class="pun">}</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
</span><span class="pun">}</span><span class="pln">

$userlist </span><span class="pun">=</span><span class="pln"> </span><span class="typ">Get</span><span class="pun">-</span><span class="typ">WmiObject</span><span class="pln"> win32_useraccount </span><span class="pun">-</span><span class="typ">Filter</span><span class="pln"> </span><span class="str">"LocalAccount=True AND disabled=False"</span><span class="pln">

</span><span class="pun">[</span><span class="pln">securestring</span><span class="pun">]</span><span class="pln">$blankpassword </span><span class="pun">=</span><span class="pln"> </span><span class="typ">New</span><span class="pun">-</span><span class="typ">Object</span><span class="pln"> securestring

$nopassword </span><span class="pun">=</span><span class="pln"> foreach</span><span class="pun">(</span><span class="pln">$user in $userlist</span><span class="pun">){</span><span class="pln">
    $credential </span><span class="pun">=</span><span class="pln"> </span><span class="typ">New</span><span class="pun">-</span><span class="typ">Object</span><span class="pln"> </span><span class="typ">System</span><span class="pun">.</span><span class="typ">Management</span><span class="pun">.</span><span class="typ">Automation</span><span class="pun">.</span><span class="typ">PSCredential</span><span class="pln"> </span><span class="pun">-</span><span class="typ">ArgumentList</span><span class="pln"> $user</span><span class="pun">.</span><span class="typ">Name</span><span class="pun">,</span><span class="pln">$blankpassword
    </span><span class="kwd">if</span><span class="pun">(.</span><span class="pln"> $script $credential</span><span class="pun">){</span><span class="pln">
        $user</span><span class="pun">.</span><span class="typ">Name</span><span class="pln">
    </span><span class="pun">}</span><span class="pln">
</span><span class="pun">}</span><span class="pln">

$offenders </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">if</span><span class="pln"> </span><span class="pun">(</span><span class="pln">$nopassword</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln"> $nopassword </span><span class="pun">-</span><span class="pln">join </span><span class="str">"`n"</span><span class="pln"> </span><span class="pun">}</span><span class="pln"> </span><span class="kwd">else</span><span class="pln"> </span><span class="pun">{</span><span class="pln"> </span><span class="str">"Secured"</span><span class="pln"> </span><span class="pun">}</span><span class="pln">
$offenders</span></pre>

<p>
	 
</p>
]]></description><guid isPermaLink="false">4892</guid><pubDate>Tue, 02 May 2023 17:42:54 +0000</pubDate></item><item><title>Change Endpoint Configuration via Powershell on Admin Console</title><link>https://forum.pulseway.com/topic/4873-change-endpoint-configuration-via-powershell-on-admin-console/</link><description><![CDATA[<p>
	HI Team
</p>

<p>
	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 &gt; Execute Powershell?<br>
	<br>
	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?
</p>

<p><a href="https://forum.pulseway.com/uploads/monthly_2023_03/Untitled.png.1865169213679718b1f057c307a768dc.png" class="ipsAttachLink ipsAttachLink_image"><img data-fileid="1109" src="https://forum.pulseway.com/uploads/monthly_2023_03/Untitled.png.1865169213679718b1f057c307a768dc.png" width="846" class="ipsImage ipsImage_thumbnailed" alt="Untitled.png" loading="lazy" height="642.96"></a></p>]]></description><guid isPermaLink="false">4873</guid><pubDate>Mon, 20 Mar 2023 20:51:48 +0000</pubDate></item><item><title>issue running cmdlet</title><link>https://forum.pulseway.com/topic/4738-issue-running-cmdlet/</link><description><![CDATA[<p>
	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
</p>

<p>
	 
</p>

<p>
	$ winget install Microsoft.PowerToys --source winget
</p>

<p>
	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.
</p>

<p>
	At line:1 char:1
</p>

<p>
	+ winget install Microsoft.PowerToys --source winget + ~~~~~~ + CategoryInfo : ObjectNotFound: (winget:String) [], CommandNotFoundException
</p>

<p>
	+ FullyQualifiedErrorId : CommandNotFoundException
</p>
]]></description><guid isPermaLink="false">4738</guid><pubDate>Mon, 16 May 2022 18:29:09 +0000</pubDate></item><item><title>Reg edit powershell scripts</title><link>https://forum.pulseway.com/topic/4828-reg-edit-powershell-scripts/</link><description><![CDATA[<p>
	I want to add the below PowerShell command into Pulseway script, any help with creating or articles would be great.
</p>

<p>
	Powershell<br />
	cd HKLM:\<br />
	New-Item -Path "SOFTWARE\Policies\" -Name "Google"<br />
	New-Item -Path "SOFTWARE\Policies\Google\" -Name "Chrome"
</p>

<p>
	<br />
	cd HKLM:\<br />
	New-ItemProperty -Path SOFTWARE\Policies\Google\Chrome -Name "IntensiveWakeUpThrottlingEnabled" -Value "0"  -PropertyType "DWord"<br />
	New-ItemProperty -Path SOFTWARE\Policies\Google\Chrome -Name "WindowOcclusionEnabled" -Value "0"  -PropertyType "DWord"
</p>
]]></description><guid isPermaLink="false">4828</guid><pubDate>Tue, 15 Nov 2022 23:48:15 +0000</pubDate></item><item><title>How to create GUI pop up message via Power Shell..</title><link>https://forum.pulseway.com/topic/3842-how-to-create-gui-pop-up-message-via-power-shell/</link><description><![CDATA[<p>
	I am looking to create an automated pop up message via powershell to alert users in a certain scope.<br />
	<br />
	<strong>Example</strong>: Systems will be under going maintenance, please ensure you leave the system on.<br />
	<br />
	However, I noticed due to powershell being in 'session 0' it won't show the pop up box for the user.<br />
	<br />
	How can I get around this or does anybody have another method?<br />
	<br />
	<strong>Side note:</strong> I did notice you can send group messages via Pulseway Group section, but I don't think I could automate that?
</p>
]]></description><guid isPermaLink="false">3842</guid><pubDate>Thu, 17 Dec 2020 08:35:06 +0000</pubDate></item><item><title>Uninstall NINJARMM Agent</title><link>https://forum.pulseway.com/topic/3539-uninstall-ninjarmm-agent/</link><description><![CDATA[<p>
	I don't think its possible to have more than one NINJARMM Agent installed, however if there are this script will likely fail, but for a clean ninja install will locate the correct uninstall path and uninstall the ninja agent.
</p>

<p>
	 
</p>

<p>
	$UninstallString = (Get-ItemProperty HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\NinjaRMMAgent*).UninstallString
</p>

<p>
	Start-Process -FilePath "$UninstallString" -ArgumentList "--mode unattended"
</p>

<p>
	 
</p>
]]></description><guid isPermaLink="false">3539</guid><pubDate>Sun, 26 Jul 2020 01:55:11 +0000</pubDate></item><item><title>Hi, Skipped Task Forever ?</title><link>https://forum.pulseway.com/topic/4827-hi-skipped-task-forever/</link><description><![CDATA[<p>
	Hello to all,
</p>

<p>
	I have a big problem in one of my tasks (in the Automation -&gt; Tasks section)
</p>

<p>
	I want to execute a script in PowerShell quite simple:
</p>

<p>
	"Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" -Name "XXXXX" "
</p>

<p>
	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.
</p>

<p>
	I just get a "Skipped" return on the task see the screenshot. But I don't understand at all why?
</p>

<p>
	Thanks a lot for your help. 
</p>

<p>
	Sincerely Dimitri
</p>

<p>
	<a class="ipsAttachLink ipsAttachLink_image" href="https://forum.pulseway.com/uploads/monthly_2022_11/chrome_8MmafV6BvK.png.30abfa39adfa19cc903b12e830900476.png" data-fileid="1077" data-fileext="png" rel=""><img alt="chrome_8MmafV6BvK.png" class="ipsImage ipsImage_thumbnailed" data-fileid="1077" width="374" src="https://forum.pulseway.com/uploads/monthly_2022_11/chrome_8MmafV6BvK.png.30abfa39adfa19cc903b12e830900476.png" loading="lazy" height="216.92"></a>
</p>
]]></description><guid isPermaLink="false">4827</guid><pubDate>Mon, 14 Nov 2022 15:34:26 +0000</pubDate></item></channel></rss>
