我想知道是否有一个简单轻便的方法来查看远程计算机上安装的程序? 我很想用Spiceworks,但是我想要一个更像脚本的东西。 我一直在玩WMIC一点,可以得到我的电脑程序列表,但我不知道是否可以对远程计算机做同样的事情。 有任何想法吗?
编辑:对不起,我忘记了操作系统,我们主要是使用Windows XP和7,我使用Windows 7.我正在寻找的东西在后台运行,而没有一个正在使用计算机的用户知道。 我希望能够在工作date间做到这一点,而人们正在工作,而不中断他们这样做。 我很欣赏Linux的答案,因为我想了解更多关于Linux的内容,并计划在某个时候亲自更换。
你可以使用一个Sysinternals工具PSinfo:
http://technet.microsoft.com/en-us/sysinternals/bb897550
PsInfo v1.77 – 本地和远程系统信息查看器Copyright(C)2001-2009 Mark Russinovich Sysinternals – http://www.sysinternals.com
PsInfo返回有关本地或远程Windows NT / 2000 / XP系统的信息。
用法:psinfo [-h] [-s] [-d] [-c [-t分隔符]] [filter] [\电脑[,电脑[,..]] | @file [-u用户名[-p密码]]]
-u Specifies optional user name for login to remote computer. -p Specifies password for user name. -h Show installed hotfixes. -s Show installed software. -d Show disk volume information. -c Print in CSV format -t The default delimiter for the -c option is a comma, but can be overriden with the specified character. Use "\t" to specify tab. filter Psinfo will only show data for the field matching the
过滤。 例如“psinfo服务”仅列出服务包字段。 计算机直接使用PsInfo在远程计算机或指定的计算机上执行命令。 如果省略计算机名称,则PsInfo将在本地系统上运行命令,如果指定了通配符(\ *),则PsInfo会在当前域中的所有计算机上运行该命令。 @file PsInfo将针对指定文件中列出的计算机运行。
发行
PSinfo -s \ computername
会告诉你什么是安装在远程计算机上。
在基于rpm的Linux发行版上,可以运行以下命令:
ssh <user-who-can-run-rpm>@<remote.host> 'rpm -qa | sort'
对于基于deb的发行版,将其传递给ssh命令:
'dpkg-query -l | sort'
Gentoo(根据Monksy提供的意见):
'qpkg -I | sort'
对于Solaris:
'pkginfo -i | sort'
在AIX上:
'lslpp -a all | sort'
默认情况下,可以使用作为pipe理员组成员的帐户远程使用WMIC。 您可以将只读WMI访问委托给普通用户。
SNMP也可以使用 – 你只需要configuration一个只读的社区。 你需要浏览hrSWInstalled表: snamwalk -c public -v2c server_IP hrSWInstalled
另见: http : //technet.microsoft.com/en-us/library/bb742610.aspx
这里是一个PowerShell脚本,它将连接到HKLM \ Software \ Microsoft \ Windows \ Uninstallregistry项,拉出键,获取它们的显示名称并发送到文本文件。
$temparray=@() $MachineName = 'somecomputername' $reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey([Microsoft.Win32.RegistryHive]::'LocalMachine', $MachineName) #connect to the needed key : $regKey= $reg.OpenSubKey("software\Microsoft\Windows\currentversion\uninstall\" ) #and list the properties : $programs = $regkey.GetSubKeyNames() foreach ($program in $programs) { $regKey2 = $regKey.OpenSubKey($program) $temparray += $regKey2.GetValue("DisplayName") } $temparray |Sort-Object |Out-File -FilePath "C:\testinstalledprograms.txt" -Force
如果是Windows机器,则可以在计划的作业上运行“WinAudit”(免费,只是search它)。 它生成HTML或文本报告等,您可以将其保存到networking驱动器并从远程计算机查看。
要么:
远程桌面。 你连接,并使用它,如果它是本地机器。 也在* nix中工作。
您可以使用PowerShell中的WMI:
gwmi win32_product – 计算机名Computer1