#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. 搞懂MySQL分区

    一.InnoDB逻辑存储结构 首先要先介绍一下InnoDB逻辑存储结构和区的概念,它的所有数据都被逻辑地存放在表空间,表空间又由段,区,页组成. 段 段就是上图的segment区域,常见的段有数据段. ...

  2. MVC中使用Ninject依赖注入

    在.NET MVC中使用Ninject注入,主要分为以下几步: 使用NuGet包添加Ninject引用,我添加的是目前最新版本3.34 在App_Start文件夹下,创建NinjectControll ...

  3. 使用 pm2 守护你的 .NET Core 应用程序

    一.守护进程的前世今生 守护进程,英文名:"daemon",也有守护神的意思.守护进程是一个在后台运行并且不受任何终端控制的进程,不会随着会话结束而退出.诸如 mysql.apac ...

  4. 避免SQL全表模糊查询查询

    1.模糊查询效率很低: 原因:like本身效率就比较低,应该尽量避免查询条件使用like:对于like %...%(全模糊)这样的条件,是无法使用索引的,全表扫描自然效率很低:另外,由于匹配算法的关系 ...

  5. Netty中的Channel之数据冲刷与线程安全(writeAndFlush)

    本文首发于本博客,如需转载,请申明出处. GitHub项目地址 InChat 一个轻量级.高效率的支持多端(应用与硬件Iot)的异步网络应用通讯框架 前言 本文预设读者已经了解了一定的Netty基础知 ...

  6. Linux运维第二课----Linux发展史、环境准备

    一.Linux的发展 1.1969年在贝尔实验室诞生Unix,是开源免费的,之后逐渐转变为收费系统. 2.1986年谭邦宁研发mini Unix,但主要用来教学. 3.斯托曼创建FSF(自由软件基金会 ...

  7. fab 菜单实现之前传-钟表表盘

    个人很喜欢谷歌的material design,很喜欢但是没有动手弄过,今天想动手操作一下Floating Action Button菜单,网上有很多种:圆形.扇形.射线.直线等.我想在一个例子中用到 ...

  8. Linux下使用yum安装软件命令

    1.yum list | grep 要下载的文件名字2.yum install 完整文件名字3.rpm -qa | grep 软件名字 //查看版本

  9. PostgreSQL For Windows 全功能精简版

    预览 精简部分 保留全部 PostgreSQL 相关功能 删除自带的 pgadmin 4 删除文档 删除开发用头文件 删除开发用静态连接库 删除 Stack Build 工具 写了一个管理数据库用的批 ...

  10. golang 使用匿名结构体的问题

    golang允许使用匿名结构体,形如 type Test struct { param1 struct { param2 string } } 一般在使用的时候可以直接这样初始化 a := Test{ ...