Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <#
- .SYNOPSIS
- Determina si un software esta instalado en una estacion
- .DESCRIPTION
- Dado el UNC de la estacion y el nombre del software
- (puede ser parcial) busca si este software esta instalado
- .PARAMETER help
- Despliega el full help
- .PARAMETER compname
- Nombre del ordenador a conectarse, si no se da, se asume el local
- .PARAMETER softname
- Nombre del software a probar
- #>
- function Get-Installed{
- Param(
- [switch] $help,
- [string] $compname,
- [string] $softname
- )
- Process{
- if($help){
- get-help Get-Installed -full
- }
- if(!$compname){
- $compname = "localhost"
- }
- if(!$softname){
- return ;
- }
- Get-WmiObject -ComputerName $compname -Class Win32_product | Where-Object -FilterScript{ $_.Name -like (-join "*", $softname, "*") }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement