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 6874451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:11:47+00:00 2026-05-27T04:11:47+00:00

I want to use Powershell to insert entities into Azure Table Storage and therefore

  • 0

I want to use Powershell to insert entities into Azure Table Storage and therefore need to instantiate a class which derives from the .NET abstract class Microsoft.WindowsAzure.StorageClient.TableServiceEntity

I am thinking to instantiate (in a Powershell 2.0 script) an object using eg New-Object and then adding members using Add-Member but cannot achieve the instantiation of a compatible TableServiceEntity derived class. (I can instantiate other arbitrary PSObjects, but they won’t do it seems)

Alternatively if someone could show me how to instantiate and populate ANY object class which could then be passed into the tableServiceContext.AddObject() method

  • 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-27T04:11:48+00:00Added an answer on May 27, 2026 at 4:11 am

    What you can do is to create your class in a cs file and then reference it to your script.
    Here’s example:
    Save this as a cs file:

    using System.Collections;
        public  class MyList : System.Collections.Generic.List<string>
        {
            public static string Test(string input)
            {
                return string.Format("test input {0}", input);
            }
        }
    

    And here’s the code to run it:

    cd c:\pst
    Add-Type -Path "2.cs" #-ReferencedAssemblies $assembly
    [MyList]::Test("aaa")
    

    You might need to pass your assembly to ReferencedAssemblies . And you also might need to upload assemblies into your script

    The way to create table is described here:
    Add or replace entity in Azure Table Storage

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to insert data into my MySQL database using PowerShell. My code is
I want to use Powershell to write some utilities, leveraging our own .NET components
I am really very new to powershell. I want to use powershell to read
Update, Script is working with PowerShell V3.0, Thanks @ Doug I want to use
I want to use PowerShell to transfer files with FTP to an anonymous FTP
Suppose I have the following XML file, and I want to use PowerShell (version
I want to use Powershell in order to call a batch file on remote
In .NET scripting languages such as PowerShell and IronPython, when you want to use
I want to use a SharePoint 2010 WebService with PowerShell. But when I execute
In powershell I can use the Format-Table command to sort everything in my results;

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.