locked
SQL 2008 R2 BPA errors out while running locally RRS feed

  • Question

  • when running SQL 2008 R2 BPA locally on a SQL server,  the user is a both Local Administrator and Sysadmin of SQL Server.

    Issue: User is not a member of Administrators group on remote machine, OR 2. Powershell Remoting is not Enabled on Remote Server

    Impact: Analysis cannot be performed

    Resolution:

    1. Add user as a member of Administrators group, OR 2. Run Commands Enable-PSRemoting -f through PowerShell command prompt using elevated privileges, AND 3. Run Command winrm set winrm/config/winrs `@`{MaxShellsPerUser=`"10`"`} through PowerShell command prompt using elevated privileges

    We verified that the WinRM service is running using the following command:  get-service winrm

    Run the following command: Enable-PSRemoting -force

    Increased the max PS users: winrm set winrm/config/winrs `@`{MaxShellsPerUser=`"10`"`}

    Appreciate any pointers to troubleshoot the issue.


    Prabhaker

    Thursday, December 6, 2012 3:16 PM

All replies

  • Thursday, December 6, 2012 3:47 PM
  • Hi,

    The problem is with the BPA scripts, bugs have been reported with scripts, by enabling PowerShell files for BPA AND CORRECTING PATH problem you should be able run BPA,

    Following directories are used

    Report output directory        

    %localappdata%\Microsoft\MicrosoftBaselineConfigurationAnalyzer 2\Reports\SQL2008R2BPAResults

    Model configuration path   

     %Programdata%\Microsoft\Microsoft Baseline Configuration Analyzer 2\Models\SQL2008R2BPA

    Temp and log files directory    

    %temp%\SQL2008R2BPA\SQL2008\<date>_<time>

    Now use files for Powershell  located in

    %Programdata%\Microsoft\Microsoft Baseline Configuration Analyzer 2\Models\SQL2008R2BPA

    Open PowerShell (using Admin rights) and open then the file SQL2008R2BPA.ps1

    error is given from this file (IsPSRemotingEnabled = false)

    To solve above issue

    Set-Item WSMan:\localhost\client\trustedhosts * -force

    After this step error should change,but a new error will appear to solve that below mentioned steps have to be taken

    Now I open the file Engine.ps1 found in found in

    %Programdata%\Microsoft\Microsoft Baseline Configuration Analyzer 2\Models\SQL2008R2BPA\Engine


    the error is in this code:

    $SQLInstanceID = $SQLInstallPath[3]

    So simply modify Engine.ps1

    from

    $SQLInstanceID = $SQLInstallPath[3]

    to

    $SQLInstanceID = $SQLInstallPath[4]


    Also if neededd modify  ReportingServices.ps1

    from

    $RSInstance = $RSInstallPath[3]

    to

    $RSInstance = $RSInstallPath[4]

    To make it simple use  find  and replace option, will not take more than 5 mniutes.

    You may need to also modify AnalysisServices.ps1, IntegrationServices.ps1 and Replication.ps1 depending upon usage.



    Please help and appreciate others by using these features: "Propose As Answer", "Vote As Helpful" and "Mark As Answer"

    Waqas

    MS(SPM), MS(E&F), MCP, MCT, MCTS, MCITP, MCSE, MCPD, MCSD, MCDBA , Author
    Twitter: @waqas8777
    Linked In: http://www.linkedin.com/in/waqasm1

    • Proposed as answer by Waqas M Wednesday, January 9, 2013 10:21 AM
    Monday, January 7, 2013 1:24 PM