2

Get_SPProduct cmdlets behaving weird:

  1. On running GET-SPProduct -Local to one of server in farm throws error

Get-SPProduct : Object reference not set to an instance of an object. At line:1 char:14 + Get-SPProduct <<<< -Local + CategoryInfo : InvalidData: (Microsoft.Share...letGetSPProduct:SpCmdletGetSPProduct) [Get-SPProduct], NullReferenceException + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SpCmdletGetSPProduct

  1. Unable to get Farm-Level and Server Patch Level information. These commands don't work:

get-spproduct |get-member $sp2010 = get-spproduct $sp2010.servers $sp2010.InstallStatus $sp2010.RequiredButMissingPatchableUnits $sp2010.RequiredButMissingPatches $sp2010.RequiredButMissingProducts

Refering :

http://blogs.msdn.com/b/mutaz/archive/2011/07/22/check-the-build-level-status-of-components-within-your-sharepoint-2010-farm.aspx

Please advice

-prs

PRS
  • 21
  • 3

1 Answers1

0

Run Get-SPProduct on your command line. If you are listed with multiple products, then use the index for the commands mentioned in the blog. Eg:

PS C:\> $spprod = Get-SPProduct
[If listed with more than one product]
PS C:\> $spprod[0].Servers | select ServerName, Products, InstallStatus

 $spprod[0].Servers | ? { $_.InstallStatus -eq "InstallRequired" } | % { $_.RequiredButMissingPatches }
Robert Lindgren
  • 24,520
  • 12
  • 53
  • 79