You have 20 computers that run Windows 10. The computers are in a workgroup. You need to create a local user named User1 on all the computers. User1 must be a member of the Administrators group. What should you do?
A.
Create a Group Policy object (GPO) that contains the Local Users Group Policy preference.
B.
Create a script that runs the New-ADUser cmdlet and the Set-AdGroup cmdlet.
C.
From Windows Configuration Designer, create a provisioning package, and then run the provisioning package on each computer.
D.
Create a script that runs the New-MsolUser cmdlet and the Add-ADComputerServiceAccount cmdlet.
The correct answer is B. Create a script that runs the New-ADUser cmdlet and the Set-AdGroup cmdlet.
Explanation:
To create a local user named User1 on all the computers and add it to the Administrators group, you need to follow these steps:
Create a PowerShell script that runs the following commands:
New-ADUser -Name "User1" -AccountPassword (ConvertTo-SecureString "Password1234" -AsPlainText -Force) -Enabled $true -PasswordNeverExpires $true
Set-AdGroup -Identity "Administrators" -Add @{SamAccountName="User1"}
Save the script with a .ps1 file extension.
Copy the script to each computer or a shared folder that all the computers can access.
Open PowerShell as an administrator on each computer and run the script using the following command:
.\scriptname.ps1
This will create a local use
This section is not available anymore. Please use the main Exam Page.MD-100 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
williamlamata
2 years, 2 months agowilliamlamata
2 years, 2 months agomythic_leopard
1 year, 10 months agoHatsapatsa
2 years, 4 months agoBarrybobslee_111
2 years, 8 months ago