PowerShell for Non-N00bs: LiveMeeting XML API and You


I work with Microsoft LiveMeeting regularly, and have found PowerShell’s ability to interact with its public XML API interface to be of great value.  There’s even a blog devoted to this topic (last update August 11, 2008 – it’s a stable interface, so there’s little change.)

Here’s a scrubbed screen scrape of me getting my membership data from my LiveMeeting account:

$wc = new-object system.net.WebClient; 

$getPostingUrlURL = ‘https://www.livemeeting.com/cc/your_cc/xml/4.0/GetPostingURLRequest’;
[
xml]$getPostingUrlReply = $wc.DownloadString($getPostingUrlURL);
$postingUrl = $getPostingUrlReply

.PlaceWareConfCenter.GetPostingURLReply.url;

 

$query = @’
<PlaceWareConfCenter authUser=”timid” authPassword=”scrubbed”>
  <GetUserProfileRequest/>
</PlaceWareConfCenter>
‘@

;

[xml]$getUserProfileReply = $wc.UploadString($postingUrl, “POST”,  $query);
$getUserProfileReply.Save([Console]::Out

);

<?xml version=1.0 encoding=UTF-8 standalone=yes?>
<
PlaceWareConfCenter>
  <
GetUserProfileReply>
    <
User userID=timid userName=Timid at MSDN>
      <
OptionList>
        <
BooleanOption value=False name=publishRealAudio>
        </
BooleanOption>
        <!–
cut for brevity’s sake –>
      </
OptionList>
    </
User>
  </
GetUserProfileReply>
</
PlaceWareConfCenter

>

 

 

 

Oh, one neat thing about System.Net.XML objects – they format data very nicely.

 


Comments (0)

Skip to main content