¿How to get activities templates collection from sr template and export to csv using powershell?

Hi friends.
I want to build a script that obtains the collection of activities templates from a sr template (filtering the sr template by displayname)  and export the list (template activities displaynames) to csv file.
Thanks for advance.
Cheers

Import-Module SMLets -Force
$templateName =  "SS-Internas" 
$template = Get-SCSMObjectTemplate -DisplayName $templateName
$templateAct = $template.ObjectCollection.PropertyCollection | Where { $_.Path  -eq '$Context/Property[Type=''CustomSystem_WorkItem_Library!System.WorkItem'']/Title$'}
$report=@()
foreach($value in $templateAct.MixedValue){
$obj = New-Object PSObject -Property @{
"DisplayName" = $value 
$report += $obj
$filePath = "E:\ACT_"+$templateName+".csv"
$report | export-csv $filePath -NoTypeInformation -Encoding UTF8
(Get-Content $filePath) | % {$_ -replace '"', ""} | out-file -FilePath $filePath -Force -Encoding UTF8

Similar Messages

  • Import from dsv files and export to csv files

    hi every body..
    how can I create a project in NetBeans which does:
    1- import a .dsv (Delimiter-Separated Values) file content and save it to array
    - the values in this format separated by fixed commas
    example
    "AIG" "Insurance" "64.91" "25/11/06"
    2- export into .csv file (Comma Separated Value)
    -the values in this format separated by commas
    example:
    AIG,Insurance,64.91,25/11/06

    Well, you need to learn Java so you can read files, divide the data by the delimiters, and then write it out as a csv file.
    Can't really give better instructions than that...maybe start by reading the basic tutorials?
    We don't give out full program code here so you'll need to ask more precise questions. Such as what is it that you're having problems with.

  • How to get the destination path in an photoshop sdk export plugin when using a batch action?

    Hello,
    I've written an exporter plugin (not save-as) that exports a given file to a custom format.
    I was able to open a file selector dialog and choose a path that is then transported to the saving location.
    Now my problem is: Another intended use is batch exporting many files. The user records an action with the export step and then applies a batch on it.
    The PS batch window allows you to select the destination to be a directory where the exporter should write the data. Fine.
    Now how do I get this path? When running in batch mode the silent flag is set for my plugin so I do not spawn a file selector dialog to annoy the user.
    But I am also unable to obtain the path which was selected by the user in the batch window.
    The SDK automation plugin Getter has some code to retrieve the path of the file and even that fails as it cannot obtain anything.
    PropertyUtils.h has some PIGetWorkPathIndex and PIGetPathName functions but I always get 0 when asking PIGetNumberPaths, and get -1 with PIGetWorkPathIndex.
    I would be thankful if somebody could hint me how I can retrieve directories.
    It even seems impossible for me to get the path where the file is actually saved. The filter plugin called Propertizer utilizes a function called PIGetDocumentName but this only outputs the file name, not the full path.
    (Just to be sure: The file on which the tests run is already saved to disk, if that matters)
    Another fun part is: When I record an export step, what is the directory I am exporting into?

    Ok, after lots of reading the sdk sample outbound I've realized that or plugin is broken.
    When recording an action the outbound plugin stores the current path to gAliasHandle which is then recorded as a scripting parameter. Now when I execute the action I get the alias handle.
    However how is this supposed to work with an export plugin and batch processing with a "destination" set to a target? Is this even possible or do I need to double click the export step in the action and "reset" the location even if that causes the entire exporter to run again?

  • How do I select one version from multiple stacks and export?

    I have a color copy and B&W copy of 800 images. I want to export the B&W versions only. How do I select just the B&W versions in the stack at one time without having to click on 800 images?

    If you check the filenames, you'll see that the versions have a version name tagged on the end, like "Version 2" when I did a quick monochrome mix of one of my own. Make a smart album with the search term set for text being "Version 2" and you should end up with all the b&w versions. That is, assuming you made them all in the same way and they're all Version 2 versions. Since the initial version would not have the term "Version" attached, you could make the search term "Version" and it would fill with all the 2nd and 3rd et al. versions.
    Just a thought. Give it a try.
    Mark

  • I'm using LR 4.4.  How do I extract the metadata from my images and export it into Excel?

    I want to extract the metadata I have added to my images and export it into an Excel spreadsheet.  Can this be done within LR4.4?  If the software doesn't have a function for this is there another way to do it?
    Thanks for any help you can offer.

    JB's ListView is the most straight-forward solution, but
    ConfidentialInformant
    allows for full customization (e.g. if you want to pick and choose custom metadata fields, or export more fields than ListView supports (10), or tweak data formats, or add intelligence...).
    Rob

  • How to get the XML messages from JMS Queue in BPM

    I have one requirement in my application.we are sending XML messages to the JMS Queue.How to get the XML messages from JMS Queue and how to Extract the details from XMl.
    can you please send me the code to get the XML messages from the JMS Queue.
    Thank you,

    Hi,
    Sure others will have some other ideas, but here's what I typically do to get the XML from a JMS queue. Inside the Global Automatic that pops the messages off the queue you'd have logic similar to this:
    artifactInfoNodes as Any[]
    xmlObject as Fuego.Xml.XMLObject = XMLObject()
    load xmlObject using xmlText = message.textValue
    . . . Once you have this, it's a matter of deciding what you want to do with the message. Most times you'll parse the XML (using XPATH statemens), set argument variables and create a work item instance.
    Hope this helps,
    Dan

  • HT201269 My computer crashed and had to be restored to factory settings. My ipad has my ituned library. how do i get the music collection from the ipad to the computer?

    my computer crashed and had to be restored to factory settings losing ituness collection of music. My ipad has my itunes library. how do i get the music collection from the ipad to the computer?

    You should be able to copy iTunes purchases over to your computer's iTunes via File > Devices > Transfer Purchases. For music from other sources (e.g. copied from CDs) you will need a third-party program to copy them back from your iPad - there are some listed half-way down this page which should work : https://discussions.apple.com/docs/DOC-3991

  • How to get Accounting document number from billing document number

    Hi,
    How to get Accounting document number from billing document number i.e. from VBAK- VBELN.
    Cheta Pant

    Hi,
    VBAK is the Sale Order header table, Billing document table is VBRK.
    Sales tables (VBAK,VBAP,VBRP,VBRK) do not store accounting document numbers.
    You do other way around. Just go to SE16 and enter the Billing document number in field Billing document VBELN in BSEG or BSID or BSAD table and execute, you will find the accounting document number.
    If you just want collect this information once then you can use table BSEG, but if you think to develope a report then use table BSID and BSAD.
    Regards,
    Chintan Joshi

  • How to get all the values from the dropdown menu

    How to get all the values from the dropdown menu
    I need to be able to extract all values from the dropdown menu; I know how to get all those values as a string, but I need to be able to access each item; (the value in a dropdown menu will change dynamically)
    How do I get number of item is selection dropdown?
    How do I extract a ?name? for each value, one by one?
    How do I change a selection by referring to particular index of the item in a dropdown menu?
    Here is the Path to dropdown menu that I'm trying to access (form contains number of similar dropdowns)
    RSWApp.om.GetElementByPath "window(index=0).form(id=""aspnetForm"" | action=""advancedsearch.aspx"" | index=0).formelement[SELECT](name=""ctl00$MainContent$hardwareBrand"" | id=""ctl00_MainContent_hardwareBrand"" | index=16)", element
    Message was edited by: testtest

    The findElement method allows various attributes to be used to search. Take the following two examples for the element below:
    <Select Name=ProdType ID=testProd>
    </Select>
    I can find the element based on its name or any other attribute, I just need to specify what I am looking for. To find it by name I would do the following:
    Set x = RSWApp.om.FindElement("ProdType","SELECT","Name")
    If I want to search by id I could do the following:
    Set x = RSWApp.om.FindElement("testProd","SELECT","ID")
    Usually you will use whatever is available. Since the select element has no name or ID on the Empirix home page, I used the onChange attribute. You can use any attribute as long as you specify which one you are using (last argument in these examples)
    You can use the FindElement to grab links, text boxes, etc.
    The next example grabs from a link on a page
    Home
    Set x = RSWApp.om.FindElement("Home","A","innerText")
    I hope this helps clear it up.

  • How to get the return values from a web page

    Hi all :
       how to get the return values from a web page ?  I mean how pass values betwen webflow and web page ?
    thank you very much
    Edited by: jingying Sony on Apr 15, 2010 6:15 AM
    Edited by: jingying Sony on Apr 15, 2010 6:18 AM

    Hi,
    What kind of web page do you have? Do you have possibility to for example make RFCs? Then you could trigger events (with parameters that could "return" the values) and the workflow could react to those events. For example your task can have terminating events.
    Regards,
    Karri

  • How to Get a BLOB Field from JDBC Coding

    Hi,
    I have written the JDBC Code to get the field values from the Table.
    There is a BLOB field in that table.
    How to get the BLOB ? What is the return type we should use.
    If it is Varchar then we can use rs.getString().
    If it is BLOB then what is the return type?
    Thanks in Advance

    Blob.
    You know, people like you really give me the urge to print out several hundred pages of Java API and smack them on their heads.

  • How to get warranty service claim from nokia c5-03...

    how to get warranty service claim from nokia c5-03 in india because i have problem with nokia c5-03 I Purchase 2 week ago a new nokia c5-03 but from day 1 i facing same problem like 1) app close itself 2) internet browse close if any thing is downloading or downloading over 3) memory full always then i should reboot the phone then it work. 4) ovi map is open it shows memory full close the app So kindly help me how to get warranty service claim from nokia c5-03 in india i am unhappy with nokia c5-03
    Solved!
    Go to Solution.

    i updated software also but the same problem cont... I want to know that nokia will give back money or exchange for other new mobile

  • How can i Delete all foto from my iphone and after some time get them one more time on it but not as a new album :)?

    How can i Delete all foto from my iphone and after some time get them one more time on it but not as a new album, i want them in the camera roll ?

    How can I delete EVERY THING off my Mac and have it like new?
    Boot from the software install DVD and do an "erase and install" when prompted.

  • For some reason the system is telling me my birth date is wrong when it's not and it won't let me proceed to reset my password. Can someone tell me how to get a "real" person from tech on line?

    For some reason the system is telling me my birth date is wrong when it's not and it won't let me proceed to reset my password. Can someone tell me how to get a "real" person from tech on line?

    contact itunes support

  • How to get title templates library for CC?

    How to get title templates library for CC?  Do you have to download and install PP 6 to get them?

    Try here Library, title templates, template projects missing: Premiere Pro, After Effects, Encore

Maybe you are looking for

  • Duplicate check for non inventory vendor invoices in Finance

    Hi, SAP provides duplicate check for non inventory vendor invoices posted through transactions F-43 and FB01 etc. The field values checked for duplicate invoice include Document date and Reference field. I want to know, is there any flexibility of re

  • Differences between different versions of Oracle Database 10 g

    I have some questions about the Oracle Database 10g Release 2 that we download from Oracle web site. 1)Does the software that we download from Oracle web site is similar to Enterprise Edition or Standard Edition or Standard Edition One or to which ed

  • Verizon WebMail Email Messages Disappeari​ng

    I use the MyVerizon 2.0 webmail application to view my email messages remotely.  I have reported that a few weeks ago my email messages have been disappearing from my inbox.  Today, the messages disappeared again from my inbox.  My email client at ho

  • In E35122-05 is a mistake in the Example

    In the manual Oracle® Database 2 Day + Application Express Developer's Guide Release 4.2 E35122-05 is a mistake in the select-Statement which is on page 4-8 to 4-9, the last 2 lines cause an error ORA-909 , if these 2 lines are omitted, the select wo

  • Error creating supplier catalog

    Hi srm experts, I get a dump when creating supplier catalogs in CCM 2.0. The dump is in program /CCM/SAPLCOM_D_VIEW_E1, and ST22 states that the key field "PRODUCT_GUID" is missing or incomplete but is contained as a key of table LT_PR_PR_REF_PR. The