Powershell Script Sammlung ========================== Domain join ----------- :::info :::spoiler [Domain join automatic - incl. local user profile migration](https://hackmd.io/wJ-SK0xsQRi0F8J5QPzR9g) - - This script will join the computer to domain as defined $DomainName and migrate the existing user's profile to new domain users. - Don't worry. This script will prompt the user every time before system changes occurs. - A Domain user's username & password will be asked. - Admin needs to define the DNS - Servers and Domain Name in the header sections. - You can change the profile back to old user by manually renaming the following registry from new domain user's SID to local user's SID. ```` Computer\HKey_Local_Machine\Software\Microsoft\Windows NT\CurrentVersion\ProfileList\<yourNewSID> - The respective old and new SID values are backed up to file in C:\Users\<yourName>\UserSID.txt file. ```` ::: ::: info :::spoiler [Domain join semi automated (with DIEP)](/HBZihJwaQ7mssg1_F7RSLg) **Quellcode** ```powershell $domain = "MYDOMAIN.COM" $password = Read-Host -Prompt "Enter password for $user" -AsSecureString $username = "$domain\MYUSERNAME" $credential = New-Object System.Management.Automation.PSCredential($username,$password) Add-Computer -DomainName $domain -Credential $credential ``` **DIEP-Variante** ```powershell $domain = "DIEP-INGENIEURE.DE" $password = Read-Host -Prompt "GEBEN SIE BITTE DAS PASSWORT FÜR $user EIN:" -AsSecureString $username = "$domain\MYUSERNAME" $credential = New-Object System.Management.Automation.PSCredential($username,$password) Add-Computer -DomainName $domain -Credential $credential ``` ::: - [Domain join & rename client](/8O7F8PEyTJqe1fVrsafX8A) Mixed topics ---- - [Repository erstellen](/Rq06j8baTMOVF6IqR2cTQw) - [CHEAT SHEET](/JnNj78lZSSyxXRHaB2UZKg) - [Systemdaten auslesen mit Powershell 7.0](/SHRk8oZMQoK9C8EjogzCZg) - [Treiber per FTP laden](/Zj35LqSYTTCeZECho8f66g) - [Powershell 7.0 ist da](/eC4XxSZrQgW0-Ib6pCwHGA) Windows Installation und Deployment ---- - [Windows 10 Store Apps Uninstaller (PowerShell/WinForms)](/mz3RaufaQB2eX287QJrOqQ) - [Windows 10 Setup mit autounattend.xml](/0s-uFDCwSj-2FLQyE-puTQ) - [Custom Windows-10-ISO bauen ohne Bloatware](/CgptnevwStqVgfJI6X10vA?edit) - [Orig.: Windows 10: Setup mit Autounattend.xml](/Q9llNvgbSti2SN0BO0NBAg)
{"metaMigratedAt":"2023-06-15T06:27:39.625Z","metaMigratedFrom":"Content","title":"Powershell Script Sammlung","breaks":true,"contributors":"[{\"id\":\"00682108-353b-4c43-ae55-fd1279bb168a\",\"add\":3017,\"del\":600}]"}
Expand menu