Apps doesn't make a profile anymore
This commit is contained in:
parent
bc7a063cbb
commit
40c0936ea8
|
|
@ -24,10 +24,13 @@
|
||||||
Select-Object @{N='DisplayName';E={$_.Name}} |
|
Select-Object @{N='DisplayName';E={$_.Name}} |
|
||||||
Sort-Object -Property DisplayName
|
Sort-Object -Property DisplayName
|
||||||
} else {
|
} 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
|
||||||
Get-Package -ProviderName Programs -IncludeWindowsInstaller |
|
if (Test-Connection -ComputerName $comp -Count 1) {
|
||||||
Select-Object @{N='DisplayName';E={$_.Name}} |
|
$localapps = Invoke-Command -ComputerName $ComputerName -SessionOption $(New-PSSessionOption -MaxConnectionRetryCount 1 -NoMachineProfile) -ScriptBlock {
|
||||||
Sort-Object -Property DisplayName
|
Get-Package -ProviderName Programs -IncludeWindowsInstaller |
|
||||||
|
Select-Object @{N='DisplayName';E={$_.Name}} |
|
||||||
|
Sort-Object -Property DisplayName
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue