ASSIGN AN HTML BLOCK TO A VARIABLE


when try save block on variable ise give me error.

so question is, how can save block variable or array o whatelse in order call when start convertto-html command ?

# block want sava on $head variable

 $head =  "<script type="text/javascript"> $(document).ready(function(){
$('table tr td').each(function(){
var text=$(this).html();
if(text.localecompare('warning')==1){
$(this).parent().css('background-color','#ffff00');
}
});
});
</script>" 

$objs | sort-object esito | convertto-html -cssuri "c:\css.css" -property nome,stato,esito,ultimo_avvio,prossimo_avvio,abilitato -head $head -body $body  | out-file c:\a.html


$head = @' <script type="text/javascript"> $(document).ready(function(){ $('table tr td').each(function(){ var text=$(this).html(); if(text.localecompare('warning')==1){ $(this).parent().css('background-color','#ffff00'); } }); }); </script> '@ $objs | sort-object esito | convertto-html -cssuri c:\css.css -property nome, stato, esito, ultimo_avvio, prossimo_avvio, abilitato -head $head -body $body | out-file c:\a.html




\_(ツ)_/







Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Edit Group Policy

Hyper-V VM not reaching OS 'Logon' screen

DNS question...