Inconsistent output from SCVMM PowerShell commands

I noticed that the output from SCVMM commands is not consistent. I will use an example: When I run the command Get-SCVMHostGroup for the first time, the Hosts and AllChildHosts properties are null, but if I keep running the same command continuously
the values slowly start appearing. See following output:
PS C:\Users\mandardi> Get-SCVMHostGroup
AllChildGroups : {}
AllChildHosts : {}
AllowUnencryptedTransfers : False
ChildGroups : {}
CreationDate : 8/16/2011 7:32:06 PM
Creator :
Description :
Hosts : {}
ID : 0e3ba228-a059-46be-aa41-2f5cf0f4b96e
InheritPROSettings :
InheritNetworkSettings : False
IsFullyCached : True
IsRoot : True
MarkedForDeletion : False
ModificationDate : 8/16/2011 7:32:06 PM
ModifiedBy :
Name : All Hosts
ParentHostGroup :
Path : All Hosts
PROAutomationLevel :
PROMonitoringLevel :
ServerConnection : Microsoft.SystemCenter.VirtualMachineManager.Remoting.ServerConnection
PS C:\Users\mandardi> Get-SCVMHostGroup
AllChildGroups : {}
AllChildHosts : {mandar-win2k8.cvlxxxxx.local}
AllowUnencryptedTransfers : False
ChildGroups : {}
CreationDate : 8/16/2011 7:32:06 PM
Creator :
Description :
Hosts : {mandar-win2k8.cvlxxxxx.local}
ID : 0e3ba228-a059-46be-aa41-2f5cf0f4b96e
InheritPROSettings :
InheritNetworkSettings : False
IsFullyCached : True
IsRoot : True
MarkedForDeletion : False
ModificationDate : 8/16/2011 7:32:06 PM
ModifiedBy :
Name : All Hosts
ParentHostGroup :
Path : All Hosts
PROAutomationLevel :
PROMonitoringLevel :
ServerConnection : Microsoft.SystemCenter.VirtualMachineManager.Remoting.ServerConnection
The command above was run twice within an interval of few seconds, as you can see the Hosts/AllChildHosts properties are populated after the second attempt.
I want to know what is the reason for this behavior, are the properties collected asynchronously? If yes, what is the best way to prevent this?
I also noticed that when you open a new powershell window, the same behavior repeats, in fact you get correct output in one window, whereas you get null values in other. What is the reason for this and what's the work around?
Thanks in advance.
Mandar

There are times when you get a job back as the return value and not the actual queried value.
Quite frequently it has to do with the information being queried.
Getting a specific HostGroup I would expect to be relatively quick, however generically querying for all host groups might not.
I have not tried the specific scenario myself, I am describing behavior i have experienced.
Does this affect the reliability of the PoSh module?  I don't think so.  But it definately affects how you use it and its cmdlets.
I have learned that taking thinking from another virutalization environment (XenServer or vCenter for example) and expecting those same behaviors from SCVMM is a false assumption that many folks run in to.  This makes VMM neither fit nor unfit - just
different.
I am not attempting to defend VMM, just stating situations that I have been in with development teams.
Brian Ehlert (hopefully you have found this useful) http://ITProctology.blogspot.com
Learn. Apply. Repeat.

Similar Messages

  • Output from Send Unix command stalled

    after send a unix command to a client the output from
    the command stalls. It seems that the output is buffered
    and that the final buffers are not flushed. This behaviour
    is new since 10.5.5 --
    Anyone know of a way to control the buffer size, when
    they are flushed or to how to run unbuffered ??
    ARD 3.2.2 all around and 10.5.6 all around ARD on a Quad Xenon
    and clients iMac Alum

    well this seems to have been a red herring --
    I had not set the "linebuffering" option on the
    command
    the command was lapply from the radmind suite
    needed to set "-i"
    thanks

  • How to Get HTML Cell in red depending on a condition while getting a output from Sharepoint powershell

    In Below Script I am able to get "disksizerequired" number in red by below script but I want that whole Cell to be red.
    Please let me know how to do it
    # HTML code to format output
    $b = "<style>"
    $b = $b + "BODY{background-color:white;}"
    $b = $b + "TABLE{border-width: 1px;border-style: solid;border-color: black;border-collapse: collapse;}"
    $b = $b + "TH{border-width: 1px;padding: 0px;border-style: solid;border-color: black;background-color:thistle}"
    $b = $b + "TD{border-width: 1px;padding: 0px;border-style: solid;border-color: black;}"
    $b = $b + "</style>"
    # Variable initializing to send mail
    $TXTFile = "C:\Abhishek\test\test231.html"
    $SMTPServer = "mapintmail.lab.com" 
    $emailFrom = "[email protected]
    $emailTo = "[email protected]
    $subject = "Sharepoint Farms Content databases Report" 
    $emailBody = "Dailyreport on Sharepoint Farms Content databases"
    $encrypted ="01000000d08c9ddf0115d1118c7a00c04fc297eb0100000097606a1d1a7321488a23f2056c613f690000000002000000000003660000c000000010000000ebf48a9bd08c88a4de367597a1b86b390000000004800000a0000000100000006fa6c5ca0af8ad180e19cc6e5a42765e200000009a2551a74c5da425a1fa63705d1d7469fa0bb94409bf9a43ba951ee5c64d7ff614000000c9c659511fda53078b9f2e00f3b673349962affa"
    $usser1 = "lab\abhi"
    $usser2 = "labb\abhi"
    $password = ConvertTo-SecureString -string $encrypted
    $cred1 = new-object -typename System.Management.Automation.PSCredential -argumentlist $usser1,$password
    $cred2 = new-object -typename System.Management.Automation.PSCredential -argumentlist $usser2,$password
    # Creating PSSession and Loading Snapin
    $s1 = New-PSSession -Authentication CredSSP -Credential $cred1 -ComputerName LROSHRPTL01
    $s2 = New-PSSession -Authentication CredSSP -Credential $cred2 -ComputerName LROSHRPTL03
    Invoke-Command -Session $s1 -ScriptBlock {Add-PSSnapin Microsoft.SharePoint.PowerShell}
    $f1 = Invoke-Command -Session $s1 -ScriptBlock {Get-SPWebApplication | Get-SPContentDatabase}
    $g1 = $f1 | Select-Object DisplayName,WebApplication,disksizerequired,CurrentSiteCount,WarningSiteCount,MaximumSiteCount | ConvertTo-Html -Fragment DisplayName,WebApplication,CurrentSiteCount,WarningSiteCount,MaximumSiteCount,@{label="disksizerequired";expression={
     if($_.disksizerequired -gt 1024*1204*1024)
     {"#font"+$_.disksizerequired+"font#"} 
     else
     {$_.disksizerequired}
    $g1 = $g1 -replace "#font","<font color='red'>"
    $g1 = $g1 -replace "font#","</font>"
    Invoke-Command -Session $s2 -ScriptBlock {Add-PSSnapin Microsoft.SharePoint.PowerShell}
    $f2 = Invoke-Command -Session $s2 -ScriptBlock {Get-SPWebApplication | Get-SPContentDatabase}
    $g2 = $f2 | Select-Object DisplayName,WebApplication,disksizerequired,CurrentSiteCount,WarningSiteCount,MaximumSiteCount | ConvertTo-Html -Fragment DisplayName,WebApplication,CurrentSiteCount,WarningSiteCount,MaximumSiteCount,@{label="disksizerequired";expression={
     if($_.disksizerequired -gt 1024*1024*1024)
     {"#font"+$_.disksizerequired+"font#"} 
     else
     {$_.disksizerequired}
    $g2 = $g2 -replace "#font","<font color='red'>"
    $g2 = $g2 -replace "font#","</font>"
    ConvertTo-HTML -head $b -Body "<h1>$(Get-Date) Sharepoint Farm Database Content DB Report</h1> <br /> <h2>SharePoint_Config_UAT2010 $g1 SharePoint_Config_Intranet2010  $g2</h2>" | Out-File C:\Abhishek\test\test231.html 
    Invoke-Expression C:\Abhishek\test\test231.html
    # Code to Send Mail
    Send-MailMessage -SmtpServer $SMTPServer -From $emailFrom -To $emailTo -Subject $subject -Body $emailBody -Attachment $TXTFile

    If I understand the script correctly, what it will be doing at the moment is setting the font colour to red, instead of the background colour. To do this, you'd normally have to sent the attribute on the <td bgcolor='red'>, rather than using <font
    color='red'>, but you might try using a span instead.
    $g2 = $g2 -replace "#font","<span style='background-color:red;'>"
    $g2 = $g2 -replace "font#","</span>"
    If this isn't what you're looking for (because there may be an untidy margin around the span, or something), you'll need to give the <td> a classname, and then change the css for that class within $b instead. Let me know if you prefer to try that.
    OWA For SmartPhone

  • Getting output from an OS command from an ABAP program

    Hi Folks!
    I have a requirement, is it possible to call an operating system command, and also get its output back to the ABAP program that has called it?
    For example, from an ABAP program calling the "dir" command from Windows and getting back (as a string) the directory listing to the ABAP program?
    Thanx in advance!
    Juan.

    This is will help you
    << Moderator message - links removed >>
    Please do not post a list of links. This simply encourages laziness. The OP could have found these with a little work.
    Edited by: Rob Burbank on Dec 13, 2010 9:19 AM

  • Inconsistent results from hostname Unix command via ARD

    I sometimes get the DNS name and sometimes get the local sharing name.
    Some one pointed out to me
    % scutil --set HostName DNS-name
    as root will do the job.
    So the next question is can one get the Mac to cough up its DNS name or
    IP address without major acrobatics.
    For example
    % ifconfig en0 inet
    gives the IP address but you have to parse it out and
    % host IP-address
    will give the DNS name but again you have to parse it out.

    We have a bunch of machines that are all named via the Sharing panel in System Preferences. Our network is giving them a different DNS name. We'd like to be able to access the Sharing name via the command-line (hostname gives DNS name). I assume this is possible because Remote Desktop seems to get it somehow.

  • Output format of sqlplus commands under shell script

    hi experts
    Can you help with some problems please?
    1.) I try to run shell script from dbms_scheduler, which runs sqlplus and the output of sqlplus commands is written to file using command spool. To this point everything is running ok.
    My problem is, that output of this file is: (e.g.)
    SQL> PROMPT ****************USERB******************
    ****************USERB******************
    SQL> --SELECT sid
    SQL> -- FROM v
    SQL> -- WHERE audsid = SYS_CONTEXT('userenv','sessionid');
    But I don't want the whole first line in the output file. I only want the output of this command, like on the second line.
    2.) How Can I write two outputs from sqlplus using command spool running at the same time into one file?
    Like in first issue described above. The main sqlplus create a job and this execute the background sqlplus using shell script. But both, the main and the background sqlplus are written to output file at the same time. But only one is written into. But I want the both outputs in the file.
    How Can I do that, if I can?
    Thanks a lot.

    user9357436 wrote:
    hi experts
    Can you help with some problems please?
    1.) I try to run shell script from dbms_scheduler, which runs sqlplus and the output of sqlplus commands is written to file using command spool. To this point everything is running ok. then why are you here?
    My problem is, that output of this file is: (e.g.)
    SQL> PROMPT ****************USERB******************
    ****************USERB******************so remove PROMPT line from the file
    >
    SQL> --SELECT sid
    SQL> -- FROM v
    SQL> -- WHERE audsid = SYS_CONTEXT('userenv','sessionid');
    But I don't want the whole first line in the output file. I only want the output of this command, like on the second line.
    2.) How Can I write two outputs from sqlplus using command spool running at the same time into one file?you can not do so.
    Like in first issue described above. The main sqlplus create a job and this execute the background sqlplus using shell script. But both, the main and the background sqlplus are written to output file at the same time. But only one is written into. But I want the both outputs in the file.
    How Can I do that, if I can?Can't.
    Now what?
    >
    Thanks a lot.Why using DBMS_SCHEDULER to invoke OS script to run sqlplus that runs SQL statements?
    this is like making THREE Left Turns, instead of single Right Turn.
    Just invoke PL/SQL procedure that does what needs to be done.

  • Code for retrieving powershell command output

    Is there any scripting in java to get the output of powershell command.

    hello 
    please help me out
    I want to retrieve security eventlog with powershell command.but when ever run the powershell code I recieve the following error:
    Requested registry access is not allowed
    so that,I have searched  on the internet Days and nights .which I got from the Internet was change the Event log reader Group and change the
    followinfg registry key  and add read permission:
    KEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Security
    Right click and Add Read permissions for Event Log Readers.
    in spite of the above task,i can not do that.
    any help would be appreciated

  • Run port ACL command from SCVMM

    I am trying to centrally manage all my port ACLs for VM net adapters from VMM but I am not able to run the command.
    I
    try to run the command from"Add-VMNetworkAdapterExtendedAcl"SCVMM
    PowerShell terminal:
    PS C:\Users\Administrator> Add-VMNetworkAdapterExtendedAcl -VMName "Web-VM1" -Action "allow" -Direction "Outbound"
    80 "TCP" -Weight 1 -Stateful $true
    And
    get the following:
    Add-VMNetworkAdapterExtendedAcl : The cmdlet cannot find a specified class. Verify that the relevant feature is
    enabled on the operating system.
    At line:1 char:1
    + Add-VMNetworkAdapterExtendedAcl -VMName "Web-VM1" -Action "allow" -Directio ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Add-VMNetworkAdapterExtendedAcl], VirtualizationOperationFailedExcept
       ion
        + FullyQualifiedErrorId : Microsoft.HyperV.PowerShell.Commands.AddVMNetworkAdapterExtendedAclCommand
    Any ideas? Is there a similar command for SCVMM?
    SamG

    You are running a Hyper-V cmlet, not an SCVMM cmdlet.  Is the Hyper-V powershell module installed?
    as far as I know, SCVMM does not support port ACLs at this time.
    Brian Ehlert
    http://ITProctology.blogspot.com
    Learn. Apply. Repeat.
    Disclaimer: Attempting change is of your own free will.

  • Cannot read the output from windows command.

    Hello
    I have the following classes
    package cmd;
    import java.io.IOException;
    public class CMD {
        public CMD(){
            ProcessBuilder pb = new ProcessBuilder()
            .command("cmd.exe","/c","del *.*")
            .redirectErrorStream(false);
            Process p;
            try {
                p = pb.start();
                StreamGobbler errorGobbler = new StreamGobbler(p.getErrorStream(), "ERROR");
                // any output?
                StreamGobbler outputGobbler = new StreamGobbler(p.getInputStream(), "OUTPUT");
                // start gobblers
                outputGobbler.start();
                errorGobbler.start();
            } catch (IOException e) {
                // TODO Auto-generated catch block
            System.out.println("eee "+e.getMessage());;
        public static void main(String[] args) {
            System.out.println("x");
            new CMD();
            System.out.println("x");
    and
    package cmd;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    public class StreamGobbler extends Thread {
        InputStream is;
        String type;
        StreamGobbler(InputStream is, String type) {
            this.is = is;
            this.type = type;
        @Override
        public void run() {
            try {
                InputStreamReader isr = new InputStreamReader(is);
                BufferedReader br = new BufferedReader(isr);
                String line = null;
                while ((line = br.readLine()) != null)
                    System.out.println(type + "> " + line);
            catch (IOException ioe) {
                ioe.printStackTrace();
    Please note that I cannot seee the output from wndows command : del *.* and the java class execution does not finished.
    I I will replace the above command with the dir command then the output of the command is visible.
    Would you give me a hint about how to modify the above clases in order to parse the output of the del *.* ?
    Please note that the above example is important because I am developping a tool and it is mandatory for that tool to parse the output from a windows batch command.
    Best regards,

    Please note that I cannot seee the output from wndows command : del *.* and the java class execution does not finished.
    I I will replace the above command with the dir command then the output of the command is visible.
    Would you give me a hint about how to modify the above clases in order to parse the output of the del *.* ?
    No - but I will give you a hint about ProcessBuilder and how to develop software properly.
    Hint #1: Don't try to automate something that you don't know, or understand, how to do manually.
    a. Do you know how to execute 'del *.*' manually in a command window?
    b. Did you try that manually to see what happens?
    My guess is 'no'. If you had you would know that the response to a 'del *.*' command is going to be this:
    Are you sure (Y/N)?
    And your 'java class execution' doesn't finish because the 'del' command is waiting for you to answer that question.
    Hint #2: Don't try to use ProcessBuilder for an application that requires console input unless you first know how to provide that console input via your Java code.
    Your code will wait forever since it does NOT answer that question.
    Search the net and The Java Tutorials and  you can find examples of executing command line utilities. Then try those examples first and make sure that:
    1. They work for you
    2. You understand HOW they work
    Then you can modify those examples to do what you want to do.

  • Exchange Powershell Commands Missing from EMS

    I just performed a fresh install of Exchange 2013 w/ SP1 on Windows 2012 Standard R2 which is also a domain controller in an organization that already has an Exchange 2010 server (on a separate server). When I launch the Exchange Management Shell and attempt
    to run "Get-ExchangeServer" I get the error "The term 'Get-ExchangeServer' is not recognized as the name of a cmdlet, function, script file, or operable program..." I see that \\HKLM\SOFTWARE\Microsoft\PowerShell\1\PowerShellSnapIns\Microsoft.Exchange.Management.PowerShell.SnapIn
    is loading the module name "D:\Program Files\Microsoft\Exchange\bin\Microsoft.Exchange.PowerShell.Configuration.dll" (which is the correct path to that file).
    I've restarted the server twice and have the same issue. Also tried doing an unattended install of just the Managment Tools since using the setup GUI didn't give me the option of uninstalling and reinstalling the Management Tools since the checkbox is greyed
    out. I searched the ExchangeSetup log for errors and didn't find any.
    How do I get the Exchange Management Shell to register the Exchange Powershell commands? Do I need to uninstall Exchange and Re-Install?

    Open Powershell as Administrator.
    1. Add-Pssnapin *Setup*
    2. Install-CannedRbacRoleAssignments -InvocationMode Install -verbose
    3. Install-CannedRbacRoleAssignmentSRAP -InvocationMode Install -verbose
    4. Install-CannedRbacRoles -InvocationMode Install -verbose
    Try the above commands and let me know if that helps
    if that doesn't can you run the below command reply back with the output
    Get-Command |?{$_.Name -like "Get-Exchange*"}
    ***VOTE IF HELPFUL / MARK ANSWER IF ANSWERS ***
    Pavan Maganti ~ ( Exchange | 2003/2007/2010/E15(2013)) ~~ Please remember to click “Vote As Helpful&quot; if it really helps and &quot;Mark as Answer” if it answers your question, “Unmark as Answer” if a marked post does not actually answer your
    question. ~~ This Information is provided is &quot;AS IS&quot; and confers NO Rights!!

  • Accessing info. in Azure Dashboard from Rest API or powershell command let

    Azure management portal shows CPU utilization aggregated at role level when I click on a hosted service.
    Is there any way to access this info. using REST API or Azure powershell command lets?
    Can some one please comment?
    -Shiva
    Shiva

    Hi,
    To get Performance metrics from Azure Here are some resources you may try:
    Windows Azure Diagnostics and PowerShell – Performance Counters:
    Part 1 |
    Part 2
    How To Easily Enable Windows Azure Diagnostics Remotely
    Regards,
    Shirisha Paderu

  • Capturing print command output from procedures

    Is it possible to capture the output from print statements in stored procedures such as the "print" command in Sybase stored procedures? This information doesn't seem to come through the result set.
    Thanks,
    KP

    This will be database specific. Please consult your database documentation.

  • Deploying via powershell command from AppV Management Server 5.0

    Hello All,
    Good day!
    I am having hard time in deploying an application from AppV Management Server 5.0 using Powershell command.
    I have an application which works in Standalone client machine and even from SCCM 2012(AppV Deployment), whereas if I deploy that application from AppV server it is not working
    I am using this command line to deploy an application from AppV Mgmt server thru powershell command,
    Import-AppvServerPackage -PackagePath "<Path of .appv file>" –DynamicDeploymentConfigurationPath "<Path of DeploymentConfig.xml"> | Publish-AppvServerPackage -Verbose | Grant-AppvServerPackage -Groups "domain\AppV_Users"
    -Verbose
    is there anything wrong in the command which I used?
    When I run, am receiving this error.
    Import-AppvServerPackage : A parameter cannot be found that matches parameter name
    'DynamicDeploymentConfigurationPath'.
    At line:1 char:126
    + ... 1.0.3333.appv" –DynamicDeploymentConfigurationPath '\App_DeploymentConfig.xml'  ...
    +                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Import-AppvServerPackage], ParameterBindingException
        + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.AppV.Server.Cmdlets.ImportAppvServerPackageCommand
    whereas this command works, without DynamicDeploymentConfigurationPath
    Import-AppvServerPackage -PackagePath "<Path of .appv file>" | Publish-AppvServerPackage -Verbose | Grant-AppvServerPackage -Groups "domain\AppV_Users" -Verbose
    How do I direct my application to take the DeploymentConfig.xml file though powershell.
    I even tried to Import this xml from AppV Management console, even it did not work for me. 
    Kindly help me, your inputs needed.
    Any help would be greatly appreciated.
    Thanks in Advance!
    Regards,
    Raj

    Hi Falko,
    Thanks for your response.
    As you said, I tried to import the package and used set-appvserverpackage
    PS C:\Users\Administrator.xxxxxxxxxxx> Import-AppvServerPackage "\\appv\Content\Filezilla\Filezilla.appv"
    Id               : 15
    Name             : Filezilla
    Description      :
    PackageGuid      : e8720679-cc41-4578-98a4-32a382f790ef
    VersionGuid      : 296708bc-e07d-474a-bb46-1f09d9779a4c
    Version          : 0.0.0.1
    Enabled          : False
    Applications     : {}
    Entitlements     : {}
    ConnectionGroups : {}
    PackageUrl       : \\appv\Content\Filezilla\Filezilla.appv
    import was successful, when I try Set-Appvserverpackage am receiving the following error
    PS C:\Users\Administrator.xxxxxxxxxxx> Set-AppvServerPackage -DynamicDeploymentConfigurationPath "\\appv\Conte
    nt\Filezilla\Filezilla_DeploymentConfig.xml" | Publish-AppvServerPackage -Global
    Set-AppvServerPackage : Parameter set cannot be resolved using the specified named parameters.
    At line:1 char:1
    + Set-AppvServerPackage -DynamicDeploymentConfigurationPath "\\appv\Content ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Set-AppvServerPackage], ParameterBindingException
        + FullyQualifiedErrorId : AmbiguousParameterSet,Microsoft.AppV.Server.Cmdlets.SetAppvServerPackageCommand
    I am going wrong somewhere...

  • PowerShell Command to export a list of subsites from a site collection

    Is there a Powershell command to export a list of sub sites from a site collection into a .csv file?
    Thanks.

    Hi,
    According to your post, my understanding is that export subsites to excel via PowerShell.
    There is an article about this topic, it will enumerate all the sub-sites and print them in a .csv file, you can refer to them.
    http://www.sharepointfix.com/2012/02/powershell-script-to-enumerate-sites.html
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Need powershell commands to get email addresses from public folder created in EAC to CSV

    Need powershell commands to get email addresses from public folder created in EAC to CSV
    1. Created Public folders via EAC - not mail enabled - just to hold contacts.
    2. Assigned owners and showed to add new contacts - then add to favorites and finally to display as address book.
    Now I need a powershell command to get those email contacts in those public folders.
    I need to view them because when we send emails to those groups (via select all) in the public folders, it is creating an NDR for 3 users saying - "..blah blah -OFFICE FAX or HOME FAX) - yet they are getting the emails.
    I suspect that their contact details are corrupt somehow and want to see what contacts are actually listed in the public folders. I already checked to see if the source of the contacts was the public folder or "my contacts" and they are not.'
    I have tried multiple get recipient commands and get public folder commands with no results in the CSV

    The only way to get that data is either via the Outlook com object or using EWS. None of the commands in the Exchange shell look inside of a folder, the most you can get with those is email addresses for mail-enabled Public folders. Here is a link that can
    get you started with how to connect to public folders via EWS, then its just enumerating the folders and looping through the items in the folders for the details of the items. 
    http://gsexdev.blogspot.com/2013/08/public-folder-ews-how-to-rollup-part-1.html
    DJ Grijalva | MCITP: EMA 2007/2010 SPA 2010 | www.persistentcerebro.com

Maybe you are looking for