locked
Add reporting service point role to site on SCCM via .Net RRS feed

  • Question

  • I would like to add a new role to a site on SCCM programmatically (using C#). Any help, advice or suggestion will be very useful.

    Thanks in advance,

    Wednesday, July 13, 2016 1:04 PM

Answers

  • Dear Sir,

    Below link and its sub links may be helpful:

    How to Deploy a Site System Role:

    https://msdn.microsoft.com/en-us/library/hh949636.aspx

    Best regards

    Frank


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    • Marked as answer by _go_ Thursday, July 14, 2016 2:08 PM
    Thursday, July 14, 2016 2:10 AM

All replies

  • Dear Sir,

    Below link and its sub links may be helpful:

    How to Deploy a Site System Role:

    https://msdn.microsoft.com/en-us/library/hh949636.aspx

    Best regards

    Frank


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    • Marked as answer by _go_ Thursday, July 14, 2016 2:08 PM
    Thursday, July 14, 2016 2:10 AM
  • Hello,

    Thanks for the help, it is very useful. I have one more question related, how can I get the property names of the role added? In my case I want to add a SMS SRS Reporting service role, but I do not know if the embedded property names that I am using are correct.

    Thanks again for your help,

    GO

    EDIT:

    Since I did not find any documentation above this and I have already installed a reporting services point manually, I am using the following code to get the embedded property names:

    //...       
    
    WqlConnectionManager connection = new WqlConnectionManager();
    connection.Connect(Environment.MachineName);
    
    string query = "SELECT * FROM SMS_SCI_SysResUse  WHERE RoleName='SMS SRS Reporting point' ";
            IResultObject resList = connection.QueryProcessor.ExecuteQuery(query);
    
    if (resList != null)
    {
        foreach (IResultObject res in resList)
        {
            Dictionary<string, IResultObject> dict = res.EmbeddedProperties;
    
            foreach(var key in dict.Keys)
            {
                Console.WriteLine("\nkey " + key);
            }
        }
    }
    
    //...

    • Edited by _go_ Thursday, July 14, 2016 2:58 PM
    • Proposed as answer by Frank Dong Friday, July 15, 2016 2:02 AM
    Thursday, July 14, 2016 2:05 PM
  • There's PowerShell cmdlets that you can use for adding and configuring the SRP. Unlike other site roles this one is kind of a pain to set up manually.

    If this isn't an option, try the cmdlet with debug and verbose logging enabled ($DebugPreference = 'Continue' and -Verbose) and that will give you a pretty good idea of what you need to set in your program since it will log all of the embedded properties it's setting.


    Check out my Configuration Manager blog at http://aka.ms/ameltzer

    Wednesday, August 31, 2016 7:10 PM