These are chat archives for ligershark/side-waffle

3rd
Jul 2015
Kent Cooper
@kentcooper
Jul 03 2015 00:31
Can you run a template variable through a custom function? I'm looking to see if I can parse a $safeitemname$
Tyler Hughes
@tylerbhughes
Jul 03 2015 00:33
I'm not sure
Kent Cooper
@kentcooper
Jul 03 2015 00:34
@sayedihashimi?
Tyler Hughes
@tylerbhughes
Jul 03 2015 00:57
@kentcooper do you know how to set an attribute using powershell? I'm using your script and @sayedihashimi's script as a reference but both of you used inner text and I'm trying to set the value of an attribute rather than the value of the element
Kent Cooper
@kentcooper
Jul 03 2015 01:01
is the line you are adding the attribute to always the same?
Tyler Hughes
@tylerbhughes
Jul 03 2015 01:01
what do you mean?
Kent Cooper
@kentcooper
Jul 03 2015 01:03
well is it always <SortOrder> or could it be <SortOrder id='2'>?
if its always the same you could do just a simple find and replace
Tyler Hughes
@tylerbhughes
Jul 03 2015 01:06
I'm trying to do something like this:
<CustomParameters>
    <CustomParameter Name="TemplateName" Value="Bower Configuration File"/>
    <CustomParameter Name="TemplateID" Value="cc707e68-e949-4685-8537-e007b546e305"/>
</CustomParameters>
Kent Cooper
@kentcooper
Jul 03 2015 01:07
are you trying to create that whole thing?
Tyler Hughes
@tylerbhughes
Jul 03 2015 01:07
pretty much yeah
lol and thats only going to be half my script
Kent Cooper
@kentcooper
Jul 03 2015 01:08
On all the templates?
Tyler Hughes
@tylerbhughes
Jul 03 2015 01:08
I'll then half to create this afterwards
 <WizardExtension>
    <Assembly>LigerShark.Templates, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</Assembly>
    <FullClassName>LigerShark.Templates.SideWaffleTelemetryWizard</FullClassName>
  </WizardExtension>
Yep
Kent Cooper
@kentcooper
Jul 03 2015 01:09
do you need to read the template name and id from the template?
Tyler Hughes
@tylerbhughes
Jul 03 2015 01:10
name yes..id no..I'm going generate a new id using [guid]::NewGuid()
Kent Cooper
@kentcooper
Jul 03 2015 01:14
okay well I think all you have to do is SetAttribute("attributename","value") to set the attribute I can give you more help a little latter tonight if you need it.
Kent Cooper
@kentcooper
Jul 03 2015 02:30
So did you get it figured out?
Tyler Hughes
@tylerbhughes
Jul 03 2015 11:03
No I got off due to storms