header
header Register : : Login header
header
divider
menuleft
menuright
submenu
left

[August 25th, 2008] Check the home page regarding PowerShell related news from a brand new sponsor: Idera

How do I call data from a file?
Last Post 15 Jul 2008 03:14 PM by Ltldogg. 2 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
LtldoggUser is Offline
New Member
New Member
Posts:2

--
15 Jul 2008 03:14 AM  

I need to add resource delegates to exchange 2007 resource rooms.  I know the PS command to do that and I have a list of rooms and delegates to which I want to add, but I don't know how to put that in a csv file (or any other type) to call a batch and automate.

Can someone help me with this.
 
Thanks!
JaykulUser is Offline
New Member
New Member
Posts:31

--
15 Jul 2008 03:06 PM  
Well, I don't know squat about Exchange 2007, but ...
If you put the room and delegate in a csv file like (for instance):

RoomName, DelegateName
room1, delegate1
room2, delegate4
room3, delegate18

you can just import it using the Import-CSV cmdlet:

Import-Csv .\test.csv

and then you could use ForEach-Object, and access the RoomName and DelegateName properties ... bear with me while I make a cmdlet up:


Import-Csv .\test.csv | ForEach-Object { Whatever-COmmand -Room $_.RoomName -Delegate $_.DelegateName }
LtldoggUser is Offline
New Member
New Member
Posts:2

--
15 Jul 2008 03:14 PM  

Thanks, that was clear and very helpful!

You are not authorized to post a reply.

Active Forums 4.1
right
   
footer Sponsored by Quest Software • SAPIEN Technologies • ShellTools, LLC • Microsoft Windows Server 2008 footer
footer