en-US/MSIPatches-help.xml
<?xml version="1.0" encoding="utf-8"?>
<helpItems schema="maml" xmlns="http://msh"> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Get-MsiPatch</command:name> <command:verb>Get</command:verb> <command:noun>MsiPatch</command:noun> <maml:description> <maml:para>Scans the "C:\Windows\Installer" directory for all installed and orpaned msp files.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Office installations can leave behind a large amount of orphaned patches which can take up many GBs of disk space. Using the "Get-MSIPatchInfo" cmdlet from the "MSI" module we can determine which msp files are currently installed. From there we can calculate the amount and size of the orpaned msp files.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-MsiPatch</maml:name> </command:syntaxItem> </command:syntax> <command:parameters /> <command:inputTypes /> <command:returnValues /> <maml:alertSet> <maml:alert> <maml:para>Author: Mark Kerry Date: 08/01/2018</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <dev:code>Get-MsiPatch</dev:code> <dev:remarks> <maml:para>This will display a PsCustomObject of all msp files and size, which are installed and size, and which are orpaned and their total size.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <dev:code>Get-MsiPatch -Verbose</dev:code> <dev:remarks> <maml:para>Same as above only verbose information is displayed for each msp detailing whether they are installed or orphaned.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <dev:code>Get-MsiPatch | FT</dev:code> <dev:remarks> <maml:para>Simply changes the format to a table view of the object.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks /> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Get-OrphanedPatch</command:name> <command:verb>Get</command:verb> <command:noun>OrphanedPatch</command:noun> <maml:description> <maml:para>Scans the "C:\Windows\Installer" directory for all orpaned msp files.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Office installations can leave behind a large amount of orphaned patches which can take up many GBs of disk space. Using the "Get-MSIPatchInfo" cmdlet from the "MSI" module we can determine which msp files are currently installed. From there we can calculate the amount and size of the orpaned msp files.</maml:para> <maml:para>This can be run on it's own to list the orphaned patches, or piped to Move-OrphanedPatches or Remove-OrphanedPatches.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-OrphanedPatch</maml:name> </command:syntaxItem> </command:syntax> <command:parameters /> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.IO.FileInfo</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Author: Mark Kerry Date: 08/01/2018</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <dev:code>Get-OrphanedPatch</dev:code> <dev:remarks> <maml:para>Simply lists orphaned msp files in "C:\Windows\Installer"</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title> <dev:code></dev:code> <dev:remarks> <maml:para>If you want to free up space I recommend moving the orphaned msp files to another location so they can easily be restored. Supports the "-Whatif" and "Verbose" paramters.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title> <dev:code>Get-OrphanedPatch | Remove-OrphanedPatch</dev:code> <dev:remarks> <maml:para>This will permanently delete the orphaned msp files from "C:\Windows\OInstaller". Supports the "-Whatif" and "Verbose" paramters.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks /> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Move-OrphanedPatch</command:name> <command:verb>Move</command:verb> <command:noun>OrphanedPatch</command:noun> <maml:description> <maml:para>Moves the orphaned patches to a specified backup location.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>This function recieves the [System.IO.FileInfo] objects through the pipeline from Get-OrphanedPatch. It will move each object to a specified backup location. The location can be created if it doesn't exist.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Move-OrphanedPatch</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="none"> <maml:name>item</maml:name> <maml:Description> <maml:para>Single patch you would like to move.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">FileInfo</command:parameterValue> <dev:type> <maml:name>FileInfo</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>Destination</maml:name> <maml:Description> <maml:para>Location of where you want to move the orphaned patches to. If it doesn't exist it will be created.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="wi"> <maml:name>WhatIf</maml:name> <maml:Description> <maml:para>Performs a demonstation of what patches will be moved without moving them.</maml:para> </maml:Description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="cf"> <maml:name>Confirm</maml:name> <maml:Description> <maml:para>Confirm the action.</maml:para> </maml:Description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="none"> <maml:name>item</maml:name> <maml:Description> <maml:para>Single patch you would like to move.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">FileInfo</command:parameterValue> <dev:type> <maml:name>FileInfo</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>Destination</maml:name> <maml:Description> <maml:para>Location of where you want to move the orphaned patches to. If it doesn't exist it will be created.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="wi"> <maml:name>WhatIf</maml:name> <maml:Description> <maml:para>Performs a demonstation of what patches will be moved without moving them.</maml:para> </maml:Description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="cf"> <maml:name>Confirm</maml:name> <maml:Description> <maml:para>Confirm the action.</maml:para> </maml:Description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues /> <maml:alertSet> <maml:alert> <maml:para>Author: Mark Kerry Date: 08/01/2018</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <dev:code>-Destination <string></dev:code> <dev:remarks> <maml:para>Don't use this unless you have identified one patch to move. To move all use the below command.</maml:para> <maml:para>Get-OrphanedPatch | Move-OrphanedPatch -Destination <String></maml:para> <maml:para>This will move the orphaned patches to a different location so they can be restored to "C:\Windows\Installer" directory if needed. Supports the "-Whatif" and "Verbose" paramters.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks /> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Restore-OrphanedPatch</command:name> <command:verb>Restore</command:verb> <command:noun>OrphanedPatch</command:noun> <maml:description> <maml:para>Restores the previously backed up msp files</maml:para> </maml:description> </command:details> <maml:description> <maml:para>This function can be run in the event of needing to restore the moved msp files.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Restore-OrphanedPatch</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>BackupLocation</maml:name> <maml:Description> <maml:para>Location of the prevously moved msp files</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="wi"> <maml:name>WhatIf</maml:name> <maml:Description> <maml:para>Performs a demonstation of what patches will be moved without moving them.</maml:para> </maml:Description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="cf"> <maml:name>Confirm</maml:name> <maml:Description> <maml:para>Confirm the action.</maml:para> </maml:Description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>BackupLocation</maml:name> <maml:Description> <maml:para>Location of the prevously moved msp files</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="wi"> <maml:name>WhatIf</maml:name> <maml:Description> <maml:para>Performs a demonstation of what patches will be moved without moving them.</maml:para> </maml:Description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="cf"> <maml:name>Confirm</maml:name> <maml:Description> <maml:para>Confirm the action.</maml:para> </maml:Description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues /> <maml:alertSet> <maml:alert> <maml:para>Author: Mark Kerry Date: 18/01/2018</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title> <dev:code>Restore-OrphanedPatch -BackupLocation D:\Backup</dev:code> <dev:remarks> <maml:para>Moves the previously relocated pacthes back to "C:\Windows\Installer\"</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks /> </command:command> </helpItems> |