User Tools

Site Tools


userspace:windows7

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
userspace:windows7 [2012/01/07 21:29]
tobias
userspace:windows7 [2021/08/23 08:37] (current)
Line 1: Line 1:
-====== Domainjoin Windows 7 (32Bit) ======+====== Domainjoin Windows 7 ======
  
-==== Domainjoin with an opsi-package ====+\\ 
 +Tip:
  
-This Script will show you how to make a Domainjoin in Windows7 (x86) with a selfmade opsi-product.+http://download.uib.de/opsi4.0/products/contribute/full-package/windomain_1.0-2.opsi 
 +Method : wmic 
 + 
 +===== Domainjoin via add-computer command (Opsi Package) ===== 
 + 
 +This Script adds a client to a domain using powershell-tool 'add-computer'
 +Dieses Script fügt einen Client zu einer Domäne hinzu. Genutzt wird dazu das Powershell Tool Add-Computer. 
 + 
 +You are able to choose the Domain via Product Property  
 + 
 +by tobias 
 + 
 +=== Properties === 
 +Create a OPSI Package with the following product properties: 
 +  * dom - Domäne /domain 
 +  * user - Benutzer zum hinzufügen in die Domäne / User with add-domain-rights 
 +  * password - Passwort des Domänenbenutzers / password of domainadmin 
 + 
 +=== join.ins === 
 +<code winst> 
 +[INITIAL] 
 +;Message = "Rechner wird zur Domäne hinzugefügt!" 
 +Message = "Join computer to the domain!" 
 + 
 +[Actions] 
 +DefVar $dom$ 
 +DefVar $user$ 
 +DefVar $password$ 
 +set $dom$ = GetProductProperty("dom", " ") 
 +set $user$ = GetProductProperty("user", " ") 
 +set $password$ = GetProductProperty("password", " ") 
 +PatchTextFile_Create_powershell %scriptpath%\join.ps1 
 +ShellBatch_JoinDom 
 + 
 + 
 +[PatchTextFile_Create_powershell] 
 +AddLine  "$secpasswd = ConvertTo-SecureString '$password$' -AsPlainText -Force" 
 +AddLine  '$mycreds = New-Object System.Management.Automation.PSCredential ("$user$", $secpasswd)' 
 +AddLine  'Add-Computer -DomainName "$dom$" -credential $mycreds' 
 +SaveToFile "c:\joinpatched.ps1" 
 + 
 +[ShellBatch_JoinDom] 
 +set-executionpolicy RemoteSigned 
 +powershell c:\joinpatched.ps1 
 +del c:\joinpatched.ps1 
 +</code> 
 + 
 +\\ 
 +\\ 
 + 
 +===== Domainjoin with an opsi-package ===== 
 + 
 +This Script will show you how to make a Domainjoin in Windows7 with a selfmade opsi-product.
 I choose this way because not every auto-installed Client must be a member of the Domain and you are more flexible by installing the Clients. I choose this way because not every auto-installed Client must be a member of the Domain and you are more flexible by installing the Clients.
  
Line 128: Line 181:
 The build the product with **opsi-makeproducfile** an install it with **opsi-package-manager -i windows7-domainjoin_1.0-1.opsi** The build the product with **opsi-makeproducfile** an install it with **opsi-package-manager -i windows7-domainjoin_1.0-1.opsi**
  
----- +\\ 
- +\\
-==== Domainjoin via add-computer command ==== +
- +
-Dieses Script fügt einen Client zu einer Domäne hinzu. Genutzt wird dazu das Powershell Tool Add-Computer\\ +
-This Script adds a client to a domain. Realized by the powershell-tool 'add-computer' +
- +
-by tobias +
- +
-== Properties == +
-  * dom - Domäne /domain +
-  * user - Benutzer zum hinzufügen in die Domäne / User with add-domain-rights +
-  * password - Passwort des Domänenbenutzers / password of domainadmin +
- +
-=== join.ins === +
-<code winst> +
-[INITIAL] +
-Message = "Rechner wird zur Domäne hinzugefügt!" +
- +
-[Actions] +
-DefVar $dom$ +
-DefVar $user$ +
-DefVar $password$ +
-set $dom$ = GetProductProperty("dom", " ") +
-set $user$ = GetProductProperty("user", " ") +
-set $password$ = GetProductProperty("password", " ") +
-PatchTextFile_Create_powershell %scriptpath%\join.ps1 +
-ShellBatch_JoinDom +
- +
- +
-[PatchTextFile_Create_powershell] +
-AddLine  "$secpasswd = ConvertTo-SecureString '$password$' -AsPlainText -Force" +
-AddLine  '$mycreds = New-Object System.Management.Automation.PSCredential ("$user$", $secpasswd)' +
-AddLine  'Add-Computer -DomainName "$dom$" -credential $mycreds' +
-SaveToFile "c:\joinpatched.ps1" +
- +
-[ShellBatch_JoinDom] +
-set-executionpolicy RemoteSigned +
-powershell c:\joinpatched.ps1 +
-del c:\joinpatched.ps1 +
-</code>+
  
----- +===== Domainjoin with a Samba PDC =====
-==== Domainjoin with a Samba PDC ====+
  
 by chewbacca by chewbacca
Line 177: Line 190:
 tested by:  //[[hungerharke@gmx.de|Thomas_H]] 2011/11/21 14:31// tested by:  //[[hungerharke@gmx.de|Thomas_H]] 2011/11/21 14:31//
  
-Edit the /opt/pcbin/install/win7/custom/unattend.xml:+Edit the /opt/pcbin/install/win7/custom/unattend.xml (or /opt/pcbin/install/win7-x64/custom/unattend.xml):
  
 <code> <code>
userspace/windows7.1325971796.txt.gz · Last modified: 2021/08/23 08:37 (external edit)