Awesome. Thanks for sharing. You never know when a snippet of code would come in handy.
Cesar A. Meaning is NOT in words, but inside people! Dr. Myles Munroe. > On Apr 6, 2015, at 3:40 PM, Sean Martin <[email protected]> wrote: > > Good afternoon, > > I've been working on a Powershell script to create/update Mail Contacts in > Exchange based on information stored in our SharePoint site. This may be > trivial to some of you, but I thought I would share for those who are > relatively new to Powershell such as myself. > > Saving the list from Sharepoint to a Web Query File (.IQY) allows for the > presentation of current data each time the file is opened. I had a hard time > figuring out how to work with the file directly, and didn't have the option > of running the script on our Sharepoint server or remotely against it, so I > used the following to save the content as a CSV. > > # Convert Web Query File to CSV > $xl = New-Object -C Excel.Application -vb:$false > $xl.DisplayAlerts = $False > $iqy = $xl.Workbooks.Open('<path to IQY file'>) > $iqy.SaveAs('<Path for saved CSV file>', 6) > $iqy.Close($false) > $xl.Quit() > Get-Process Excel | kill > > I can't take credit for the above, but it did take some time track it down so > I thought sharing it might help someone else avoid the research time. > > - Sean > > ================================================ > Did you know you can also post and find answers on PowerShell in the forums? > http://www.myitforum.com/forums/default.asp?catApp=1 ================================================ Did you know you can also post and find answers on PowerShell in the forums? http://www.myitforum.com/forums/default.asp?catApp=1
