PowerShell – Uninstall Silverlight (or other Apps)

  Code.ps1   # MrNetTek # eddiejackson.net # 7/15/2022 # free for public use # free to claim as your own $SoftwareName = “Silverlight” $ItemProperties = Get-ItemProperty “HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*” | Select-Object DisplayName,UninstallString foreach ($Item in $ItemProperties) { $DisplayName = $Item.DisplayName $UninstallString = $Item.UninstallString if($DisplayName -like “*$SoftwareName*”) { Write-Host “$DisplayName : $UninstallString” # Output: Microsoft Silverlight : Read More …

Windows – Servicing – Company Portal

You can use app package servicing commands to add, remove, and list provisioned app packages (.appx or .appxbundle) in a Windows image. Command to Add Company Portal DISM.EXE /Online /Add-ProvisionedAppxPackage /PackagePath:C:\PathToFile\Microsoft.CompanyPortal_2022.409.807.0_neutral___8wekyb3d8bbwe.AppxBundle /SkipLicense   Notes   DISM App Package (.appx or .appxbundle) Servicing Command-Line Options

Mac – Intune/SCCM – Sign PKG, Wrap PKG for Deployment

Create a Signed Package {{{ Required for Intune  }}} [devuser@mac-lab1 Downloads % sudo productsign –sign “Developer ID Installer: Eddie Jackson (YourAppleID-DDD3V2X8N)” Skype-8.83-unsigned.pkg Skype-8.83-signed.pkg Password: {enter password} productsign: using timestamp authority for signature productsign: signing product with identity “Developer ID Installer: Eddie Jackson (YourAppleID-DDD3V2X8N)” from keychain /Users/devuser/Library/Keychains/login.keychain-db productsign: adding certificate “Developer ID Certification Authority” productsign: adding Read More …

Azure – VDI – Nerdio – Add AD Group to Host Session

  Code.ps1   # MrNetTek # eddiejackson.net # 7/15/2022 # free for public use # free to claim as your own $ErrorActionPreference = ‘Continue’ Write-output “Getting Host Pool Information” $HostPool = Get-AzResource -ResourceId $HostpoolID $HostPoolResourceGroupName = $HostPool.ResourceGroupName $HostPoolName = $Hostpool.Name $Script = @” `$ErrorActionPreference = ‘Continue’ Try { #Add specific user #Add-LocalGroupMember -Group “Administrators” -Member Read More …

PowerShell – Set DPI Aware

  Code.ps1   # MrNetTek # eddiejackson.net # 7/15/2022 # free for public use # free to claim as your own # Add a new type definition using C# code Add-Type -TypeDefinition @’ using System.Runtime.InteropServices; // Import the necessary namespace for DLL import public class ProcessDPI { // Declare an external method from user32.dll to Read More …

PowerShell – Detect Autoscaling

  Code.ps1   # MrNetTek # eddiejackson.net # 7/15/2022 # free for public use # free to claim as your own #DETECT CURRENT AUTOSCALING function Get-DisplayPrimaryScaling { [CmdletBinding()] param () #Add-Type -Assembly System.Drawing # Get DPI Scaling #[void] [System.Reflection.Assembly]::LoadWithPartialName(“System.Drawing”) Add-Type @’ using System; using System.Runtime.InteropServices; using System.Drawing; public class DPI { [DllImport(“gdi32.dll”)] static extern int Read More …

PowerShell – Adding Tabs to a Form

  Code.ps1   # MrNetTek # eddiejackson.net # 7/15/2022 # free for public use # free to claim as your own [void] [System.Reflection.Assembly]::LoadWithPartialName(“System.Windows.Forms”) [void] [System.Reflection.Assembly]::LoadWithPartialName(“System.Drawing”) [void] [System.Reflection.Assembly]::LoadWithPartialName(“PresentationFramework”) [void] [Reflection.Assembly]::LoadWithPartialName(“PresentationCore”) $Form = New-Object System.Windows.Forms.Form $Form.Text = “Test Form” $Form.Size = New-Object System.Drawing.Size(630,840) $Form.StartPosition = “CenterScreen” $Form.ShowInTaskbar = $True $Form.KeyPreview = $True $Form.AutoSize = $True $Form.FormBorderStyle = Read More …