Last active 1749708853

gistfile1.txt Raw
11. Create a Security Group for AutoPilot Devices.
22. Deployment profile
33. Generate serial number form computer using powershell script.
44. Windows autopilot --> Devices --> Import and upload the *.CSV file.
55. We will check the Dynnamic device Group --> Enable the Device.
6
7device.devicePhysicalIDs -any _ -contains "[ZTDId]"
8
9Install-Script -Name Get-WindowsAutoPilotInfo
10Set-ExecutionPolicy RemoteSigned
11Get-WindowsAutopilotInfo.ps1 -OutputFile C:\Computer.csv
12
13# Create the group in the same OU
14New-ADGroup -Name "EUC-Support" `
15 -SamAccountName "EUC-Support" `
16 -GroupCategory Security `
17 -GroupScope Global `
18 -Path "OU=AD_PowerShell,DC=Xceed,DC=com"
19
20Add-ADGroupMember -Identity "EUC-Support" -Members "HS"
21
22# Create the new OU
23New-ADOrganizationalUnit -Name "EUC-Admin" -Path "DC=Xceed,DC=com"
24
25# Move the EUC-Support group to the new OU
26Get-ADGroup -Identity "EUC-Support" | Move-ADObject -TargetPath "OU=EUC-Admin,DC=Xceed,DC=com"
27
28
29
30Import-Module Activedirectory
31New-ADUser -Name "John Doe" -GivenName "John" -Surname "Doe" -SamAccountName "jdoe" -UserPrincipalName "jdoe@yourdomain.com" -AccountPassword (ConvertTo-SecureString "P@ssw0rd123" -AsPlainText -Force) -Path "OU=Users,DC=yourdomain,DC=com" -Enabled $true