#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. Python:游戏:扫雷(附源码)

    这次我们基于 pygame 来做一个扫雷,上次有园友问我代码的 python 版本,我说明一下,我所有的代码都是基于 python 3.6 的. 先看截图,仿照 XP 上的扫雷做的,感觉 XP 上的样 ...

  2. C++ 编译期封装-Pimpl技术

    Pimpl技术——编译期封装 Pimpl 意思为“具体实现的指针”(Pointer to Implementation), 它通过一个私有的成员指针,将指针所指向的类的内部实现数据进行隐藏, 是隐藏实 ...

  3. 玩转Spring Cloud之API网关(zuul)

    最近因为工作原因,一直没有空写文章,所以都是边忙项目,边利用空闲时间,周末时间学习总结,最终在下班回家后加班加点写完本篇文章,若有不足之处,还请谅解,谢谢! 本文内容导航: 一.网关的作用 二.网关与 ...

  4. 如何在IIS上发布网站

    本片博客记录一下怎么用IIS发布一个网站,以我自己电脑上一个已经开发完成的网站为例: 1.打开项目 这是我电脑上的一个项目,现在我记录一下将这个项目发布到iis上的整个过程: 2.在vs2017中发布 ...

  5. 使用curl制作简易百度搜索

    这几天研究了一下php中的curl类库,做了一个简单的百度搜索,先上代码 <div style="width:200px;height:100px;"> <div ...

  6. 在 Angular 8 中,我们可以期待些什么

    转载请注明出处:葡萄城官网,葡萄城为开发者提供专业的开发工具.解决方案和服务,赋能开发者. 本文由葡萄城翻译并发布 --- Angular 作为一款优秀的前端框架,自诞生之日起,就致力于面向前端开发者 ...

  7. VSCode 下载Models 报错

    VSCode调试部分代码时,报错,提示不能自动获取Models.报错信息如下. go: golang.org/x/crypto@v0.-80db560fac1f: unrecognized impor ...

  8. DataPipeline CTO陈肃:从ETL到ELT,AI时代数据集成的问题与解决方案

    引言:2018年7月25日,DataPipeline CTO陈肃在第一期公开课上作了题为<从ETL到ELT,AI时代数据集成的问题与解决方案>的分享,本文根据陈肃分享内容整理而成. 大家好 ...

  9. emacs 只读打开文件

    emacs 只读打开文件 : C-x C-r emacs 让buffer区变成只读 : C-x C-q emacs 让只读buffer区变成可以保存修改 : C-x C-q

  10. mysql表与表之间数据的转移

    1.相同表结构 INSERT INTO table1 SELECT * FROM table2; 2.不同表结构 INSERT INTO table1(filed1,...,filedn) SELEC ...