Skip to main content

Posts

Showing posts with the label User listing in AD

Folder redirection very slow

Folder redirection is good and bad, well if everything is working as expected then it's definitely good and sometimes it's bad if it causes some unexpected issues such as very slow login.
So you have a folder redirection working  smoothly over the years, users can always change their password whenever they want it and of course, System Administrator can also change user password anytime whenever they want it or whenever they just felt like changing it (just kidding), or when situations demand it.
If folder redirection suddenly becomes problematic or causes some issue such as slow login, one issue could be that the user changes the password or the Sys Ad change the user password.
One issue I encountered if the folder redirection suddenly becomes slow, if the client or the user has a mapped drive that is set manually and set to persistent, persistent mapped drives uses the Vault Credential Manager to store the password.
If the password is not updated in the vault credential man…

Active Directory GPO apply to forest

How to apply GPO to whole forest?

1. Open GPMC (Group Policy Management Console) and create a GPO for a single domain.

2. Link the GPO to other domains in the forest.
   Right click each domain and select "Link an Existing GPO Here" then select the GPO that will be applied to all domains in the forest.

3. If everything works fine, then you're a lucky man.


Before rolling out a GPO create a test Organizational Unit and create Active Directory user accounts for test purposes.

Then apply the GPO to the OU.

If it works properly then there's a good chance that it will work smoothly to all users but it's not a guarantee that it will work correctly to all users.

If the GPO is critically needed to be applied to all users and testing works okay, roll out the GPO and troubleshoot issues that may occur.

If no problem arises, then drink a cup of coffee and consider yourself "lucky".

If the GPO is not yet tested and you are not sure whether it will havoc the Active Directory …

How to use batch file to register DLLs or to move or copy files

Batch file scripts below will register DLLs, copy or moved files.
Be careful in moving files as it would overwrite if there is an existing file on the destination folder. This batch file script below would register DLL files in a specified folder.
REM Start Copy Here REM Register DLL files @echo off set cnt=0 for %%v in (C:\MyCustomApp\*.dll) do (    regsvr32 /s "%%v"    call set /a cnt=%%cnt%%+1    ) echo Total dlls found and registered = %cnt% REM End of Batch File

Using same batch file it can be tweak to copy any specified files to a particular folder.
If you have a folder with PDF, Excel Files or other documents.
And you just want to copy files or move files to another folder, batch scripts below would help.
This simple batch file below would copy files to a specified folder.
REM Start Copy Here REM Copy PDF Files to another folder @echo off set cnt=0 for %%v in (d:\MixFilesFolder\*.pdf) do (    copy "%%v" "d:\AllPDF"    call set /a cnt=%%cnt%%+1    ) echo Total PDFs …

Powershell Get specific property for Active Directory

One liner command to check and get Active Directory Properties using  Powershell.   Check which Active Directory properties is set or not set for a particular user or all users in Active Directory.

Below is a command to check which user or users has  an email address in the user object properties and it will also display which user don't have email address set  or accounts which has no email address set.
get-aduser -filter * -properties * | select mail, name
Of course depends on which properties you like to check you can just replace the mail and name properties on the command shown above.
Above command will display the email address if set on the user object property, if the user object property does not display an email address basically there is no email address  set on the object.
An example below on how the command output looks like:

mail                                                name
----                                                ----
Administrator@xmail.com           …

Quick way of listing all Active Directory Domain Accounts

Listing all Active Directory Domain Accounts using WMIC

By using WMIC you can get all the AD domain accounts very quickly.

WMIC is an acronym for Windows Management Instrumentation Command-line

Here's how we do it.

Just open a command prompt, no need to be an elevated command prompt.

At C prompt type:

C:\>wmic /node:domain_name /output:d:\usr.txt "useraccount" get


Change output drive to any drive you want the output to be exported.

Note that the word "USERACCOUNT" has no space, it is  one word.

After exporting the file.

Open the text or the output file using Excel.

Open Excel, press Control+O then the open Window will show.

I'm using Excel 2010, so go to All Files and select "Text Files".

Follow the on screen instruction and click on "Finish".

Then you will be able to see all the "Domain User Accounts", "SIDs", "Description", "Lock Out Status" and other details.

Please check sample below on how t…