#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#代码安装Windows服务(控制台应用集成Windows服务)

    最近在为一款C/S架构的科研软件开发云计算版,需要用到WCF,考虑到不需要什么界面以及稳定性,无人值守性,准备用Windows Service作为宿主,无奈Windows Service的安装太为繁复 ...

  2. Java基础系列-Stream

    原创作品,可以转载,但是请标注出处地址:https://www.cnblogs.com/V1haoge/p/10748817.html 一.概述 Stream操作简称流操作,这里的流与IO流毫无关系, ...

  3. axios(封装使用、拦截特定请求、判断所有请求加载完毕)

    博客地址:https://ainyi.com/71 基于 Promise 的 HTTP 请求客户端,可同时在浏览器和 Node.js 中使用 vue2.0之后,就不再对 vue-resource 更新 ...

  4. java 排序的几篇好文章

    Java8:Lambda表达式增强版Comparator和排序(这篇文章写的不错,各种花式排序) Comparable与Comparator浅析 (基本功)

  5. php去除数组中重复值,并返回结果!

    array_unique(array) 只能处理value只有单个的数组. 去除有多个value数组,可以使用如下函数实现: function more_array_unique($arr=array ...

  6. layer.photos()异步修改图片地址后显示异常

    项目中有一个图片有预览(用的layer.photos()),需要异步修改图片地址,但是成功修改后第一次预览会显示修改前的大图,第二次以后就都正常了. 尝试修改成功后再次调用layer.photos() ...

  7. SuperMap iServer 在Linux 部署中问题总结

    SuperMap iServer 作为超图公司的云GIS服务器产品,一般是部署在Linux服务器上.下面把日常部署和使用过程中遇到的相关问题做以汇总. 1.部署iServer的第一步是要检查Linux ...

  8. Android为TV端助力:RecyclerView更新数据时焦点丢失

    1.adapter的setHasStableIds设置成true 2.重写adapter的getItemId方法 @Override public long getItemId(int positio ...

  9. datatable的部分问题处理(动态定义列头,给某行添加事件,初始显示空数据)

    一.动态定义列头 在ajax中,用datatable再去重新配置列头,当然传回的数据中,要有对应放列头的键值对 我自定义了Mock数据,用于前端自己交互. 其中,rowdata用于存放传回的数据,co ...

  10. 什么是Docker,它可干什么?

    定义我们知道,软件依赖的环境大致包括: 1• 配置文件2• 代码3• tomcat4• JDK5• 操作系统 Docker作为一个软件集装箱化平台,可以让开发者构建应用程序时,将它与其依赖环境一起打包 ...