intune-remove-silverlight
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| intune-remove-silverlight [2019/09/10 13:03] – [How-To] jsanders | intune-remove-silverlight [2020/02/17 16:04] (current) – [Intune: Uninstalling an Old Management Engine] jsanders | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ===== Intune: Uninstalling an Old Management Engine ===== | ===== Intune: Uninstalling an Old Management Engine ===== | ||
| - | This article focuses on removing the Silverlight-linked [[intune|Intune]] Management Engine from an endpoint machine. | + | This article focuses on removing the Silverlight-linked [[intune|Intune]] Management Engine from an endpoint machine |
| ==== How-To ==== | ==== How-To ==== | ||
| Before any scripts can be run, you will first need to identify the Intune service' | Before any scripts can be run, you will first need to identify the Intune service' | ||
| Line 9: | Line 9: | ||
| \\ | \\ | ||
| 3. Next, open an elevated command prompt window and //cd// to: | 3. Next, open an elevated command prompt window and //cd// to: | ||
| - | | + | |
| \\ | \\ | ||
| 4. Run the following executable, along with its parameters, in the command prompt window: | 4. Run the following executable, along with its parameters, in the command prompt window: | ||
| - | | + | |
| **Note**: Substitute {GUID} with the Intune service' | **Note**: Substitute {GUID} with the Intune service' | ||
| - | ==== Self-Contained Script Package ==== | + | ==== Automatic Uninstall Script ==== |
| - | The above steps have been compiled into a self-contained script package, which can be downloaded [[https:// | + | Paste the below script into an elevated PowerShell console to automatically retrieve the Intune service GUID and substitute it into the uninstall script. This will completely uninstall the management agent upon successful run.\\ |
| + | function Get-ServiceId { | ||
| + | #Set the registry path containing the service ID | ||
| + | $RegistryPath = " | ||
| + | try { | ||
| + | #Get all the names of the items in the registry location | ||
| + | $RegistryItems = (Get-ChildItem -Path Registry:: | ||
| + | #Loop through all the results | ||
| + | foreach ($RegistryItem in $RegistryItems) { | ||
| + | #Find the result that starts with the registry location followed by the first sign of a GUID | ||
| + | if ($RegistryItem.StartsWith(" | ||
| + | #Replace the registry location with nothing to get the GUID | ||
| + | $ServiceId = $RegistryItem.Replace(" | ||
| + | break | ||
| + | } | ||
| + | } | ||
| + | return $ServiceId | ||
| + | } | ||
| + | catch { | ||
| + | Write-Output "The Microsoft Intune client is not installed" | ||
| + | } | ||
| + | } | ||
| + | |||
| + | function Start-Uninstall { | ||
| + | param ( | ||
| + | [parameter(Mandatory=$true)]$ServiceId | ||
| + | ) | ||
| + | try { | ||
| + | #Set the ProvisioningUtil location and parameters | ||
| + | $ProvisioningUtilPath = " | ||
| + | $ProvisioningUtilExecutable = " | ||
| + | $ProvisioningUtilArguments = "/ | ||
| + | #Trigger the uninstall of the Microsoft Intune client | ||
| + | Start-Process -FilePath " | ||
| + | } | ||
| + | catch { | ||
| + | Write-Output " | ||
| + | } | ||
| + | } | ||
| + | echo " | ||
| + | Start-Uninstall (Get-ServiceId) | ||
| + | ==== Self-Contained | ||
| + | The above steps have been compiled into a self-contained script package, which can be downloaded [[https:// | ||
| ===== References ===== | ===== References ===== | ||
| - [[https:// | - [[https:// | ||
| - [[https:// | - [[https:// | ||
intune-remove-silverlight.1568135005.txt.gz · Last modified: by jsanders
