none
PowerShell Constrained endpoint: Using IIS logparser RRS feed

  • Question

  • Hi!

    I am trying to get IIS logparser to work in a PowerShell constrained endpoint (restrictedremoteserver). It runs without errors, but ultimately does not execute the query. If you manually run the & logparser.exe "your query" or use a function to give it the query, it works and dumps the CSVs as expected.

    Does somebody know how to overcome this problem/restriction or has some ideas how to troubleshoot this?

    I suspect that it is a restriction with launching logparser, but then I guess it should display some error or something, if it were not allowed? :/


    [SharePoint lurker]

    Monday, April 30, 2018 11:37 AM

Answers

  • The endpoint has to be reconfigured to allow the logparser to work.  The endpoint restricts all but specifically defined commands.


    \_(ツ)_/

    • Marked as answer by Vadim Shupak Sunday, May 27, 2018 10:29 AM
    Monday, April 30, 2018 12:01 PM

All replies

  • The endpoint has to be reconfigured to allow the logparser to work.  The endpoint restricts all but specifically defined commands.


    \_(ツ)_/

    • Marked as answer by Vadim Shupak Sunday, May 27, 2018 10:29 AM
    Monday, April 30, 2018 12:01 PM
  • Thanks, jrv!

    Based on your comment, I think the place to allow it is the visibleExternalCommands?

        -VisibleExternalCommands <String[]>
            Limits the external binaries, scripts, and commands that can be executed in the session to those specified in the value of this 
            parameter. Wildcard characters are supported.
            
            By default, no external commands are visible in the session.
            
            When any Visible parameter is included in the session configuration file, Windows PowerShell, removes the Import-Module cmdlet and 
            its ipmo alias from the session.
    I guess I am missing something, as it still does not output any CSVs. I will try a more simplified version.


    [SharePoint lurker]

    Monday, April 30, 2018 12:57 PM
  • If the commands have been limited you cannot use them.  Any command not included in the definition will not work.  This cannot be changed by the client.  It can only be configured on the endpoint system.


    \_(ツ)_/

    Monday, April 30, 2018 1:05 PM