none
retrieve UM Auto Attendant configuration

    Question

  • in this-link there are many shell commands for editing UM Auto Attendant configuration , 

    but there are no commands for retrieve the same information ... is EWS API is the answer? 

    I'm trying with C# / shell commands to get these information 

    How I  : 

    get UMAutoAttendant Business Hours ?

    get Business Hours Greeting ? 

    etc...

    for example you can change business hours schedule  , but you can't get the same data

    Set-UMAutoAttendant -Identity MyUMAutoAttendant -BusinessHoursSchedule 0.10:45-0.13:15,1.09:00-1.17:00,6.09:00-6.16:30

    I wanna retreive the same information 

    0.10:45-0.13:15,1.09:00-1.17:00,6.09:00-6.16:30

    the only thing i can get is

    [PS] C:\Windows\system32>Get-UMAutoAttendant -Identity ZakosUM
    
    Name              UMDialPlan                PilotIdentifierList       SpeechEnabled            Status
    ----              ----------                -------------------       -------------            ------
    ZakosUM           DP                        {}                        True                     Enabled

    thanks





    • Edited by Zakos Sunday, January 12, 2014 3:47 PM
    Sunday, January 12, 2014 3:42 PM

Answers

  • If you only use

    Get-UMAutoAttendant -Identity ZakosUM

    Then you won't see all the available properties see http://technet.microsoft.com/en-us/library/dd347677.aspx "Windows PowerShell does not show all property values by default. To show all of properties of an object, use the Format-List" you need to use something like

    Get-UMAutoAttendant -Identity ZakosUM | fl

    To see everything available or more specifically something like

    Get-UMAutoAttendant -Identity ZakosUM | select Name,BusinessHoursSchedule

    To just filter on these setting.

    Cheers
    Glen

    • Marked as answer by Zakos Monday, January 13, 2014 7:51 AM
    Monday, January 13, 2014 3:12 AM

All replies

  • If you only use

    Get-UMAutoAttendant -Identity ZakosUM

    Then you won't see all the available properties see http://technet.microsoft.com/en-us/library/dd347677.aspx "Windows PowerShell does not show all property values by default. To show all of properties of an object, use the Format-List" you need to use something like

    Get-UMAutoAttendant -Identity ZakosUM | fl

    To see everything available or more specifically something like

    Get-UMAutoAttendant -Identity ZakosUM | select Name,BusinessHoursSchedule

    To just filter on these setting.

    Cheers
    Glen

    • Marked as answer by Zakos Monday, January 13, 2014 7:51 AM
    Monday, January 13, 2014 3:12 AM
  • thanks , what's the best way to parsing this information if I wanna read it and display it on my web/software/etc ?

    Monday, January 13, 2014 7:47 AM
  • You can execute the cmdlets from Managed code using Remote powershell http://msdn.microsoft.com/en-us/library/office/ff326159(v=exchg.140).aspx

    eg

                System.Security.SecureString secureString = new System.Security.SecureString();
                foreach (char c in Password)
                    secureString.AppendChar(c);
                PSCredential credential = new PSCredential(AdminUserName, secureString);
                WSManConnectionInfo connectionInfo = new WSManConnectionInfo(new Uri("https://" + PSServerName), "http://schemas.microsoft.com/powershell/Microsoft.Exchange", credential);
                connectionInfo.AuthenticationMechanism = AuthenticationMechanism.Basic;
                connectionInfo.SkipCACheck = true;
                connectionInfo.SkipCNCheck = true;
    
                connectionInfo.MaximumConnectionRedirectionCount = 4;
                Runspace runspace = System.Management.Automation.Runspaces.RunspaceFactory.CreateRunspace(connectionInfo);
                runspace.Open();
                Pipeline plPileLine = runspace.CreatePipeline();
                Command gmUMAutoAttendant = new Command("Get-UMAutoAttendant");
                gmUMAutoAttendant.Parameters.Add("Identity", "test");
                plPileLine.Commands.Add(gmUMAutoAttendant);
                Collection<PSObject> RsResultsresults = plPileLine.Invoke();
                foreach (PSObject obj in RsResultsresults)
                {
                    PSObject bhs = (PSObject)obj.Properties["BusinessHoursSchedule"].Value;
                    ArrayList bhsObj = (ArrayList)bhs.BaseObject;
                    foreach(String Element in bhsObj){
                        Console.WriteLine(Element);
                    }               
                }
                plPileLine.Stop();
    Cheers
    Glen

    Tuesday, January 14, 2014 5:03 AM