PowerShell
Share your PowerShell scripts
112 topics in this forum
-
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…
- 2 replies
- 2.6k views
- 1 follower
-
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. First, you will need to create a custom fields in Pulseway (Automation Tab --> 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. . 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 f…
- 8 replies
- 10k views
-
This post assumes you are already managing bitlocker in some capacity (feel free to read through my guide on how I am managing bitlocker with Pulseway custom fields here.). The use cases for this script are a bit niche. This script will remove the tpm as a valid key protector for the c:\ drive of a workstation. Two common use cases for when you may wish to do this: 1. In the event a laptop is stolen. - We have it setup where we can add stolen devices to a scope.. Devices that come online in this scope will kick off a workflow which includes the blow script. While in theory you shouldn't need to do this if the attacker doesn't know the password to the devic…
-
- 0 replies
- 5.9k views
-
-
I've written a script to scan the network and insert all existing active IP addresses to the proper location in the registry, however Pulseway manager doesn't pick that up (even on service restart). Where do I need to insert those changes? Sample script below- It relys on a txt file for a list of active IP's (generated separately) cls # Remove any existing registry entries $ExistingKeys = Get-ChildItem "HKLM:\Software\MMSOFT Design\PC Monitor\DevicesPingResponses\" | Select-Object -expand Name $Count = 0 ForEach ($Key in $ExistingKeys){ Remove-Item "HKLM:\Software\MMSOFT Design\PC Monitor\DevicesPingResponses\Device$Count" $Count++ } …
-
- 1 reply
- 2.7k views
-
-
Not really sure if anything like this has been posted before. I've seen a couple posts about removing services or stopping the monitoring of Automatic services. What I couldn't seem to find in Pulseway was an easy way to take say an inventory of services on machine, and easily convert specific ones to being monitored. Ideally having the agent inventory all services on the machines and then giving us a way to select which ones we want to monitor through the web portal would be ideal. Currently we have to log into the actual computer and do it from within the Pulseway Manager desktop app. Not ideal when you need to monitor specific services across a larger group. …
-
- 1 reply
- 2.1k views
-
-
I want to start a project, ADD-Printer via power shell, anyone want to help? Or you doing it alrady?
-
- 5 replies
- 5.4k views
-
-
I create a PS script that won't run on my workstation, nothing happens. After investigation the script download the EXE file but the installation next runs or executes. Not sure if this is permission issue or a scripting error? Please help me. Below is my current script # Silent Install Dropbox # Download URL: https://vbc-downloads.vonage.com/win/VonageBusinessSetup.exe # Path for the workdir $workdir = "c:\temp\Vonage" # Check if work directory exists if not create it If (Test-Path -Path $workdir -PathType Container) { Write-Host "$workdir already exists" -ForegroundColor Red} ELSE { New-Item -Path $workdir -ItemType directo…
-
- 1 reply
- 2.1k views
-
-
Would like to execute powershell and batch scripts as admin. Is this possible? For example, I would like to run sfc. Is my only option scheduling tasks?
-
- 4 replies
- 6.8k views
-
-
Here is a script for Powershell to set the pc to autologon one time [configurable] after restart, with a 15 sec delay Someone may find it handy Copy paste into Powershell ISE or txt and then rename to *.ps1 Tested on Windows 7 X64 $RegPath = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" $DefaultUsername = "Insert Username Here" $DefaultPassword = "Insert Password Here" Set-ItemProperty $RegPath "AutoAdminLogon" -Value "1" -type String Set-ItemProperty $RegPath "DefaultUsername" -Value "$DefaultUsername" -type String Set-ItemProperty $RegPath "DefaultPassword" -Value "$DefaultPassword" -type String Set-ItemProperty $RegPath "Auto…
- 1 reply
- 7.1k views
- 1 follower
-
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.6k views
-
-
Well until Pulse-way get around to integrating Bitdefender I needed some way to quickly see who was installed and who was not, this scrip adds an entry to the computer name as "NoBit" or "BitActive" depending weather or not the bitdefender service is found or not. then just visit Systems, Key in the name filed NoBit and hit search to see which clients are missing Bitdefender. Note, does not check if service is running or actually active, only that the service exist. Suggestions Welcome. #Written by eDecisions #Use to determine if Bitdefender is loaded $computername = (New-Object -ComObject WScript.Shell).RegRead("HKLM\SOFTWARE\…
-
- 0 replies
- 2.7k views
-
-
It was requested I post this so hopefully someone else in the community can benefit. Until we are able to deploy Bitdefender from within Pulseway, this is the next best thing. I wrote this again, for my clientele who generally are PS 3.0 + so some small adjustments may be needed if you are attempting to run this on PS 2.0. This will download and silently install Bitdefender. All you need to edit is the $BitdefenderURL and possibly the $BaseURL depending. When you log into GravityZone and make a package and go to get install links, the base URL in your portal will always be the same followed by the remaining part of the URL which can change based on the package. …
-
- 0 replies
- 9.4k views
-
-
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.
-
- 2 replies
- 3.9k views
- 1 follower
-
-
HI Team Is there a way to remotely enable/disable notifications for a specific endpoint via the Admin Console (mydomain.pulseway.com/app/main/systems/{system_id}/details) under Manage > Execute Powershell? I want to disable the "Send notification when computer is offline" but is there a way i can do it with remote powershell/scripting without logging into the computer?
-
- 1 reply
- 1.4k views
-
-
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" }
-
- 2 replies
- 10.9k views
- 1 follower
-
-
My current RMM (the one I'm trying to migrate from) allows me to install both .exe and .MSI's without a UAC prompt. It seems to run in the background. Even with UAC turned on, however, with Pulseway I'm unable to run scripts (with either system or local admin account) without turning off UAC completely. What am I missing?
- 1 reply
- 3k views
-
I made a basic script to run diskcleanup silently, I already configured it...and the script seems to execute the disk cleanup on the local machine but it runs indefinitely, meaning pulse way doesn't seem to know when the script is done. ..any help is appreciated cleanmgr /verylowdisk /sagerun:5
-
The Pulseway Automation contains the Builtin "Cleanup Temporary Files" powershell. I thought it might be worth a conversation. Here's the current code: $folders = @("C:\Windows\Temp\*", "C:\Documents and Settings\*\Local Settings\temp\*", "C:\Users\*\Appdata\Local\Temp\*", "C:\Users\*\Appdata\Local\Microsoft\Windows\Temporary Internet Files\*", "C:\Windows\SoftwareDistribution\Download", "C:\Windows\System32\FNTCACHE.DAT") foreach ($folder in $folders) {Remove-Item $folder -force -recurse -ErrorAction SilentlyContinue} exit 0 I'm not sure it is worth removing the SoftwareDistribution\Download files? From what I understand in Windows 10 you have to run, net stop…
-
- 0 replies
- 9.3k views
-
-
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.2k views
-
-
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?
- 2 replies
- 2.5k views
-
I use this when I am onboarding a new client. Computers have been there and most people don't know/have their own admin password
- 13 replies
- 14.2k views
- 1 follower
-
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.
- 2 replies
- 3.8k views
-
This script will check to see if a VPN connection with the given name exists. If it does exist, it updates the VPN connection. If it does not exist, it creates a VPN connection with the given values. Note: I believe Pulseway runs PowerShell scripts under the Local System account by default (unless you have defined PowerShell User Impersonation in the Pulseway Manager, I think). In order to expose the VPN to users, this script runs against the Global Phone Book (-AllUserConnection switch). Therefore, this script does not check for the existence of VPN profiles stored in individual user Phone Books. (If an existing user VPN profile exists, this script will create a new…
-
- 4 replies
- 21.3k views
-
-
When entering the following, script, I get an error. The error message indicates that the script is adding a "$" character to the device name, and I can't figure out why. This script has been tested verbatim, working, as a locally-run script.. It will not work when pushed through Pulseway's Powershell automation. (generic PREFIX- inserted for relative anonymity) Screesnshots of Pulseway script Syntax attached, as well as identical, locally run syntax. #### $name = $env:UserName $oldName = $env:ComputerName $newPCName = "PREFIX-" + $name Rename-Computer -ComputerName $oldName -NewName $newPCName ### The error message viewed through Pulse…
- 1 reply
- 3.4k views
- 1 follower
-
We do not use IPv6 in our current environment, so to help with security, we disable it on the network adapters. The below script is what we run when an asset registers with Pulseway. Disable-NetAdapterBinding -Name "*" -ComponentID ms_tcpip6
-
- 0 replies
- 3.4k views
-