Delete
Delete This Thread
  • Edited by jheinikel 7 hours 30 minutes ago Delete
September 10th, 2015 5:16pm

No idea what you are trying to ask.  What does "comes through" refer to.  It is not a PowerShell or computer term.

-Variable is not anything.  Why would you use it?

I recommend starting by learning the basics. What you are doing is not very useful and will not help you learn.

Free Windows Admin Tool Kit Click here and download it now
September 10th, 2015 6:36pm

Edited my original post for detail.  The basics are not the problem here.  Its a parameter only retrieving half of the value when run from a command prompt. 

For reference, I'm using an automation engine to retrieve a here-string of data, saving it to published data, and using that data to pass into a script.  If my automation engine could handle complex scripts, this would be no problem, but I'm having to break it up like this.

September 10th, 2015 7:04pm

I think you have bugs in your CPU.  What is X?

What you are passing is this:

-X "My Multi String Value"

The "here" string is never used.

What is it you are trying to do?  Don't say how, say what.

Free Windows Admin Tool Kit Click here and download it now
September 10th, 2015 7:09pm

I have resolved this.  When you figure out how to launch a Powershell script from a command line and pass through an argument (parameter) that looks like this below, let me know.  (No, these lines are not one single line, they each have a full line break after the text)

"Some text here

some more text here

some more here

here is more text"

September 10th, 2015 7:32pm

You cannot do that on a command line because a command line is text.

You can do this:

$multi=@'
one
two
three
'@

powershell -file myfile.ps1 $multi

#myfile.ps1
$args

That is all and it will display all lines.  You need to look back at what you posted as it was not what you were trying to do for some reason.

Free Windows Admin Tool Kit Click here and download it now
September 10th, 2015 7:46pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics