How to generate a GUID

Found this on Serge van den Oever’s blog. This is useful when designing SP features.

From http://weblogs.asp.net/soever/archive/2007/05/31/generate-a-list-of-guid-s.aspx:

Sometimes you just need a lot of GUID’s while programming. Of course you could use the Visual Studio GUID tool, but that is a lot of work.

Open a PowerShell console, and paste in the following line to get a list of 100 guid’s:

$i=100; while ($i– -gt 0) { Write-Host ([System.Guid]::NewGuid()) }

Here’s a sample of the output:

4b7a20f4-05bb-4bc4-ba6d-09672134c47f
3d5cd6f7-a5dc-4085-947f-0dd580b395f4
36228424-e107-4f0e-bc3d-15177853cdf2
0ba362af-6723-422a-b1b4-c73b0a9eb5dd
90879793-a8cf-41ea-bfe2-38c774ef2037
7904b9dd-efd5-494e-9385-64117036e62a
48ad6baa-6cbf-4c51-b152-e8a9924e8301
3e0a1eda-894f-4967-8a9e-488e99be0689
ebf18ecc-e8e3-468c-aa17-3dcdb4499b67
44ec2ba5-8914-4472-a1b2-24f63f9d224b
490f066a-29f0-4124-8c0c-2809e450849e
35f73b5b-8bbb-4567-8d46-fb0d18a2e5e4
fac47264-d32a-42bc-a6ae-06f522eff8fd
1168d57d-87ee-46c7-88a2-945c23171952
31ba1403-844b-43f5-851e-cb5e60752413
06fa2676-4273-4b19-afeb-ca585b1c5744
6fb792cc-e19a-40c5-9180-a26f188acce4
82ede030-19bd-4dae-acbd-bb2f889ef4f7
cb8207cb-a1ed-4fc8-a9dc-b130dfaa238b
0bf13d6d-b197-44d3-bc15-763131b19dac
50a4297e-2ed2-4cae-ae81-835cafbd13b3
722f3065-ada9-4925-97ee-219e8cc7a919
f0b61e6d-bb48-4a09-bb21-58de9a408a3c
57892674-ed4e-4935-931a-46986dd4e46b
f0367cfb-fbc4-461b-87dd-1cbb2f647eca

Advertisements

0 Responses to “How to generate a GUID”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




RSS Information Week Headlines

  • An error has occurred; the feed is probably down. Try again later.

RSS SharePoint Team Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS InfoPath Team Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS Joel Oleson Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS Susan Hanley’s KM Blog

  • An error has occurred; the feed is probably down. Try again later.

Blog Stats

  • 355,172 hits

%d bloggers like this: