Hello Sean,
Just to clarify, what I think you are saying is that you have a batch script that you want to have a Summary that looks something like this:
Some data
Other data
But when you try to enter it from the command line, every way you can think of to render a new-line breaks the command into two lines?
I'm going to quote myself from this
:If you're trying to do this on a Windows workstation there is no trivial answer. As far as I can tell (I'm more of a Linux expert than a Windows expert) this is because there is no good way to escape the arguments. After some web searching, I believe these two articles seem to delve into this topic the best:
- MSDN: OldNewThing: Reading the output of a command into a batch file variable
- StackOverflow: How can you echo a newline in batch files?
Fortunately, modern releases of Windows have a new CLI: PowerShell. If you try to do this in PowerShell, this should work:
integrity editmksdomaingroup --hostname=kvmcentos --user=kladmin --description="line1`r`nline2" analysts
If you're actually on a Unix-like workstation, this should be much easier. You should be able to do something like:
integrity editmksdomaingroup --hostname=kvmcentos --user=kladmin --description="`printf line1\nline2`" analysts
At least, I think you should. I haven't tested that.
So the option seem to be:
- Use PowerShell scripts instead of batch files
- Use a Unix shell such as sh, ksh, or bash
- Use the API
If someone else has found a better way to do this, I would very much like to hear about it.
Regards,
Kael