WebAdministration in a JEA endpoint

This topic contains 3 replies, has 2 voices, and was last updated by  Ori Besser 9 months, 3 weeks ago.

  • Author
    Posts
  • #60838

    Ori Besser
    Participant

    Hi,
    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

    Don Jones
    Keymaster

    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

    Ori Besser
    Participant

    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

    Ori Besser
    Participant

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

    Thanks for the direction!

You must be logged in to reply to this topic.