-
Notifications
You must be signed in to change notification settings - Fork 0
/
ReadXML.ps1.txt
32 lines (23 loc) · 898 Bytes
/
ReadXML.ps1.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Param(
# [Parameter]
[string]$filePath
)
#$filePath = "C:\PowerShellScripts\rezidor.xml"
[XML]$myXML= Get-Content $filePath
#Old school loop
$n=0
$nCount = $myXML.LyncOnlineAcpUsers.ACPUser.Username.Count
while ($n -le $nCount-1)
{
$User = $myXML.LyncOnlineAcpUsers.ACPUser.Username[$n] #email to identify user in Lync Online
$Provider = $myXML.LyncOnlineAcpUsers.ACPUser.UserAudioConferencingInfo.Provider.Identity[$n] #ACP Provider name
$Passcode = $myXML.LyncOnlineAcpUsers.ACPUser.UserAudioConferencingInfo.Passcode[$n]
$TollNumber = $myXML.LyncOnlineAcpUsers.ACPUser.UserAudioConferencingInfo.TollNumber[$n]
$TollFreeNumber = $myXML.LyncOnlineAcpUsers.ACPUser.UserAudioConferencingInfo.TollFreeNumber[$n]
##Insert your LyncOnline management here
Write-Debug -Message $User
$n++ #Inc loop counter
} #end while
foreach ($user in $myXML.LyncOnlineAcpUsers.ACPUser.Username)
{
}