How to remotely install FSlogix on all VMs in host pool with domain admin credentials

Franklin Muthuswamy 1 Reputation point

I have a WVD host pool with 20+ VMs in the pool. I want to enable user profiles using Azure storage. I authorized the storage in AD. Storing the user profiles requires FSlogix to be installed on all the VMs in the pool with domain admin credentials.
Right now, I have to take an RDP of the VMs individually from the PDC to install the FSlogix on them. When I try to have this installed using custom script extension on the portal, the tool gets installed with local admin privileges and hence storing and retrieving the user profiles in the storage doesn't work.
I need some way to automate the installation on all VMs remotely. GPO is not an option because it only pushes the software but it only gets installed when the user logs in.
I want to know how I can install the software on all the VMs (either in one go or using custom script extension on the VMs) with domain admin credentials. When I tried passing the credentials in 'Invoke-command' with custom script in extension, it failed with "Access denied" message

Azure Virtual Desktop
Azure Virtual Desktop
A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.
1,439 questions
A set of solutions that enhance, enable, and simplify non-persistent Windows computing environments and may also be used to create more portable computing sessions when using physical devices.
474 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Andreas Baumgarten 103.2K Reputation points MVP

    Hi @Franklin Muthuswamy ,

    maybe chocolatey is an option:

    Chocolatey could be installed via Custom Script Extension.

    # Install chocolatey  
    Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString(''))  
    # install FSLogix with chocolatey  
    choco install fslogix -y  


    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Andreas Baumgarten

    0 comments No comments