Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7128219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T11:06:56+00:00 2026-05-28T11:06:56+00:00

Apologies if I’ve framed the question incorrectly but I’m not sure where it fits

  • 0

Apologies if I’ve framed the question incorrectly but I’m not sure where it fits in exactly.

I am executing a powershell script from C# which returns a collection of type PSObject. The data I want is contained in the field BaseObject and when debugging it tells me its type is (PowerShellInside.NetCmdlets.Commands.MessageInfoObject) and I can see all the information there. So my question is assuming that a 3rd party vendor assembly is not available to be referenced, what is the correct approach to retrieving data from this object say

(PowerShellInside.NetCmdlets.Commands.MessageInfoObject).Subject

Do you create your own version of this class omitting what you dont need or is there some neat dynamic typing that can be done.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T11:06:57+00:00Added an answer on May 28, 2026 at 11:06 am

    I’m not a POSH developer so I’ll take this from the C# angle.

    I’ll assume PSObject is the equivalent of System.Object and MessageInfoObject is the type returned from the script… I’d say using something like the following should work:

    dynamic msgInfo = ExecutePOSHScript(...);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Apologies if this question has already been asked but I do not think I
Apologies if the title is vague, but it's not the easiest question to describe.
Apologies for the open endedness of this question, but I really don't know what
Apologies if this is a slightly noob question, but looking to clarify my thoughts
Apologies for a simple question, but I'm very new to Perl! I have an
Apologies or asking what is probably a very straightforward question, but I'm new to
Apologies if the answer to this question is completely obvious but it has me
Apologies if this is a simple question, but I turn to the wisdom of
Apologies for creating a new thread. I was not able to frame the question
Apologies for the massively stupid question but I am curious how to get this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.