Monday, 9 August 2010

Find GUID of a site column in SharePoint using PowerShell

Whilst a simple script, this illustrates the real advantages of PowerShell. I needed to find the ID’s of some site columns I had created in SharePoint 2010. In the days of MOSS 2007, I would have had to either work out the GUID from looking at the URL of the column in the browser or write a custom application in Visual Studio to get the information I needed by accessing the Object Model. Now, I spend a minute writing a script in PowerShell and it’s reusable time and time again.

The script asks the user to input the display name of the site column and then gets the name and GUID of the column and outputs it to the console. I have configured the URL as a variable, but you could also ask the user for this if you wanted to:

$web = Get-SPWeb http://portal
$columnName = Read-Host "Enter the column title (display name)"
write-host $web.Fields[$columnName].Title -nonewline
write-host " "$web.Fields[$columnName].Id -foregroundcolor Red

You could use the essence of this script to find a whole bunch of information about the column, if required. A full list of properties can be found on MSDN here.


  1. $web = Get-SPWeb http://sp2010dev
    foreach ($field in $web.Fields)
    write-output "Title: $($field.Title) | ID: $($field.Id)"

    Save it to a file. Then run with something like ./fields.ps1 out-File fields.txt

    Just creates a text file with all the site columns and ids.

    Thanks for posting!

  2. sorry... just make sure you swap http://sp2010dev for the appropriate AAM.

  3. Brilliant. Just what I was looking for. Thanks guys.

  4. “Estée used to say, ‘Wear one great piece,’” designer Aerin Lauder tells Threads, referring to her makeup-maven grandmother. “She always said, ‘Less is more.’ If you look at pictures of her, she’s in a red dress, with an amazing David Webb necklace and an amazing clutch. And she was always in high Michael Kors Handbags heels.” That advice is paying off, as the younger Lauder expands her luxe home-goods line (that $285 coaster set has got us like whoa) to include chic shoes, scarves and purses.“I have one of my grandmother’s purses in the office for inspiration,” she says. “Every time I open one of her bags, michael kors bags it makes me smile because there’s one of her handkerchiefs or mirrors or compacts.” Her other muse? Socialite-turned-stylista Olivia Palermo, whom Lauder tapped to model for the new accessories campaign. “When we met with her, she was wearing a pale-pink ribbon around her neck, which is the color of our beauty line,” michael kors outlet online says Lauder. “It’s very important to pick someone who represents you and has your sense of style.” Something tells us Grandma Lauder would approve.
    Indeed, all the clothes she wore on the campaign trail seem to have been part of a shopping spree, as opposed to a strategic plan. There’s nothing wrong coach outlet with that. Arguably it is part of what makes a woman who lives in a gilded penthouse seem more normal (she buys, just like everyone else!) But it reflects her distance from the industry.And it is striking that while Ralph Lauren is an American brand, which may indicate a decision to support michael kors outlet online homegrown talent and promote local industry, Mrs. Trump has also worn Fendi (Italian), Roksanda Ilincic (British) and Emilia Wickstead (British) on the campaign trail. When she went to cast her vote, Mrs. Trump threw a gold-buttoned camel Balmain military coat (French) over her shoulders.Neither her wardrobe nor that of the rest of Longchamp Outlet the family has been used in the traditional way (see: Jackie Kennedy and Nancy Reagan), to telegraph the virtues of Made in America — though that has been one of Mr. Trump’s most vociferously promoted platforms.Mr. Trump himself has stuck closely to his uniform of Brioni suits and made-in-China fire engine red coach factory outlet ties from his own brand. His daughter and public surrogate, Ivanka, has worn an assortment of styles and high-fashion names, including her own label, the Roland Mouret asymmetric top she wore to the third debate, and the Alexander McQueen dress she sported at her father’s acceptance speech, though they can all be michael kors outlet clearance pretty broadly categorized as “power sheath.”
    These models are real knockouts.A stunning blond catwalker got into a drag-out brawl with her gorgeous roommate, also a model,

  5. [url=][b]adidas yeezy boost 350[/b][/url]
    [url=][b]coach outlet online[/b][/url]
    [url=][b]moncler jackets[/b][/url]
    [url=][b]stan smith adidas[/b][/url]
    [url=][b]adidas uk[/b][/url]
    [url=][b]toms outlet[/b][/url]
    [url=][b]pandora charms sale clearance[/b][/url]
    [url=][b]michael kors outlet clearance[/b][/url]
    [url=][b]coach outlet store online[/b][/url]

  6. I like the post design as you make client engagement in the entire article. It appears to be round up of every single distributed post. A debt of gratitude is in order for checking the instructive posts.

    cong ty lam phim 3d du an

  7. By taking the time to read a lot of information like this to add my insight .

  8. This post is really giving me exciting information. There is something new which is related to my hobby. This post is considerable use for me. Thanks for sharing it.


  9. This article is interesting and useful. And let me share an article about health which insha Allah will be very useful if we use it again for others.

    Obat Untuk Mengobati penyakit osteoarthritis
    Cara Mengobati Penyakit Gula Darah
    Obat Untuk Penyakit TBC

  10. Our digital marketing course in Chennai is targeted at those who are desirous of taking advantage of career opportunities in digital marketing. Join the very best Digital Marketing Course in Chennai. Get trained by an expert who will enrich you with the latest digital trends.

    Digital Marketing Course in Chennai
    Digital Marketing Training in Chennai
    Online Digital Marketing Training
    SEO Training in Chennai
    Digital Marketing Course
    Digital Marketing Training
    Digital Marketing Courses

  11. También puede visitar una tienda de ladrillo y mortero de Michael Kors o su sitio web y comprar directamente un bolso Michael Kors desde allí. Usar un bolso de Michael Kors les permite a los demás reconocer que el habitante urbano educado toma la moda realmente con seriedad. Los bolsos de hombro son particularmente refinados y elegantes.

    {Bolsas Michael Kors Precios | Bolsos Michael Kors Outlet | Michael Kors Rebajas}

    En vacker konstnärlig skapelse av vävt läder, som ger ett skalskaligt utseende - liknar en snakeskin eller fiskhud, linjer utsidan av påsen. Läderens bältros är små läderringar. Det finns också gyllene accenter på väskan. Slutresultatet är svagt liknar kedjepost.

    {Michael Kors Rea | Michael Kors Väska Rea | Michael Kors Plånbok}