WebAdministration in a JEA endpoint

Welcome Forums General PowerShell Q&A WebAdministration in a JEA endpoint

This topic contains 3 replies, has 2 voices, and was last updated by

2 years, 1 month ago.

  • Author
  • #60838

    Points: 24
    Rank: Member

    I have configured a JEA endpoint with these settings only:
    ModulesToImport = 'WebAdministration'
    SessionType = 'RestrictedRemoteServer'
    RunAsVirtualAccount = $true

    Some cmdlets work as expected, but some, like 'Stop-Website' and 'Start-Website' return the follwing error:

    Cannot find a provider with the name 'Variable'.
        + CategoryInfo          : ObjectNotFound: (Variable:String) [Stop-Website], ProviderNotFoundException
        + FullyQualifiedErrorId : ProviderNotFound,Microsoft.IIs.PowerShell.Provider.StopWebsiteCommand

    I have tried all the combinations of SessionType and LanguageMode, the only way it works is with a 'Default' SessionType, regardless of the LanguageMode. I have also checked the PSProviders and PSDrives and it seems they are all loaded.
    I don't want to use the Default SessionType because it misses the whole point..

    Any idea how to troubleshoot this?

  • #60883

    Points: 1,811
    Helping HandTeam Member
    Rank: Community Hero

    The module is attempting to map a drive to the Variable PSProvider, which the other SessionType doesn't provide. The module is, in other words, poorly written for JEA's use case.

  • #60906

    Points: 24
    Rank: Member

    Thanks Don,
    The thing is that the 'Variable' PSProvider and the 'Variable' PSDrive are both registered (I can see them with get-psprovider and get-psdrive)

    I guess it's another command that the module is missing which I have no way to find out.

  • #60907

    Points: 24
    Rank: Member

    I have finally overcomed this by adding this to the psrc file:
    VisibleProviders = 'Variable', 'WebAdministraion'

    Thanks for the direction!

The topic ‘WebAdministration in a JEA endpoint’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort