Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This is what i Have so far, unsure how to finish. param ( # accept a uri as a pa

ID: 3540223 • Letter: T

Question

This is what i Have so far, unsure how to finish.


param (

   # accept a uri as a parameter (file or url will work); default is below

[string]$uri = "http://classfiles.esage.com/files/WinServer/accounts.xml"

)


# read the xml file

$xml = New-Object System.Xml.XmlDocument

$xml.Load($uri)


# iterate through the user accounts

$accountNodes = $xml.SelectNodes("/root/userManagement/user")

foreach ( $node in $accountNodes ) {

   $commandArgs = " -SamAccountName " + $node.account + `

                  " -AccountPassword " + $node.password + `

                  " -GivenName " + $node.firstname + `

                  " -Surname " + $node.lastname + `

                  " -DisplayName `"" + $node.firstname + " " + $node.lastname + "`"" + `

                  " -Path `"OU=" + $node.ou + "`"" + `

                  " -ChangePasswordAtLogon" + `

                  " -Enabled"

                   

   # create each user                  

   New-ADUser @commandArgs

}

Use the sample XML data accounts.xml, a portion of the file follows (you can download the full file from http://classfiles.esage.com/files/WinServer/accounts.xml )


  

     

     

  



Provide output as appropriate as the script executes.

Assumptions:


Explanation / Answer

u r doing right and i m sure u are correct

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote