Jump to content

Joe.McCall

Members
  • Content Count

    81
  • Joined

  • Last visited

  • Days Won

    9

Joe.McCall last won the day on June 28

Joe.McCall had the most liked content!

Community Reputation

18 Good

My Information

  • Location
    Tri Cities, WA USA
  • Agent Count
    1000 - 1500 Agents

Recent Profile Visitors

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

  1. We're an HP shop, so the majority of our managed agents are HP pro/elite models. Softpaq Download Manager can do BIOS updates (there's a thread on the forums with the scripts I use). I run a script that pulls a reportinto an EDF. Internal monitors run off the EDF contents. Drivers are auto-installed. BIOS updates generate a ticket so we can coordinate with end users to make sure they don't interrupt. We inherited a handful of Dell systems, so we have dabbled a little bit with the Dell Command Update tool, which I believe also can do BIOS updates, but I have not automated anything for them yet. For servers (again, HPE primarily) I build a custom ProLiant SPP ISO for the models we have, then script download and staging of the ISO and create tickets for manual deployment 2-3 times a year. Dell has a CLI update utility that I use to manually update the 2-3 servers we inherited.
  2. In the database, it's in the computers table. PowerProfiles lists all available on the agent (format: "GUID, Name|GUID, Name"), CurrentPwrProfile shows the active profile GUID. You can search for it, via the Legacy search (Prower Profile GUID).
  3. @mikey090tx I ported the whole set of scripts over to the Image Assistant last year, but I was having a lot of mixed results, downloads/installs failing, etc. I suspect it's improved since then, but I have not had time to revisit and see if the updates have resolved the issues I was seeing.
  4. You can (could? I assume this still works) pass the server information to the MSI /quiet /norestart SERVERADDRESS=https://yourserver.com SERVERPASS={yourpass} LOCATION={id} Found that those were needed when I was deploying via Intune the first time; didn't matter if it was a custom client specific MSI, if I didn't pass the extra params it just installed with no server information.
  5. Some roles I put together a while back for some targeted monitoring to separate domain-joined systems from workgroup/AzureAD-joined computers. Import via System > General > Import > SQL File. Workgroup Computer.sql Domain Joined Computer.sql
  6. I ran into the same issue recently. I have a working TS Gateway role, plus a couple of others (NPS server, Essentials / Essentials Experience role). Windows Terminal Services Gateway.sql Windows Server Essentials Role.sql Windows NPS Server.sql
  7. Worthy of note that Gen 10 detection does not w ork, be HPE Server.sqlcause that is the first generation of the 'HPE' moniker. Requires a new parent role and a revised Gen10 role. I'm attaching the roles that I created to address this, if you'd like to bundle in with the rest. HPE Server - Gen10.sql
  8. We had old Windows 10 installs, some that were Home > Pro upgrades from a customer-purchased machine, some were Intel compute sticks, but in any case there was anywhere from 700MB to 30GB of junk files and appx package updates/revisions. I built out a remote monitor to automate the cleanup and disable of the consumer features and packages. C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass $ErrorActionPreference = 'SilentlyContinue'; $AppXApps = @('king*','nordcurrent*','Microsoft.whiteboard*','*EclipseManager*','*ActiproSoftwareLLC*','*AdobeSystemsIncorporated.AdobePhotoshopExpress*','*Duolingo-LearnLanguagesforFree*','*PandoraMediaInc*','*Wunderlist*','*Flipboard*','*.PicsArt-PhotoStudio','*.PolarrPhotoEditorAcademicEdition','*.Wunderlist','*.LinkedInforWindows','*.AutodeskSketchBook','*.DisneyMagicKingdoms','*.MarchofEmpires','ActiproSoftwareLLC.562882FEEB491','*.FarmVille2CountryEscape','*.Duolingo-LearnLanguagesforFree','Drawboard.DrawboardPDF','Fitbit.FitbitCoach','GAMELOFTSA.*','KeeperSecurityInc.Keeper','Playtika.*','ThumbmunkeysLtd.PhototasticCollage','WinZipComputing.WinZipUniversal','XINGAG.XING','flaregamesGmbH.*');$sizebefore=0;foreach($app in $AppXApps){$path = $('c:\program files\windowsapps\' + $App); if(Test-Path $path){$checkpath=Get-ChildItem -Path $path -Recurse | Measure-Object -Sum Length; if($checkpath){$sizebefore+=$checkpath.Sum}}}$beforemb=[math]::Round(($sizebefore/1MB),0);Write-Output $beforemb The monitor outputs a MB value, set with 0 as the desired result. Failure runs a script that executes this powershell script to clean things up and set the necessary registry keys to disable the consumer features at the system level to prevent install for new users. $AppXApps = @( 'king*' 'nordcurrent*' 'Microsoft.whiteboard*' '*EclipseManager*' '*ActiproSoftwareLLC*' '*AdobeSystemsIncorporated.AdobePhotoshopExpress*' '*Duolingo-LearnLanguagesforFree*' '*PandoraMediaInc*' '*Wunderlist*' '*Flipboard*' '*.PicsArt-PhotoStudio' '*.PolarrPhotoEditorAcademicEdition' '*.Wunderlist' '*.LinkedInforWindows' '*.AutodeskSketchBook' '*.DisneyMagicKingdoms' '*.MarchofEmpires' 'ActiproSoftwareLLC.562882FEEB491' '*.FarmVille2CountryEscape' '*.Duolingo-LearnLanguagesforFree' 'Drawboard.DrawboardPDF' 'Fitbit.FitbitCoach' 'GAMELOFTSA.*' 'KeeperSecurityInc.Keeper' 'Microsoft.BingNews' 'Playtika.*' 'ThumbmunkeysLtd.PhototasticCollage' 'WinZipComputing.WinZipUniversal' 'XINGAG.XING' 'flaregamesGmbH.*' ) foreach ($App in $AppXApps) { Write-Verbose -Message ('Removing Package {0}' -f $App) Get-AppxPackage -Name $App -AllUsers | Remove-AppxPackage -AllUsers -ErrorAction SilentlyContinue Get-AppxProvisionedPackage -Online | Where-Object DisplayName -like $App | Remove-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue Remove-Item $('c:\program files\windowsapps\' + $App) -Recurse -Force -Verbose -ErrorAction SilentlyContinue } if(!Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -ErrorAction SilentlyContinue){ force-mkdir "HKLM:\SOFTWARE\Policies\Microsoft\WindowsStore" } Set-ItemProperty "HKLM:\SOFTWARE\Policies\Microsoft\WindowsStore" "AutoDownload" 2 -Force # Prevents "Suggested Applications" returning if(!Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -ErrorAction SilentlyContinue){ force-mkdir "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" } Set-ItemProperty "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" "DisableWindowsConsumerFeatures" 1 -Force
  9. You can remove them at the group level, or create a dummy search that will never match an agent (I have one call Limit to None) and change the monitor Limit to setting to that search.
  10. 2020.6 is showing up on the website now for me (notes: https://university.connectwise.com/university/pageview.aspx?short_name=patch-release-notes)
  11. The functions I posted on March 9 and March 11 are independent of the code in the original post.
  12. Updated functions for the new Dell v5 API. They switched to OAUTH2, so you have to request a new API key and get a client ID & secret from them. First is updated Get-DellWarrantyInfo, which is reworked with the new API and request format. Function Get-DellWarrantyInfo { Param( [Parameter( Mandatory = $true, ParameterSetName = '', ValueFromPipeline = $true)] [Array]$ServiceTags, [Parameter( Mandatory = $true, ParameterSetName = '', ValueFromPipeline = $true)] [Array]$AccessToken ) $AuthHeader = @{Authorization="Bearer $AccessToken"} $JobResponse = Invoke-RestMethod -Method Get -Uri "https://apigtwb2c.us.dell.com/PROD/sbil/eapi/v5/asset-entitlements?servicetags=$ServiceTags" -headers $AuthHeader -ContentType 'application/json' $AllComputerWarranties = $JobResponse | ?{ $_.entitlements } | %{ $ThisComputerApiResponse = $_ $ShipDate = $ThisComputerApiResponse.shipDate $ThisComputerWarranties = $ThisComputerApiResponse.entitlements | ?{ $_.ServiceLevelCode -notlike "D" } $WarrantyStart = $ThisComputerWarranties | sort startDate | Select -First 1 -ExpandProperty startDate $WarrantyEnd = $ThisComputerWarranties | sort EndDate | Select -Last 1 -ExpandProperty endDate if(-not [String]::IsNullOrEmpty($ShipDate) -and -not [String]::IsNullOrEmpty($WarrantyEnd)) { New-Object psobject -Property @{"WarrantyEndDate"=[DateTime]::Parse($WarrantyEnd.SubString(0,10));"ShipDate"=[DateTime]::Parse($ShipDate.SubString(0,10));"SerialNumber"=$_.ServiceTag} } else { Write-Warning "Invalid Warranty Info received for ServiceTag: $($ThisComputerApiResponse.ServiceTag) ShipDate: $ShipDate WarrantyEnd: $WarrantyEnd `r`n$($ThisComputerWarranties)" } } $AllComputerWarranties } And the tweaked Update-MissingDellWarranties function, which now requires ClientID and ClientSecret instead of just an API key. Function Update-MissingDellWarranties { Param( [Parameter( Mandatory = $true, ParameterSetName = '', ValueFromPipeline = $true)] [string]$DellClientId, [Parameter( Mandatory = $true, ParameterSetName = '', ValueFromPipeline = $true)] [string]$DellClientSecret ) $ComputersMissingWarranty = Get-LabtechData -Query "select ComputerID, BiosVer, (case WarrantyEnd when '0000-00-00 00:00:00' then '1979-01-01' else WarrantyEnd end) as 'WarrantyEnd' from computers where BiosMFG = 'Dell' and length(trim(BiosVer)) = 7 and (WarrantyEnd='0000-00-00 00:00:00' or assetdate > WarrantyEnd)" if($ComputersMissingWarranty.Count -eq 0) { "No Dell computers missing warranty" return } $uri = "https://apigtwb2c.us.dell.com/auth/oauth/v2/token" if(-not $AccessToken) { $AuthResponse = Invoke-RestMethod -Method Post -Uri $uri -Body "client_id=$DellClientID&client_secret=$DellClientSecret&grant_type=client_credentials" -ContentType "application/x-www-form-urlencoded" if(-not $AuthResponse) { "Dell API timed out while obtaining access token. Plese try again later" return } $AccessToken = $AuthResponse | select -ExpandProperty access_token } Write-Host "AccessToken: $AccessToken" $Chunks = Split-Array -inArray $ComputersMissingWarranty -size 100 foreach($Chunk in $Chunks){ $WarrantyInfoArray = @() $WarrantyInfoArray += Get-DellWarrantyInfo -ServiceTags $($Chunk.BiosVer -join ',') -AccessToken $AccessToken $WarrantyInfoArray | %{ $WarrantyInfo = $_ $ComputerID = $ComputersMissingWarranty | ?{$_.biosver -like $WarrantyInfo.SerialNumber} | select -first 1 -ExpandProperty ComputerID Update-WarrantyInLabTech -ComputerID $ComputerID -ShipDate $WarrantyInfo.ShipDate -WarrantyEndDate $WarrantyInfo.WarrantyEndDate } } }
  13. @scubes13 @MidbossQ Quick and dirty using the HPWarranty powershell module. In my debugging I found that the start and end dates were coming back as arrays (some times as many as 3 dates each), but the first entry seems the be the active warranty/care pack entitlement. Ran successfully against a couple hundred workstations in our db. Function Update-MissingHPWarranties-PSModule { $HPComputers = Get-LabtechData -query "select ComputerID, BiosVer sn, (case WarrantyEnd when '0000-00-00 00:00:00' then '1979-01-01' else WarrantyEnd end) as 'WarrantyEnd', inv_chassis.SKUNumber pn from computers join inv_chassis using(computerid) where BiosMFG like 'h%p%' and (WarrantyEnd='0000-00-00 00:00:00' or assetdate > WarrantyEnd)" "$($HPComputers.Count) HP computers found in need of warranty information" for($i=0;$i -lt $HPComputers.Count;$i++) { $WarrantyInfo = Get-HPIncWarrantyEntitlement -SerialNumber $HPComputers[$i].sn -ProductNumber $HPComputers[$i].pn if($WarrantyInfo.OverallEntitlementStartDate -ne $null) { try { if(($WarrantyInfo.OverallEntitlementEndDate | Measure-Object).Count -gt 1) { $end = $([DateTime]::Parse($WarrantyInfo.OverallEntitlementEndDate[0])) }else{ $end = $([DateTime]::Parse($WarrantyInfo.OverallEntitlementEndDate)) } if(($WarrantyInfo.OverallEntitlementStartDate | Measure-Object).Count -gt 1) { $start = $([DateTime]::Parse($WarrantyInfo.OverallEntitlementStartDate[0])) }else{ $start = $([DateTime]::Parse($WarrantyInfo.OverallEntitlementStartDate)) } Update-WarrantyInLabTech -ComputerID $HPComputers[$i].ComputerID -ShipDate $start -WarrantyEndDate $end -ErrorAction Stop } catch { Write-Output "Error updating $($HPComputers[$i].ComputerID): End date: $end" } } else { Write-Output "No Warranty Info returned for $($HPComputers[$i].ComputerID)" } } }
  14. Use Shell, rather than Console Shell. Anything console runs in the user's context, which even under a local admin should not be elevated by default. Shell runs as the System account. Just make sure your config file has <Display Level="None" AcceptEULA="TRUE" /> for the silent flag.
×
×
  • Create New...