一、下載
Get-InstalledSoftwares.ps1函數
二、導入
Get-InstalledSoftwares函數
Invoke-Expression (new-object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/mosserlee/PSTips/master/Functions/Get-InstalledSoftwares.ps1')
三、獲取軟件實例
1.獲取當前電腦所安裝的軟件
Get-InstalledSoftwares
2.獲取電腦中已經安裝的軟件,並篩選出“U啓動”相關軟件
Get-InstalledSoftwares | Where-Object {$_.Name -like "*U啓動*"}
3.指定電腦導入
函數,並過濾出“百度雲盤“Get-InstalledSoftwares
Invoke-Command -ComputerName $PC_Info -ScriptBlock {Invoke-Expression (new-object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/mosserlee/PSTips/master/Functions/Get-InstalledSoftwares.ps1') -and (Get-InstalledSoftwares).name | where {$_ -like "百度網盤"} }