Jump to content

eDecisions

Members
  • Content Count

    14
  • Joined

  • Last visited

  1. Bart, Thank you, I'd never know about chocolatey, I setup and am rocking now, lovely solution.
  2. 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 }
  3. 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
  4. 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
  5. come on, Mac's don't need support....LOL
  6. 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
  7. 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
  8. 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
  9. Question, new here but if you removed the entry as you suggest does that not also remove it from services from the tech side, meaning that if I remove the service from pc monitor\services sure it won't send the notice but lets say I wanted to view services from the manager and restart one, will that service still be listed? I just checked, when clicking the SERVICES tab in the web app you only see auto start services listed, so you'd not be able to manage it without logging in, take a look at this option: # Note, This script removes all current excluded services from Notifications and replaces with your selection. # # Remove-Item -Path "HKLM:\Software\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\" -Recurse New-Item -Path "HKLM:\Software\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\" $exclude = @() $exclude += 'gpsvc' $exclude += 'ITmanager.net' $exclude += 'clr_optimization_v4.0.30319_64' $exclude += 'clr_optimization_v4.0.30319_32' $exclude += 'ClickToRunSvc' $exclude += 'sppsvc' $exclude += 'SSUService' $exclude += 'wuauserv' $exclude += 'BITS' $exclude += 'gupdate' $exclude += 'TrustedInstaller' $exclude += 'VSS' # Volume Shadow Copy $exclude += 'WUDO' # Service Host: Delivery Optimization # # $exclude += Just keep adding rows with new service name. # $i=0 foreach ($service in $exclude){ Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\' -Name Service$i -value $service $i++ } Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\' -Name 'Count' -value "$i"
  10. Try this one on for size, this give you "currentuser / computername / domain" $lastlogon = (New-Object -ComObject WScript.Shell).RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\LastLoggedOnUser") $hostname = hostname $pos = $lastlogon.IndexOf("\") $leftPart = $lastlogon.Substring(0, $pos) $lastlogonusername = $lastlogon.Substring($pos+1) Set-ItemProperty -Path "HKLM:\Software\MMSOFT Design\PC Monitor\" -Name ComputerName -Value $lastlogonusername , "/" , $hostname , "/" , $leftPart
  11. Got done faster than I thougth Revised script, just list the services in the top and it will auto account and add the count and service number for you, just keep adding $exclude += "servicename" # Note, This script removes all current excluded services from Notifications and replaces with your selection. # # Remove-Item -Path "HKLM:\Software\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\" -Recurse New-Item -Path "HKLM:\Software\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\" $exclude = @() $exclude += 'gpsvc' $exclude += 'ITmanager.net' $exclude += 'clr_optimization_v4.0.30319_64' $exclude += 'clr_optimization_v4.0.30319_32' $exclude += 'ClickToRunSvc' $exclude += 'sppsvc' $exclude += 'SSUService' $exclude += 'wuauserv' $exclude += 'BITS' $exclude += 'gupdate' $exclude += 'TrustedInstaller' # # $exclude += Just keep adding rows with new service name. # $i=0 foreach ($service in $exclude){ Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\' -Name Service$i -value $service $i++ } Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\' -Name 'Count' -value "$I"
  12. I'll circle back and create an array and loop thru the array later, but this should give you an idea where its heading, this script will remove any current excluded items so be carefull, and it will turn off monitoring on just the ones in the script, I use this to reset all clients to the same set of excluded services, the array will be nice to have all the excluded services listed at the top of the script. Remove-Item -Path "HKLM:\Software\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\" -Recurse New-Item -Path "HKLM:\Software\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\" Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\' -Name 'Count' -value '11' Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\' -Name 'Service0' -value 'gpsvc' Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\' -Name 'Service1' -value 'ITmanager.net' Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\' -Name 'Service2' -value 'clr_optimization_v4.0.30319_64' Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\' -Name 'Service3' -value 'clr_optimization_v4.0.30319_32' Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\' -Name 'Service4' -value 'ClickToRunSvc' Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\' -Name 'Service5' -value 'sppsvc' Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\' -Name 'Service6' -value 'SSUService' Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\' -Name 'Service7' -value 'wuauserv' Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\' -Name 'Service8' -value 'BITS' Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\' -Name 'Service9' -value 'gupdate' Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\ServicesExcludedFromNotifications\' -Name 'Service10' -value 'TrustedInstaller'
  13. I posted the solution in powershell scripts 5/15/20 easy push to all clients, have an ON and and OFF script in the post.
  14. 1: ENABLE MANAGER LOCK (PASSWORD 123) Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor' -Name 'PreventChanges' -value '1' Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor' -Name 'PreventChangesPassword' -value 'u9jnMTCy8Op4FP7ojbHApnslkq4g2bxhTW8uvNKsURYntjFyJKp302SXGSI+d7lCghuzlNhB6kZb71JpwMiHIw==' Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor' -Name 'PreventChangesPasswordCtrl' -value 'A1-B9-23-A3-6D-C6-BD-A4-DF-CE-82-F5-F3-F6-69-81' 2: DISABLE MANAGER LOCK: Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor' -Name 'PreventChanges' -value '0' Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor' -Name 'PreventChangesPassword' -value 'u9jnMTCy8Op4FP7ojbHApnslkq4g2bxhTW8uvNKsURYntjFyJKp302SXGSI+d7lCghuzlNhB6kZb71JpwMiHIw==' Set-Itemproperty -path 'HKLM:\SOFTWARE\MMSOFT Design\PC Monitor' -Name 'PreventChangesPasswordCtrl' -value 'A1-B9-23-A3-6D-C6-BD-A4-DF-CE-82-F5-F3-F6-69-81'
×
×
  • Create New...