Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by eDecisions

  1. Hay BartB, I agree, I followed your advise and it works well, I'm worried however about the source files, It would be very cool if a group of us Pulseway users worked to as a team to setup our own file hosting of secure files, interested in starting something up?
  2. How about adding some logic, if exist use vpnname-1 , vpnname-2 vpnname--3 ect..... who knows the user maybe tried setting up or heck even the other admin and messed it up and you want to have a working vpn connection. Just a thought.
  3. Darn, the MSI and agent both need to be removed, I wrote this to finish it up, but if anyone has a better way or can assist with a loop to pull both keys in one pass, I'm just tired. and this worked and all are removed from 500 stations with this one so I don't need it any more. I'd sense used the Get-ChildItem to uninstall several other programs, but I know it will pull more than one path so I'd love to re-write this to loop thru all the possible msi and exe and hit them both in a few lines rather than this, but it works as is, any input from someone more knowledgeableble than me please, I'm not proud. $UninstallString = (Get-ItemProperty HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\NinjaRMMAgent*).UninstallString sleep -seconds 2 if (!$UninstallString) { exit } sleep -seconds 2 $path = $UninstallString -replace "uninstall.exe", "" sleep -seconds 5 cd $path sleep -seconds 5 Start-Process -FilePath .\uninstall.exe -ArgumentList "--mode","unattended" sleep -seconds 40 $Uninstall2 = Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall | Get-ItemProperty | Where-Object {$_.DisplayName -match "NinjaRMMAgent" } | Select-Object -Property UninstallString | foreach { $_.UninstallString } sleep -seconds 220 $Uninstall3 = $Uninstall2 -Replace "MsiExec.exe " , "" sleep -seconds 5 Start-Process -FilePath MSIExec.exe -ArgumentList $Uninstall3,"/quiet","/passive"
  4. Revised script, the (x86) was causing issues, this seems to have fixed $UninstallString = (Get-ItemProperty HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\NinjaRMMAgent*).UninstallString $path = $UninstallString -replace "uninstall.exe", "" cd $path Start-Process -FilePath .\uninstall.exe -ArgumentList "--mode","unattended"
  5. 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. $UninstallString = (Get-ItemProperty HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\NinjaRMMAgent*).UninstallString Start-Process -FilePath "$UninstallString" -ArgumentList "--mode unattended"
  6. I had written something similar resently and posted, I tested yours and I don't think your pulling in the last logged in user just machine name as I could not get to run, when you run this as a script in session 0 it does not get the current logged in user, it seems to be pulling in session 0 which is blank Also, If I may, I suggest you run at at each logon event, this way its always current for the current user on the machine 100% of the time.
  7. with everything you want more... needed a quick way to change path and drive letter depending on which customer I was working at, so came up with this, make a new file called MapDrv.ps1 and paste the MapDrv.ps1 info into it, place it using your method to a common working directory on every compute you manage, then type the following from powershell window in pulseway for the client our working on: MapDrv.ps1 S: \\server\path so this way, you can just on the fly enter the drive letter and path and mapdrive.ps1 will map for the user, no need to make a script for every customer and allows for quick re-connection of a missing drive letter for a user. #MapDrv.ps1 $drive=$args[0] $path=$args[1] $Taskname = "MapX" $lastlogon = (New-Object -ComObject WScript.Shell).RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\LastLoggedOnUser")SCHTASKS /CREATE /sc ONCE /st 00:00 /TN $Taskname /RU $lastlogon /TR "net use $drive $path /persistent:yes" /F start-sleep -s 4 schtasks /Run /TN $Taskname start-sleep -s 1 schtasks /delete /tn $Taskname /F
  8. This has been bugging the h ell out of me, I need to map a drive, or run a program that can only be run by the logged in user, and if I map the drive from session 0 the user does not see it. The below script works but wish Pulseway had better run as user features built in. This script will map a drive letter for the logged in user, change server and share name to your info. you can change the /TR "any commoand you want to run as the user" $Taskname = "MapX" $lastlogon = (New-Object -ComObject WScript.Shell).RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\LastLoggedOnUser") SCHTASKS /CREATE /sc ONCE /st 00:00 /TN $Taskname /RU $lastlogon /TR "net use x: \\<server-name>\<share-name> /persistent:yes" /F start-sleep -s 4 schtasks /Run /TN $Taskname start-sleep -s 1 schtasks /delete /tn $Taskname
  9. Was just an example, and note this script stops nothing, it only turns off monitoring of the service in question, but does nothing to stop it.
  10. Hay 1700+ views and not one comment, like hay good job, or I did that already do it this way, good or bad how about some chatter?
  11. Upgrade widnows 7 - 8 to windows 10 or run on windows 10 to reload in place windows 10 over itself and keep files and settings. all silent, click and go, system will reboot in about 1 hour without warning so best to run at night, found this on another site, have used several times, its about the same as running it manualy as far as success rate, it won't fix a machine that just won't update, but for the ones that will its a single click and your done # Upgrade to Windows 10 # # Created by CN @ CCT 19th Feb 2020 # # # ##Create Directory New-Item -Path "c:\temp\" -Name "Win10Upgrade" -ItemType "directory" ##Get Variables $url = "https://go.microsoft.com/fwlink/?LinkID=799445" $outputfile = "C:\temp\Win10Upgrade\Windows10upgrade.exe" ##Download File (New-Object Net.WebClient).DownloadFile($url, $outputfile) ##Start Windows 10 Upgrade & $outputfile /quietinstall /skipeula /auto upgrade /dynamicupdate enable
  12. Seems I still find a lot of these systems that were managed by 2011 small buiness server where the server has been removed from the domain but the WUSU settings were not removed from the GPO correctly leaving one or more systems looking for a server that no longer exist. This script removes and reset the update service back to default on the client. Suggestions/Comments? # Stop the Windows Update service Stop-Service -Name wuauserv # Remove the registry key Remove-Item ` 'HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate' ` -Recurse # Start the Windows Update service Start-Service -Name wuauserv
  13. Customer calls and says they open a link and need you to check their machine, run script to start a full client scan. "C:\Program Files\Bitdefender\Endpoint Security\product.console.exe" /c FileScan.OnDemand.RunScanTask custom
  14. 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\MMSOFT Design\PC Monitor\ComputerName") $currentnameA = $computername -replace "BitActive" -replace "" $currentname = $currentnameA -replace "NOBit" -replace "" $serviceName = "EPSecurityService" If (Get-Service $serviceName -ErrorAction SilentlyContinue) { Set-ItemProperty -Path "HKLM:\Software\MMSOFT Design\PC Monitor\" -Name ComputerName -Value "$currentname" , "BitActive" } Else { Set-ItemProperty -Path "HKLM:\Software\MMSOFT Design\PC Monitor\" -Name ComputerName -Value "$currentname" , "NOBit" }
  15. I'm told its on the road map for next QTR, if you don't mind sharing what are you using now? I was on Ninja but switched away, every 6 months Ninja pushed some update that damaged 80 to 90% of my clients and after 5 years of them doing this over and over I had enough, whats your story?
  16. sure seems like way too much code for this project, I do this as a bath script not power shell. net user localpcadmin Password /add net localgroup administrators localpcadmin /add net localgroup administrators administrator /add net localgroup administrators "domain admins" /add net localgroup "Power Users" "domain users" /add
  17. Bart, Thank you, I'd never know about chocolatey, I setup and am rocking now, lovely solution.
  18. Ok, after using this script for the last few weeks I realized it was missing just one more thing: Issue: Tom and Roger have a desktop computer at home and at the office, often Tom or Roger will call from home and I can quickly pull up which computer's below to roger and tom because my script shows last logged in user, but in this case tom and roger have 2 computers, how do I tell which is home and which is work, sure I could tag them but hell I don't want to open the both devices to find the one thats at tom's home, I want to skip that step and see it on the main search box, hence: Script 1, any time you have a home user you run this script on their pc Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor' -Name 'Location' -value 'Users Remote Device' Script 2: Oooops I taged the pc in error, this will un-do the first tag. Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor' -Name 'Location' -value '' Script 3: This will add the tag, in my case "Users Remote Device" in the list of computers in the search, note also I took off the last logon name for Servers, usually its just me and I only wanted to see the server name without the user name but I could easly add it back in. $Location = (Get-ItemProperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor').Location $lastlogon = (New-Object -ComObject WScript.Shell).RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\LastLoggedOnUser") $hostname = hostname $installtype = (New-Object -ComObject WScript.Shell).RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\InstallationType") $pos = $lastlogon.IndexOf("\") $leftPart = $lastlogon.Substring(0, $pos) $lastlogonusername = $lastlogon.Substring($pos+1) if ($installtype -eq "Server") { Set-ItemProperty -Path "HKLM:\Software\MMSOFT Design\PC Monitor\" -Name ComputerName -Value $hostname , "/" , $leftPart }else { Set-ItemProperty -Path "HKLM:\Software\MMSOFT Design\PC Monitor\" -Name ComputerName -Value $lastlogonusername , "/" , $hostname , "/" , $leftPart , "/" , $Location }
  19. Disable IPv6 All Network Adapters, the second line allows you to check status of all adapters after run. Carefull, suggest you run on workstations only. Disable-NetAdapterBinding -Name "*" -ComponentID ms_tcpip6 Get-NetAdapterBinding -ComponentID ms_tcpip6 Enable IPv6 All Network Adapters enable-NetAdapterBinding -Name "*" -ComponentID ms_tcpip6 Get-NetAdapterBinding -ComponentID ms_tcpip6
  20. Don't you hate it, turn on the computer and you got all this cra# that comes up before you can start using your computer, users had enough of it, and go figure Microsoft put the run commmand in HKCU rather than HKLM I can't take credit for this one, I added the remove the run item but the balance of the script I found on ChristopherKibble.com, this script loops thru every users of the computer and edit's their HKCU, you run the script once and its fixed for all users on that system. #******************************************************************************************************************************* #** All code is for demonstration only and should be used at your own risk. I cannot accept liability for unexpected results. ** #******************************************************************************************************************************* #Use: You're welcome to use, modify, and distribute this script. I'd love to hear about how you're using it or #modifications you've made in the comments section of the original post over at ChristopherKibble.com. #> # This key contains all of the profiles on the machine (including non-user profiles) $profileList = Get-ChildItem -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" # This key contains the path to the folder that contains all the profiles (typically c:\users) $profileFolder = (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList').ProfilesDirectory # This key contains the path to the default user profile (e.g. C:\Users\Default). This is **NOT** HKEY_USERS\.DEFAULT! # We don't do anything with it in this sample script, but it can be loaded and modified just like any other profile. $defaultFolder = (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList').Default # HKEY_USER key is not loaded into PowerShell by default and we'll need it, so we'll create new PSDrive to reference it. New-PSDrive -Name HKU -PSProvider Registry -Root HKEY_USERS | Out-Null $profileList | % { $profileKeys = Get-ItemProperty $_.PSPath $sid = $profileKeys.PSChildName $profilePath = $profileKeys.ProfileImagePath # This is an easy way to exclude profiles outside of the default USERS profile folder, e.g. LocalSystem. # You may or may not want to do this depending on your requirements. if ($profilePath -like "$($profileFolder)*") { # Check if the profile is already loaded. if (Get-ChildItem "HKU:\$sid" -ErrorAction SilentlyContinue) { $profileLoaded = $true } else { $profileLoaded = $false } Write-Output "$sid `t $profilePath `t $profileLoaded" # Load the key if necessary if ($profileLoaded) { $userKeyPath = "HKU:\$sid" } else { $userKeyPath = "HKLM:\TempHive_$sid" & reg.exe load "HKLM\TempHive_$sid" "$profilePath\ntuser.dat" } # DO SOMETHING WITH $USERKEYPATH HERE. #here's my one line of code below, this stops teams from loading at every logon. Remove-ItemProperty -Path $USERKEYPATH\Software\Microsoft\Windows\CurrentVersion\Run\ -Name 'com.squirrel.Teams.Teams' if (!$profileLoaded) { & reg.exe unload "HKLM\TempHive_$sid" } } } Remove-PSDrive -Name HKU
  21. come on, Mac's don't need support....LOL
  22. not on a dead system, if the system dies you loose all the data on it, I just posted a simular request to retain key data on a dead or offline system
  23. Computer dies at an office and I want to check warranty status, presently when I pull up the system in Pulseway I find it of line, when I open it I see its cmputer name and last known IP, no info on the computer such as serial number, vendor ect... that info was there when it was alive but gone when its dead or down. As the serial number is not going to be changing anytime soon lol or ever. if we could have data that retained on a dead system such as: Serial number mfg name hdd size ram processor This way when the system dies, I can say to the customer, it was 7 years old and its time was over it had 20gb of ram and a larger processor so you must have been running something big, I can quote you this new computer with faster processor and simular ram for #xxx.xxx
  24. Second, seems backwards, I can run a script for 100 groups, I can run a script on a single client , but no I can’t run a script on an office. if I have 100 groups I’d need 100 scripts one for each group. i second adding the scripts as an option under group
  • Create New...