Change PowerShell parameters from dictionary to list of strings in C# method

I have a method to call a PowerShell command along with parameters. I have defined it like this:

public string RunScript(string contentScript, Dictionary<string, EntityProperty> parameters)
        using (PowerShell ps = PowerShell.Create())

My PowerShell command parameter is defined like this:

public List<string> Properties { get; set; } = new List<string>();

How do I change my RunScript method so that in parameters I take only the list of strings which is passed?

Read more here:

Content Attribution

This content was originally published by ZZZSharePoint at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: