Last active
March 11, 2025 20:23
-
-
Save wrouesnel/40244779d16b59545483ead017b018eb to your computer and use it in GitHub Desktop.
automount powershell provisioning
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module ActiveDirectory | |
# New-ADOrganizationalUnit -Name "autofs" -Path "dc=default,dc=libvirt" | |
# New-ADObject -Name auto.master -Path 'ou=autofs,dc=default,dc=libvirt' -Type nisMap -OtherAttributes @{'nisMapName'='auto.master'} | |
#New-ADObject -Name '/home' -Path 'cn=auto.master,ou=autofs,dc=default,dc=libvirt' -Type nisObject -OtherAttributes @{'nisMapName'='/home'; 'nisMapEntry'='auto.home'} | |
#New-ADObject -Name auto.home ` | |
# -Path 'ou=autofs,dc=default,dc=libvirt' ` | |
# -Type nisMap ` | |
# -OtherAttributes @{'nisMapName'='auto.home'} | |
#New-ADObject -Name auto.direct -Path 'ou=autofs,dc=default,dc=libvirt' -Type nisMap -OtherAttributes @{'nisMapName'='auto.direct'} | |
New-ADObject -Name '*' ` | |
-Path 'cn=auto.home,ou=autofs,dc=default,dc=libvirt' ` | |
-Type nisObject ` | |
-OtherAttributes @{'nisMapName'='*'; ` | |
'nisMapEntry'='-fstype=cifs,sec=krb5,user=$USER,cruid=$UID,uid=$UID,gid=$GID,vers=3,multiuser ://server-1.default.libvirt/Users$'} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment