There are a couple of ways you can get software installed. You can build on
what best fits you.
This is SCCM history repository: "SOFTWARE\\Microsoft\\SMS\\Mobile
Client\Software Distribution\\Execution History\\System"
in powershell:
PS C:\> Get-ChildItem "HKLM:\SOFTWARE\Microsoft\SMS\Mobile Client\Software
Distribution\Execution History\System" -Recurse
###### start scripts ####
Function Get-SoftwareList
{
Param( [string]$ComputerName
)
Try {
$sw = Get-WmiObject -Class Win32Reg_AddRemovePrograms64 -ComputerName
$ComputerName -EA stop |`
Where-Object {($_.DisplayName -notlike 'hotfix*') -and ($_.DisplayName
-notlike 'security*') -and ($_.DisplayName -notlike '*(KB*') -and
($_.DisplayName -notlike 'Microsoft Office *(*)*')}
#| ` Select-Object DisplayName,Version,InstallDate
Foreach ($SWEntry in $sw)
{
$MsgObject = [pscustomobject]@{
DisplayName = $SWEntry.DisplayName
Version = $SWEntry.Version
InstalledDate = $SWEntry.InstallDate }
$MsgObject
}
Return $sw
} #end try
Catch [system.exception]
{ "an error occurred getting software list" }
}#End Of Get-SoftwareList Function
Get-SoftwareList -computername hostname
#### End Script ####
#### start Script ####
$computers = 'cabrego'
$array = @()
foreach($pc in $computers){
#$computername=$pc.computername
#Define the variable to hold the location of Currently Installed
Programs
$UninstallKey="SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall"
#Create an instance of the Registry Object and open the HKLM base key
$reg=[microsoft.win32.registrykey]::OpenRemoteBaseKey('LocalMachine',$computername)
#Drill down into the Uninstall key using the OpenSubKey Method
$regkey=$reg.OpenSubKey($UninstallKey)
#Retrieve an array of string that contain all the subkey names
$subkeys=$regkey.GetSubKeyNames()
#Open each Subkey and use GetValue Method to return the required values
for each
foreach($key in $subkeys){
$thisKey=$UninstallKey+"\\"+$key
$thisSubKey=$reg.OpenSubKey($thisKey)
$obj = New-Object PSObject
$obj | Add-Member -MemberType NoteProperty -Name "ComputerName"
-Value $computername
$obj | Add-Member -MemberType NoteProperty -Name "DisplayName"
-Value $($thisSubKey.GetValue("DisplayName"))
$obj | Add-Member -MemberType NoteProperty -Name "DisplayVersion"
-Value $($thisSubKey.GetValue("DisplayVersion"))
$obj | Add-Member -MemberType NoteProperty -Name "InstallLocation"
-Value $($thisSubKey.GetValue("InstallLocation"))
$obj | Add-Member -MemberType NoteProperty -Name "Publisher" -Value
$($thisSubKey.GetValue("Publisher"))
$obj | Add-Member -MemberType NoteProperty -Name "InstallSource" -Value
$($thisSubKey.GetValue("InstallSource"))
$array += $obj
}
}
$array | Where-Object { $_.DisplayName } | select
DisplayName,DisplayVersion,InstallSource | ft -auto
#### End Script ####
On Wed, Feb 19, 2014 at 12:45 AM, Todd Hemsell <[email protected]> wrote:
> Select ARPDisplayName0, InstallSource0 From v_gs_installed_Software
>
> On Wed, Feb 19, 2014 at 2:04 AM, Ranvir singh <[email protected]>
> wrote:
> > Hi CESAR.ABREG0
> >
> > can you give the power shell template..
> >
> >
> > A powershell script should give you that info very easy from remote
> systems
> > real time onto excel. I have a template that can get you started
> somewhere
> > or there are multiple samples out there.
> >
> >
> > On Fri, Mar 15, 2013 at 3:32 AM, CESAR.ABREG0 <[email protected]>
> wrote:
> >>
> >> A powershell script should give you that info very easy from remote
> >> systems real time onto excel. I have a template that can get you started
> >> somewhere or there are multiple samples out there.
> >> sent from BB
> >> ________________________________
> >> From: "Beardsley, James" <[email protected]>
> >> Sender: [email protected]
> >> Date: Thu, 14 Mar 2013 21:21:46 +0000
> >> To: [email protected]<[email protected]>
> >> ReplyTo: [email protected]
> >> Subject: RE: [mssms] Query For Specific application Installed on
> Specific
> >> machine's - By which installation method it installed (Using SCCM or
> >> manually )
> >>
> >> You could also drill down into the registry to the "Uninstall" key on a
> >> machine and find the application you're looking to prove was installed
> by
> >> SCCM. Theres an "InstallSource" string and the value should either
> point to
> >> the local SCCM cache folder within %WINDIR% or if it was run from the
> DP, it
> >> would point to the SMSPKGx$ share on the server.
> >>
> >>
> >>
> >> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
> >>
> >>
> >>
> >> And
> >>
> >>
> >>
> >>
> >>
> HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall
> >>
> >>
> >>
> >> From: [email protected]
> >> [mailto:[email protected]] On Behalf Of Lutz, Ken
> >> Sent: Thursday, March 14, 2013 4:23 PM
> >> To: [email protected]
> >> Subject: RE: [mssms] Query For Specific application Installed on
> Specific
> >> machine's - By which installation method it installed (Using SCCM or
> >> manually )
> >>
> >>
> >>
> >> Not sure if this is a big help, but if you can cross reference package
> ID
> >> each workstation should have the install history at the following
> registry
> >> location:
> >>
> >>
> >>
> >> HKLM\Software\Microsoft\SMS\Mobile Client\Software Distribution\
> Execution
> >> History\System
> >>
> >>
> >>
> >> This location should be valid for both SCCM 2007 & 2012.
> >>
> >>
> >>
> >> Thanks,
> >>
> >> Ken ...
> >>
> >>
> >>
> >> From: [email protected]
> >> [mailto:[email protected]] On Behalf Of Ranvir singh
> >> Sent: Thursday, March 14, 2013 12:48 PM
> >> To: [email protected]
> >> Subject: [mssms] Query For Specific application Installed on Specific
> >> machine's - By which installation method it installed (Using SCCM or
> >> manually )
> >>
> >>
> >>
> >> Hi All,
> >>
> >> I want to find How it got installed on Specific machine's for Specific
> >> application' /Product .Mean to say with the Help of SCCM or manually
> >> installed (using DVD,or USB drive ,etc)..
> >>
> >> Basically I faced scenario that 6 months back I have push 1 Application
> >> which is installed 95% of machine's with help of SCCM. Now all adverts
> are
> >> deleted.(no report or no Log files in client machines)..Now my client is
> >> Saying Most of the machine's Installed with the help of Service Desk
> Team..
> >>
> >> So now I don't have any proof with me .They have installed very less
> >> percentage
> >>
> >> Is thier any way to find with the Help WMI or Script or Inventory based
> in
> >> each machine's it deployed with SCCM or manually installed ?
> >>
> >>
> >>
> >>
> >>
> >> ________________________________
> >>
> >> IRS Compliance: Any tax advice contained in this communication
> (including
> >> any attachments) is not intended or written to be used, and cannot be
> used,
> >> for the purpose of (i) avoiding penalties imposed under the Internal
> Revenue
> >> Code or applicable state or local tax law or (ii) promoting, marketing,
> or
> >> recommending to another party any transaction or matter addressed
> herein.
> >>
> >> ________________________________
> >>
> >> Confidentiality Notice: This e-mail is intended only for the addressee
> >> named above. It contains information that is privileged, confidential or
> >> otherwise protected from use and disclosure. If you are not the intended
> >> recipient, you are hereby notified that any review, disclosure,
> copying, or
> >> dissemination of this transmission, or taking of any action in reliance
> on
> >> its contents, or other use is strictly prohibited. If you have received
> this
> >> transmission in error, please reply to the sender listed above
> immediately
> >> and permanently delete this message from your inbox. Thank you for your
> >> cooperation.
> >>
> >>
> >>
> >
> >
>
>
>
>