Sunday, May 25, 2025

Active Directory

 Export AD Users:

csvde -d "ou=Main-Site,dc=pnl,dc=com" -f C:\ExportedUsers.csv
 
Import AD Users:
csvde -i -f c:\filename.csv
 

Step 1 Export Domain Users to CSV File

1. Here all my users are in one OU, if that OU has ‘nested OU’s within it that’s OK.

Bulk Export Users

2. The command to ‘export’ is as follows;

Note: You need to ‘run as administrator

csvde -d {LDAP Path} -f c:\filename.csv

Example

csvde -d "ou=Main-Site,dc=pnl,dc=com" -f C:\ExportedUsers.csv

Bulk Export Users CSVDE

3. The users will be exported. If it fails at this point it will give you a descriptive error, CSVDE has been around for a while, Google the error (most fixes are pretty simple).

CSVDE Export Users

4. Now open the CSV File with Excel, the second line will probably be the OU, you can leave this here if you want but if your target OU is different (or Like me you prefer to create it manually), then delete row 2 (Don’t delete Row 1!).

Edit csv file

5. You do not need all the columns, delete all the columns EXCEPT,

DN
objectClass
ou
distinguishedName
name
cn
sn
givenName
displayName
sAMAccountName
userPrincipalName

Edit CSV for Bulk Import

So when complete it should look like the following;

Complete CSV for CSVDE Active Directory

6. Change any details in the LDAP path that are different for the new domain.

CSV File find and replace

7. You may also need to change the domain name that’s listed on the userPrincipleName.

CSVDE userprinciplename

Step 2 Import Domain Users from CSV File

1. On the target domain, (if you are not importing the OU’s, then make sure they already exist). The syntax for the import is;

csvde -i -f c:\filename.csv

 

Bulk Import Users

9. Your users should be imported.

Bulk Import Users CSVDE

10. By default they will be disabled, but you can bulk enable them.

Bulk Enable Users

11. At this point all the users have no password, this can also be bulk set.

 

Source: 

https://www.petenetlive.com/KB/Article/0000794

 

 

Friday, May 9, 2025

Force ipv4 ping over ipv6

From elevated CMD:
%windir%\system32\REG.EXE ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters /v DisabledComponents /t REG_DWORD /d 0x20 /f

or

netsh interface ipv6 set prefix ::/96 60 3

netsh interface ipv6 set prefix ::ffff:0:0/96 55 4
 
---------------------------
 

Via Windows Registry
We have to modify the Windows IPv6 from the “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\TCPIP6\Parameters\” registry key. The entry we are interested in is named “DisabledComponents”. But the DisabledComponents entry probably doesn’t exist on your system. So we need to create a new dword entry named “DisabledComponents”.

You can now disable IPv6 support by setting the value of DisabledComponents to a hex value of ffffffff (that’s 8 “f’s”). After you reboot, a ping of localhost will return 127.0.0.1, even if you don’t touch the hosts file.

 
 
 

GPO Folder redirection

  Configure Folder Redirection using Group Policy 05/15/2025 Folder Redire...