Last active 1749708853

zing revised this gist 1749708853. Go to revision

1 file changed, 31 insertions

gistfile1.txt(file created)

@@ -0,0 +1,31 @@
1 + 1. Create a Security Group for AutoPilot Devices.
2 + 2. Deployment profile
3 + 3. Generate serial number form computer using powershell script.
4 + 4. Windows autopilot --> Devices --> Import and upload the *.CSV file.
5 + 5. We will check the Dynnamic device Group --> Enable the Device.
6 +
7 + device.devicePhysicalIDs -any _ -contains "[ZTDId]"
8 +
9 + Install-Script -Name Get-WindowsAutoPilotInfo
10 + Set-ExecutionPolicy RemoteSigned
11 + Get-WindowsAutopilotInfo.ps1 -OutputFile C:\Computer.csv
12 +
13 + # Create the group in the same OU
14 + New-ADGroup -Name "EUC-Support" `
15 + -SamAccountName "EUC-Support" `
16 + -GroupCategory Security `
17 + -GroupScope Global `
18 + -Path "OU=AD_PowerShell,DC=Xceed,DC=com"
19 +
20 + Add-ADGroupMember -Identity "EUC-Support" -Members "HS"
21 +
22 + # Create the new OU
23 + New-ADOrganizationalUnit -Name "EUC-Admin" -Path "DC=Xceed,DC=com"
24 +
25 + # Move the EUC-Support group to the new OU
26 + Get-ADGroup -Identity "EUC-Support" | Move-ADObject -TargetPath "OU=EUC-Admin,DC=Xceed,DC=com"
27 +
28 +
29 +
30 + Import-Module Activedirectory
31 + New-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
Newer Older