[Installation] :: Folder [C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\Microsoft\teams\application cache\cache] does not exists…
Basically what I’m trying to accomplish is:
Close Teams (I have that worked by using: Show-InstallationWelcome -CloseApps ‘Teams’ -Silent -CheckDiskSpace)
Delete the files/folders under those locations (which are user locations)…
I just can’t seem to get it working… I was originally going to have PSAD call a separate powershell script but wanted the logging…
How are you deploying this? SCCM? If so, Since it’s Teams (which unfortunately resides in the user’s profile) you could call it as a per user deployment instead of a per-system.
You cannot run Powershell scripts as a User in SCCM. It will always show a UAC Prompt. Except if you would disable it via GPO, but don’t do that!
Alternatively you could wrap that in a .BAT file and deploy the .BAT as a user. That would work.
But that’s really not necessary as PSADT is powerfull enough to handle user-centric tasks as well.