Apps doesn't make a profile anymore
This commit is contained in:
parent
bc7a063cbb
commit
40c0936ea8
|
|
@ -24,12 +24,15 @@
|
|||
Select-Object @{N='DisplayName';E={$_.Name}} |
|
||||
Sort-Object -Property DisplayName
|
||||
} else {
|
||||
$localapps = Invoke-Command -ComputerName $ComputerName -SessionOption $(New-PSSessionOption -MaxConnectionRetryCount 1) -ScriptBlock {
|
||||
#Checks if pc is online so Invoke doesn't hang on offline pc
|
||||
if (Test-Connection -ComputerName $comp -Count 1) {
|
||||
$localapps = Invoke-Command -ComputerName $ComputerName -SessionOption $(New-PSSessionOption -MaxConnectionRetryCount 1 -NoMachineProfile) -ScriptBlock {
|
||||
Get-Package -ProviderName Programs -IncludeWindowsInstaller |
|
||||
Select-Object @{N='DisplayName';E={$_.Name}} |
|
||||
Sort-Object -Property DisplayName
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$out = $86apps + $64apps
|
||||
$apps = @()
|
||||
|
|
|
|||
Loading…
Reference in a new issue