Active IQ Unified Manager Discussions

writing LOG-file with WFA

HONIG2012
4,445 Views

hi guys,

 

i wanted wfa to write out a log as html file - i tried to achieve with PoSh through [command] | convertto-html "path2file" but it seems that the file won't be created.

the idea behind it: i wanted to write-out all before/after informations when the workflows is run per workflow - so there should be one file for e.g. all "volume_resize" workflows with information of how big was the volume before the workflow run and what size it has after the workflow ran.

 

thanks in advance

AJ

1 ACCEPTED SOLUTION

sinhaa
4,419 Views

@  i tried to achieve with PoSh through [command] | convertto-html "path2file" but it seems that the file won't be created.

----

 

ConvertTo-Html doesn't create any file for you, it just formats the output in HTML tags.  Use it like below:

 

<My-Command> |ConvertTo-Html|Set-Content C:\log.html

 

If you want better control, select objects in your output for the specific tags in your log.html. Read some details here : http://technet.microsoft.com/en-us/library/ee156817.aspx

 

And you can use this as is into WFA commands too. It will behave just the same.

 

sinhaa

 

 

 

 

 

 

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

View solution in original post

4 REPLIES 4

abhit
4,441 Views

Have you developed the commands on your own?

Or,

you are trying to get the output from the certified commands in HTML.

If you are writing the commands on your own, you can create a file and

write the file with HTML tags.

Sample command attached, written with WFA 3.0.

 

Regards

Abhi

HONIG2012
4,439 Views

i'm developing on my own - i'll give it a try - thanks for fast reply.

 

AJ

sinhaa
4,420 Views

@  i tried to achieve with PoSh through [command] | convertto-html "path2file" but it seems that the file won't be created.

----

 

ConvertTo-Html doesn't create any file for you, it just formats the output in HTML tags.  Use it like below:

 

<My-Command> |ConvertTo-Html|Set-Content C:\log.html

 

If you want better control, select objects in your output for the specific tags in your log.html. Read some details here : http://technet.microsoft.com/en-us/library/ee156817.aspx

 

And you can use this as is into WFA commands too. It will behave just the same.

 

sinhaa

 

 

 

 

 

 

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

HONIG2012
4,413 Views

yeah right - wrong command usage on my side - now i pipe it to |out-file and it works..

 

thanks for your support

 

Public