#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. 秋招提前批小结(CVTE一面挂、阿里三面挂)

    7月27日:CVTE一面 30分钟(挂) 1.自我介绍 2.有没有做过JavaWeb相关的项目?你觉得难点在哪里呢? 3.你这个博客系统有没有加权限系统?如果被拦截封包获取了账号密码怎么办?(没加,凉 ...

  2. python学习第四讲,python基础语法之判断语句,循环语句

    目录 python学习第四讲,python基础语法之判断语句,选择语句,循环语句 一丶判断语句 if 1.if 语法 2. if else 语法 3. if 进阶 if elif else 二丶运算符 ...

  3. 进阶!基于CentOS7系统使用cobbler实现单台服务器批量自动化安装不同版本系统(week3_day5_part2)-技术流ken

    前言 在上一篇博文<cobbler批量安装系统使用详解-技术流ken>中已经详细讲解了cobbler的使用以及安装,本篇博文将会使用单台cobbler实现自动化批量安装不同版本的操作系统. ...

  4. 【转载】SQL语句中Union和Union All的区别

    在使用到SQL语句进行数据库查询的过程中,如果需要求两个数据集合的并集,一般会使用到联合查询关键字Union或者Union All,其实Union和Union All两者的使用有一定差别,查出来的数据 ...

  5. JavaScript 运行机制 (Event Loop)

    单线程就意味着,所有任务需要排队,前一个任务结束,才会执行后一个任务.如果前一个任务耗时很长,后一个任务就不得不一直等着. 所有任务可以分成两种,一种是同步任务(synchronous),另一种是异步 ...

  6. pythonmysql运行报错解决过程中遇到的其中一个报错解决文章来源

    本文章仅记录下面报错的解决文章来源:error: command 'C:\Users\Administrator\AppData\Local\Programs\Common\Micr osoft\Vi ...

  7. Handler,Looper,MessageQueue流程梳理

    目的:handle的出现主要是为了解决线程间通讯. 举个例子,android是不允许在主线程中访问网络,因为这样会阻塞主线程,影响性能,所以访问网络都是放在子线程中执行,对于网络返回的结果则需要显示在 ...

  8. java8及8之前日期相关类

    java 8日期相关类 Instant:精确到纳秒的时间戳 Duration:处理有关基于时间的时间量 LocalDate:只包含日期,比如:2016-10-20 LocalTime:只包含时间,比如 ...

  9. [转]Lua和Lua JIT及优化指南

    一.什么是lua&luaJit lua(www.lua.org)其实就是为了嵌入其它应用程序而开发的一个脚本语言, luajit(www.luajit.org)是lua的一个Just-In-T ...

  10. UI对象库-定位元素与程序分离

    1.前言 这几天有人问我,UI自动化测试中使用到的页面定位元素应该存放在哪里比较合适?我想说的是如果你使用的是PO设计模式设计测试用例的话,可以把定位元素存在每一个page页面,一个page存放对应的 ...