Get the hotfixes that have been applied to the local and remote computers.

      Get-HotFix [[-Id] string[]] [-ComputerName string[]]
         [-Credential PSCredential] [CommonParameters]

Get-HotFix [-Description string[]] [-ComputerName string[]] [-Credential PSCredential] [CommonParameters] Key -ComputerName string[]
Specify a remote computer.
Type a NetBIOS name, an Internet Protocol (IP) address, or a fully qualified domain name of a remote computer'
The default is the local computer.

This parameter does not rely on PowerShell remoting.

-Credential PSCredential
Specify a user account that has permission to perform this action. The default is the current user.

Type a user name, such as "User64" or "Domain64\User64", or enter a PSCredential object, such as one generated by Get-Credential. If you type a user name, you will be prompted for a password.

-Description string[]
Get only hotfixes with the specified descriptions. Wildcards are permitted. The default is all hotfixes on the computer.

-Id string[]
Get only hotfixes with the specified hotfix IDs. The default is all hotfixes on the computer. CommonParameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -WarningAction, -WarningVariable, -OutBuffer -OutVariable.


Get all hotfixes on the local computer:

PS C:\> get-hotfix

Get all hotfixes on Server64 and Server65 that have a description that begins with "Security":

PS C:\> get-hotfix -description Security* -computername Server64, Server65 -cred Server64\billg

Check all the servers listed in the Servers.txt file, for those which are missing the KB957095 security update write the computer name out to a second file:

PS C:\> $a = get-content servers.txt
PS C:\> $a | foreach { if (!(get-hotfix -id KB957095 -computername $_)) { add-content $_ -path Missing.txt }}

Get the installed hotfixes, sort them by InstalledOn, and then use array notation to select the last item in the array:

PS C:\> (get-hotfix | sort installedon)[-1]

“If it ain't broke, don't fix it' is the slogan of the complacent, the arrogant or the scared. It's an excuse for inaction, a call to non-arms” ~ Colin Powell

Related PowerShell Commands:

Get-ComputerRestorePoint - Get the restore points on the local computer

Copyright © 1999-2019
Some rights reserved