Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


p_ern last won the day on January 11

p_ern had the most liked content!

Community Reputation

3 Neutral

My Information

  • Agent Count
    < 500 Agents

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. p_ern

    Detect public RDP?

    Hi , try to use this one: https://www.yougetsignal.com/tools/open-ports/
  2. p_ern

    Grafana and Labtech

    @bschmiedlin https://github.com/PatrikErn/Grafana_Labtech I got a repository with alot of manual queries , where you can se how they look , including timeseries.
  3. p_ern

    Grafana and Labtech

    Hi , I am not really sure , it needs to be able to connect to your database in some way.Check your documentation on how to connect with connectors to your hosted enviroment.
  4. p_ern


    Start here for all the documentation . Requires a login. https://docs.connectwise.com/ConnectWise_Automate I havent tried their new university program , but that should be a good starting point for a more focused learning regime: https://university.connectwise.com/University/CourseWork.aspx
  5. p_ern

    Script to debloat win10

    I am using this code with some apps whitelisted. It wouldn't be too hard to add a All Users Scope on it. We are also using a startmenu Layout xml and a script to mount it on all new users. If you have Office 2016 installed it will add those to the pinned list. File added also for the layout Import-StartLayout -LayoutPath "C:\Windows\startlayout-W10-1709.xml" -MountPath C:/ Decrapify Windows 10 - Dynamic. # Functions function Write-LogEntry { param( [parameter(Mandatory=$true, HelpMessage="Value added to the RemovedApps.log file.")] [ValidateNotNullOrEmpty()] [string]$Value, [parameter(Mandatory=$false, HelpMessage="Name of the log file that the entry will written to.")] [ValidateNotNullOrEmpty()] [string]$FileName = "RemovedApps.log" ) # Determine log file location $LogFilePath = Join-Path -Path $env:windir -ChildPath "Temp\$($FileName)" # Add value to log file try { Out-File -InputObject $Value -Append -NoClobber -Encoding Default -FilePath $LogFilePath -ErrorAction Stop } catch [System.Exception] { Write-Warning -Message "Unable to append log entry to RemovedApps.log file" } } # Get a list of all apps Write-LogEntry -Value "Starting built-in AppxPackage, AppxProvisioningPackage and Feature on Demand V2 removal process" $AppArrayList = Get-AppxPackage -PackageTypeFilter Bundle -AllUsers | Select-Object -Property Name, PackageFullName | Sort-Object -Property Name # White list of appx packages to keep installed $WhiteListedApps = @( "Microsoft.DesktopAppInstaller", "Microsoft.Messaging", "Microsoft.MSPaint", "Microsoft.Windows.Photos", "Microsoft.StorePurchaseApp", "Microsoft.MicrosoftStickyNotes", "Microsoft.WindowsAlarms", "Microsoft.WindowsCalculator", "Microsoft.WindowsSoundRecorder", "Microsoft.WindowsStore", "Microsoft.ZuneMusic", "Microsoft.ZuneVideo", "Microsoft.WindowsMaps" ) # Loop through the list of appx packages foreach ($App in $AppArrayList) { # If application name not in appx package white list, remove AppxPackage and AppxProvisioningPackage if (($App.Name -in $WhiteListedApps)) { Write-LogEntry -Value "Skipping excluded application package: $($App.Name)" } else { # Gather package names $AppPackageFullName = Get-AppxPackage -Name $App.Name | Select-Object -ExpandProperty PackageFullName -First 1 $AppProvisioningPackageName = Get-AppxProvisionedPackage -Online | Where-Object { $_.DisplayName -like $App.Name } | Select-Object -ExpandProperty PackageName -First 1 # Attempt to remove AppxPackage if ($AppPackageFullName -ne $null) { try { Write-LogEntry -Value "Removing AppxPackage: $($AppPackageFullName)" Remove-AppxPackage -Package $AppPackageFullName -ErrorAction Stop | Out-Null } catch [System.Exception] { Write-LogEntry -Value "Removing AppxPackage '$($AppPackageFullName)' failed: $($_.Exception.Message)" } } else { Write-LogEntry -Value "Unable to locate AppxPackage: $($AppPackageFullName)" } # Attempt to remove AppxProvisioningPackage if ($AppProvisioningPackageName -ne $null) { try { Write-LogEntry -Value "Removing AppxProvisioningPackage: $($AppProvisioningPackageName)" Remove-AppxProvisionedPackage -PackageName $AppProvisioningPackageName -Online -ErrorAction Stop | Out-Null } catch [System.Exception] { Write-LogEntry -Value "Removing AppxProvisioningPackage '$($AppProvisioningPackageName)' failed: $($_.Exception.Message)" } } else { Write-LogEntry -Value "Unable to locate AppxProvisioningPackage: $($AppProvisioningPackageName)" } } } # White list of Features On Demand V2 packages Write-LogEntry -Value "Starting Features on Demand V2 removal process" $WhiteListOnDemand = "NetFX3|Tools.Graphics.DirectX|Tools.DeveloperMode.Core|Language|Browser.InternetExplorer|ContactSupport|OneCoreUAP|Media.WindowsMediaPlayer" # Get Features On Demand that should be removed try { $OSBuildNumber = Get-WmiObject -Class "Win32_OperatingSystem" | Select-Object -ExpandProperty BuildNumber # Handle cmdlet limitations for older OS builds if ($OSBuildNumber -le "16299") { $OnDemandFeatures = Get-WindowsCapability -Online -ErrorAction Stop | Where-Object { $_.Name -notmatch $WhiteListOnDemand -and $_.State -like "Installed"} | Select-Object -ExpandProperty Name } else { $OnDemandFeatures = Get-WindowsCapability -Online -LimitAccess -ErrorAction Stop | Where-Object { $_.Name -notmatch $WhiteListOnDemand -and $_.State -like "Installed"} | Select-Object -ExpandProperty Name } foreach ($Feature in $OnDemandFeatures) { try { Write-LogEntry -Value "Removing Feature on Demand V2 package: $($Feature)" # Handle cmdlet limitations for older OS builds if ($OSBuildNumber -le "16299") { Get-WindowsCapability -Online -ErrorAction Stop | Where-Object { $_.Name -like $Feature } | Remove-WindowsCapability -Online -ErrorAction Stop | Out-Null } else { Get-WindowsCapability -Online -LimitAccess -ErrorAction Stop | Where-Object { $_.Name -like $Feature } | Remove-WindowsCapability -Online -ErrorAction Stop | Out-Null } } catch [System.Exception] { Write-LogEntry -Value "Removing Feature on Demand V2 package failed: $($_.Exception.Message)" } } } catch [System.Exception] { Write-LogEntry -Value "Attempting to list Feature on Demand V2 packages failed: $($_.Exception.Message)" } # Complete Write-LogEntry -Value "Completed built-in AppxPackage, AppxProvisioningPackage and Feature on Demand V2 removal process" startlayout-W10-1709.xml
  6. p_ern

    Script to debloat win10

    Mgreen is correct on that issue. Its per user sadly.
  7. p_ern

    Automate: New Network Map???

    @RDeBok Thanks for the info
  8. p_ern

    Automate: New Network Map???

    Sounds awesome, any screenshots we might be able too see? Or some footage of the demo?
  9. p_ern

    Scripted Diagram

    New script added: https://github.com/PatrikErn/Labtech_Diagram/tree/master/NetworkDrives Takes exported csv from plugin Map Drives . Makes a diagram on it , to troubleshoot or whatever your fancy is. Test it out.
  10. p_ern

    Show Group Memberships

    Hi , it is still there Try Automation ( COG) -> Effective Policy. You can also search "groups" if you press Begin , and you will see it as a result in Datatiles : Effetcive Policy ->Groups
  11. You can run it once on a agent, or make it a monitor. If you check the built in monitors, under configuration , for example the "DRV - Free Space Remaining < 10% Total Size" - monitor you can set the interval and target. Running a script on specific agents, right click and find your script. There you can set it to run once and with intervals. See if that get you near your result. If you can, read up on the documentation on how to make monitors, run scripts and schedule them. https://docs.connectwise.com/ConnectWise_Automate/ConnectWise_Automate_Documentation/070/240/030 Hope that helps.
  12. @TomBain Yes, https://docs.connectwise.com/ConnectWise_Automate/ConnectWise_Automate_Documentation/070/240/080
  13. p_ern

    Grafana and Labtech

    @NeonBlueHDD Hi , I would recommend that you redo your Grafana installation since ShawnSack´s instruction was before Grafana Labs included the mysql-datasource as part of their package. Heres the official documentation : http://docs.grafana.org/installation/debian/ You can try to upgrade your current , to the latest version. On to connection issues: Try to get your service running: sudo service grafana-server start Make Grafana start up after reboot: To configure the Grafana server to start at boot time: sudo update-rc.d grafana-server defaults Start the server (via systemd) To start the service using systemd: systemctl daemon-reload systemctl start grafana-server systemctl status grafana-server Enable the systemd service so that Grafana starts at boot. sudo systemctl enable grafana-server.service Make sure when you have installed everything official you use these settings. Datasources settings: Name : Whatever you like | Make default Type: MySQL MySQL Connection Host: your.server.ip.here:3306 Database: labtech | Important, since thats the database where Automate stores everything. User: A user account in Automate | Recommend something with only read permissions.| Remember that Automate user names are Case-Sensitive Password: No need to explain that one Hope that helps
  14. p_ern

    Scripted Diagram

    Updated description: Features: Graph a picture of your current Client and Computers inventory with corresponding locations. It gives an overview on Memory Total , IP-Address, Router Address , and domain. Server will be marked with red double boxes. If a device is not in a domain, and in WORKGROUP its box will be green. Right now it draws the topology from top to bottom. You can change that easily by @{rankdir='TB'} to LR for left to right. To change Layout entirely: Change Hierarchical to Radial , Circular, Springmodel(Small](Medium)(Large) }| Export-PSGraph -ShowGraph -LayoutEngine Hierarchical Preparing your data: Pull data from ConnectWise Automate Data view : Network Make sure you have following columns : ComputerID,Agent Windows Domain,Client Name,Agent Name,Location Name,LocationID,Agent IP Address,Agent Router Address,Agent Type,Agent Memory Total,Agent Mainboard,Agent Serial Number,Agent Operating System,Agent OS Version,Agent MAC Export as csv , remove spaces from Client Name , Location Name and Agent Name.
  15. p_ern

    Scripted Diagram

    Hello all fellow geekers. I´ve scripted a sort of automated diagram , with the help of a Powershell module made by Kevin Marquette. This was made as a way to learn Powershell and as a proof of concept for myself that it can be done. So if its a bit crude and unrefined, thats why. You also need graphviz for this to work.Follow the instructions on Kevins Github on how to install. It consist of two parts , The script itself and a csv. The data is pulled from a dataview with certain columns. I feel like it is ready enough to release for you folks to see if we can improve upon it. I have it on my Github here with instructions on how to use it. Enjoy!