Script to deploy microsoft teams

Can you whip up a script that will deploy Microsoft Teams /silent please.

@hytekcomputers ,

We have communicated with our Script Developers and have asked if this request is feasible. We will provide you a response with their feedback as soon as possible.

just following up on the script request…

@hytekcomputers ,

Our apologies for the delay. We have asked our Scripts Team for an update and are looking for their provided feedback shortly.

Add another that would like to see this script.

Hi @troxelr
We are simply letting you know that you have been added already in the script request hours ago. But due to an existing server-side bug with utilizing procedures / scripts, the requested script’s delivery will be delayed unfortunately. The fix for this server-side issue is forthcoming and details about it will be released in another forum post. We appreciate your patience on the matter.

@hytekcomputers @troxelr ,

Attached is the requested procedure. As advised by @Rick_C , we strongly recommend testing the procedure after the June 8th release.

20190607-Microsoft_Teams_Deployment.json (4.24 KB)

ok i will it doesn’t appear to work right now…no execution log when i run test…

@hytekcomputers ,

As of the moment we have a server side issue with running script procedures. Remediation steps had been performed by the Development Team and will be available after the release this coming weekend.

makes sense, also explains few other things…thanks for the quick reply,

Hi @hytekcomputers
Our script development team said that the provided script does work correctly as long as you choose to ‘Run as LocalSystem User’ and NOT ‘Run as Logged in User’. Can you please double-check on your side?

@hytekcomputers ,

We have informed our Script Developers of your feedback. We will wait for a response from our team to review the results.

Hello @hytekcomputers,

Please ensure to tun the script as a system user and please also disable the UAC in case if it doesn’t allow manual installation of software at the Endpoint.

Thank you and please let us know if the given suggestion above works for you.

thanks for the info, we have been running as system user and turning of UAC not going to work in our case.

@hytekcomputers ,

We thank you for letting us know the current set up of your infrastructure. We have forwarded your feedback to our Scripts Team.

Hello @hytekcomputers,

The script will not be able to install any software at Endpoint if the user doesn’t have permissions to do so. Please run the procedure in the Administrator account or account that has full permissions.

If you have full permissions on any folder, then please try changing the download path in the script as shown below

Try change the download path here

$Installdir = “c:\Apps\install_Teams”

New-Item -Path $Installdir -ItemType directory

$ARCH=(Get-WmiObject Win32_OperatingSystem).OSArchitecture

If ($ARCH -eq “32-bit”)

{ # Check if Software is installed already in registry. $CheckTeamsReg = Get-ItemProperty HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall* | where
{$_.DisplayName -like “Microsoft Teams*”}

Thank you and please let us know if the suggestion above works for you.

I realize this is an older thread, but I am interested in how best to troubleshoot this script. My destination test Windows 10 system is logged into an Office365 account, and is successfully setup with Endpoint Manager (I can run other procedures, get status, remote control the system). When I run this script, it reports that the procedure succeeded, and I can confirm that Microsoft Teams was properly downloaded to the computer, in the correct directory. I can even see the attempt for Teams to run, but the install never completes. There do not appear to be any errors or warnings in the Events in Windows to indicate the issue.

I have attempted this with UAC enabled and disabled, with the same result.

I have also tried deploying an MSI version of the Teams install using the Install/Manage Packages process, but the result is similar (the installer is downloaded, reports that it succeeded, but never actually runs the install properly).

I would greatly appreciate a nudge in the right direction.

My goal is simply to push an install of Microsoft Teams to remote user computers that do not have Administrator access accounts.


I believe this point here is my sticking point.

For the majority of my endpoints, the Users have restricted access and do NOT have permissions to install applications (by design). I would like to understand how to ensure that an application installation is able to run under an Administration username/permissions so such deployments are successful, without having to physically log in as an administrator on that endpoint. In the age of COVID, house calls to users to install applications is not practical, and promoting user account to local machine administrators is disastrously risky.


@andrew.pease Clone and edit one of the download and install scripts to run as System User and install the Teams machine-wide installer:

The command you need is: msiexec /i Teams_windows_x64.msi OPTIONS=“noAutoStart=true” ALLUSERS=1

How the package works:
The Teams MSI will place an installer in Program Files. Whenever a user signs into a new Windows User Profile, the installer will be launched and a copy of the Teams app will be installed in that user’s AppData folder. If a user already has the Teams app installed in the AppData folder, the MSI installer will skip the process for that user.

Optional: the “noAutoStart=true” switch:
When a user logs in to Windows, Teams is installed with the MSI and a shortcut to start Teams is added to the user’s desktop. Teams won’t start until the user manually starts Teams. After the user manually starts Teams, Teams automatically starts whenever the user logs in.

(It can take a minute or two after a user signs in for the installer to deploy Teams for that user and display the Teams desktop icon.)

Info can be found here: