#requires -Version 2

function Get-Software
{
param
(
[string]
$DisplayName='*', [string]
$UninstallString='*', [string[]]
$ComputerName
) [scriptblock]$code =
{ param
(
[string]
$DisplayName='*', [string]
$UninstallString='*' )
$keys = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*',
'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*' $result=Get-ItemProperty -Path $keys |
Where-Object { $_.DisplayName } |
Select-Object -Property DisplayName, DisplayVersion, UninstallString |
Where-Object { $_.DisplayName -like $DisplayName } |
Where-Object { $_.UninstallString -like $UninstallString } $result
#$f=$result -contains '*autodesk*'
}
if ($PSBoundParameters.ContainsKey('ComputerName'))
{
Invoke-Command -ScriptBlock $code -ComputerName $ComputerName -ArgumentList $DisplayName, $UninstallString
}
else
{
& $code -DisplayName $DisplayName -UninstallString $UninstallString
}
} #Get-Software -ComputerName "CNKLCNSHSR2001" Import-Csv "C:\Temp\Logs\pcname.csv" |
foreach{
try{
Get-Software -ComputerName $_."pcname" }
catch{ }
}|
export-csv C:\Temp\Logs\pcname_Result.csv -notypeinformation

  

Get Remote Computer Install Software的更多相关文章

  1. RDP Error: The Identity Of The Remote Computer Cannot Be Verified

    As i always need to remote to 20 servers at the same time, so i use a tool called Remote Desktop Con ...

  2. Symantec Backup Exec Agent 推送错误Error connecting to the remote computer. Ensure that the computer is available, has WMI enabled and is not blocked by a firewall

    如果在Symantec Backup Server上推送Symantec Backup Exec Agent到数据库服务器遇到“"Error connecting to the remote ...

  3. How to copy remote computer files quickly to local computer

    if we want copy file from VM(Remote VM) to local computer. Always can not easy copy file so easy. no ...

  4. ubuntu mac terminal install software

    http-server // ubuntu sudo npm install http-server -g npm node.js yarn

  5. Visual Studio通过Web Deploy发布网站报错:An error occurred when the request was processed on the remote computer.

    这个问题很奇怪,不管我怎么重启服务器和自己的开发机,都没有用. 在网上找了很多资料,有说可以尝试去读Windows的错误日志,然后通过日志找原因…(详见Stackoverflow:http://sta ...

  6. A Connection to the remote computer could not be established

    Go to device manager: uninstall WAN Miniport (IP), Wan Miniport(IPv6) and Wan Miniport (PPTP). Refre ...

  7. [异常记录-13]Web Deploy发布:An error occurred when the request was processed on the remote computer

    大概搜了一下这个报错,大家的情况各不相同,但应该是 Web Deploy 安装导致的没错了... 建议粗暴解决,  卸载后重新安装 Web Deploy 时,不要选那个经典还是典型的安装选项,选自定义 ...

  8. 十几个remote control software

    5 alternatives to LogMeIn Free for remote PC access VNC VNC, or Virtual Network Computing, isn’t its ...

  9. Install TightVNC Server in RHEL/CentOS and Fedora to Access Remote Desktops

    Virtual Networking Computing (VNC) is a Kind of remote sharing system that makes it possible to take ...

随机推荐

  1. C++11 (多线程)并发编程总结

    | 线程 std::thread 创建std::thread,一般会绑定一个底层的线程.若该thread还绑定好函数对象,则即刻将该函数运行于thread的底层线程. 线程相关的很多默认是move语义 ...

  2. 2018~第三届南宁市网络安全技术大赛~nnctf~write-up

    Web 1.超简单 分值:100 类型:WEB 已解决 题目:超简单的web题  http://gxnnctf.gxsosec.cn:12311/ 代码审计 <?php $white_list ...

  3. 【JVM系列】一步步解析java执行内幕

    对于任何一门语言,要想达到精通的水平,研究它的执行原理(或者叫底层机制)不失为一种良好的方式.在本篇文章中,将重点研究java源代码的执行原理,即从程 序员编写JAVA源代码,到最终形成产品,在整个过 ...

  4. Revit通过API创建共享参数

    Revit共享参数是通过创建一个.txt类型的文件来保存相关信息,一旦与项目保存完毕之后,共享参数也就变成了项目参数(项目参数无法通过API创建),项目参数是保存在Revit项目里面的,所以此时这个. ...

  5. [Java] 为什么字符串比较不能用两个等号(==)

    Java中,使用"=="比较字符串时,判断的是两个字符串是否存放在相同的位置.如果两个字符串存放在相同的位置,那么它们就是相同的,使用"=="比较的结果也就是T ...

  6. HotSpot jdk 资料汇总

    http://www.oracle.com/technetwork/java/index.html https://bugs.java.com/bugdatabase/ https://docs.or ...

  7. 关于写作那些事之github告诉我构建失败,然后呢?

    The page build failed for the master branch with the following error 问题描述 看到这封邮件,一脸懵逼,本地运行 gitbook 服 ...

  8. UEFI引导的简单恢复方法

    装系统,尤其是双系统,总是无法绕过引导的坑. linux的grub是非常复杂的引导系统,学习它非常累.而windows又不能引导linux.你可能会想,怎么就没有一种简单的引导方式,就好像引导光盘,引 ...

  9. mybaties xml 的头部

    config.xml的头部: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE config ...

  10. 功能测试话题分享-0323 Bug