cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Cognitnaut
Engaged Sweeper II

Hello. I have a PS1 file that works locally without issue. It installs the Microsoft App Installer and prerequisite MSIXbundle, and APPX files, and then installs the MS Teams app MSIX file. The script and files are in the same directory and the PS1 is simply:

add-appxpackage -path Microsoft.UI.Xaml.2.8_8.2310.30001.0_x64__8wekyb3d8bbwe.Appx
add-appxpackage -path Microsoft.VCLibs.140.00.UWPDesktop_14.0.33519.0_x64__8wekyb3d8bbwe.Appx
add-appxpackage -path Microsoft.DesktopAppInstaller_2024.307.343.0_neutral_~_8wekyb3d8bbwe.Msixbundle
add-appxpackage -path MSTeams-x64.msix
 I have made a command step and tried many many variations (10+) to get it to work after combing the forums. I have tried copying the files to the local machine and running it from there, and running it from the repo but it made no difference. No matter the syntax I use, I either get a "Completed successfully" message but the app is not installed, a timeout (I have it set to 10 minutes), or a syntax error. I am getting frustrated, as I have made many packages before, but this one refuses to work. Does anyone have some insight as to what the issue might be? 

FWIW, we also have a PDQ Deploy license, and I have used the same PS1 file with their deployment software, and it works without incident, but I would like to use LS for its reporting and deployment off that reporting. 

1 ACCEPTED SOLUTION
ErikT
Lansweeper Tech Support
Lansweeper Tech Support

@Cognitnaut 

 

Try use the Invoke-command: 

powershell.exe -command (Invoke-Command -ScriptBlock {“\\path\to\script.ps1 -argument”})

Make sure that the Power Shell script is present in the specified folder on your share. By default, this is the Program Files (x86)\Lansweeper\PackageShare\Installers folder on your Lansweeper server. 

 

If the file is not in the Installers subfolder, move it to this location or change the path in your Deployment\Security Options settings.
 

View solution in original post

2 REPLIES 2
Cognitnaut
Engaged Sweeper II

I admit that I found an alternative solution to the problem I was having on this microsoft site: 
https://learn.microsoft.com/en-us/microsoftteams/new-teams-bulk-install-client?trk=article-ssr-front...

They created a installer that allowed me to bulk install without the powershell command, and to every user. I think part of the problem was that the software is a UWP app, and not a traditional program. They generally do not install to all users on a computer, and have to be individually installed, but the .exe they made solves that problem. 

That being said, I did not see this solution in the other forum post responses, and this looks to be the correct answer to this problem. Thanks for pointing me to this very powerful command. I have never really looked into all the possibilities of what you can do with it, but the fact you can run scripts on remote machines themselves and as a designated user, makes me think this would of been the right track. 

Thanks! 

ErikT
Lansweeper Tech Support
Lansweeper Tech Support

@Cognitnaut 

 

Try use the Invoke-command: 

powershell.exe -command (Invoke-Command -ScriptBlock {“\\path\to\script.ps1 -argument”})

Make sure that the Power Shell script is present in the specified folder on your share. By default, this is the Program Files (x86)\Lansweeper\PackageShare\Installers folder on your Lansweeper server. 

 

If the file is not in the Installers subfolder, move it to this location or change the path in your Deployment\Security Options settings.