Posts filed under ‘Windows’

How to Track File Deletion on a File Server

Hi Folks

Anybody wants to enable auditing on their file server , for the purpose of tracking and auditing who has deleted any files or folders , I would recommend the below article.

https://blogs.technet.microsoft.com/askds/2009/08/04/tracking-a-remote-file-deletion-back-to-the-source/

It covers detailed steps on how to enable the Group Policy for auditing and enabling Folder level Auditing parameters. However after enabling the required configuration you need to filter out for the event ID’s 4663,4624,5140, and 4660 in the Security Event Log.

These event ID’s will provide the audit trail for the event.

Advertisements

June 18, 2019 at 12:22 pm Leave a comment

Additional Permissions needed for a Service Account to Reset and Change AD passwords and Unlock AD Accounts.

In some scenarios we had to delegate the  permission for a Junior Administrator to do some AD related tasks ,for example change/reset the AD user password , Unlock user account , etc. In this case most of the articles I have googled and referred pointing only to enable the
“Reset user passwords and force password change at next logon “. But what I realized is that this alone will not grant your the required permission.

Thus additionally you need to add a custom level delegation as provided below;

  • Create a custom task to delegate and click Next.
  • Select  Only the following objects in the folder from the Delegate control of option.
  • Select the User objects option as the object to which to delegate.
    Click Next to proceed.(Ensure Property-specific is selected.)
  • Scroll down to select the Read lockout Time and Write lockout Time.
  • Review the changes and click next to complete the wizard.

Please note that I have not listed any detailed steps on how to create the delegation rules as there are plenty of articles available on the Internet  that provides a very descriptive guidelines along with  the screenshots.

Source: https://webactivedirectory.com/knowledge-base/permissions-service-account-needs-reset-change-ad-passwords-unlock-ad-accounts/

June 28, 2018 at 11:20 am Leave a comment

SYSVOL Replication Error on Windows 2012 R2

Hi Guys

Recently we migrated  one of our customer’s  active directory domain controllers to a virtualized environment. During the DC migration  my colleague noticed that the SYSVOL and NETLOGON folders are not replicating it’s contents from the existing domain controller. Thus he copied the contents manually. But after some time client started reporting error like;

  • The Group Policy is not getting updated or Propagated to all the workstations / users.
  • Logon Scripts stopped working.

Thus when we digged in to the problem we were able to track down the issue to DFSR based sysvol replication, Most importantly the old DC was not replicating for almost 1300 days approximately(Figure.1) The below event ID’s helped us to track down the issue:

 

 

 

 

 

So when we started troubleshoot we tried to ran the commands stated in the Eventviewer(refer attached file) but no avail.

Also we ran the below command
For /f %i IN (‘dsquery server -o rdn’) do @echo %i && @wmic /node:”%i” /namespace:\\root\microsoftdfs path dfsrreplicatedfolderinfo WHERE replicatedfoldername=’SYSVOL share’ get replicationgroupname,replicatedfoldername,state

Strangely the status on all the server showing 2 which is Initial Sync. (One of the reason for the problem) .Also in our MaxOfflineTimeInDays more than 1000 days. But
By default in Windows the  is set to 60 Days. In our case we need to extend it upto 1800 days where there was an offset of more than 1000. so we ran the command to force the servers to allow the content freshness for more than 1000 days.

wmic.exe /namespace:\\root\microsoftdfs path DfsrMachineConfig set MaxOfflineTimeInDays=1800

(Do not forget to bring it back the original value of 60 Days)

But sill no avail. Then we decided to Authoritative restore of the SYSVOL folders. We ran the below command set which were extracted from the MS KB:https://support.microsoft.com/en-us/help/2218556/how-to-force-an-authoritative-and-non-authoritative-synchronization-fo)


Do this step on the PDC Emulator Role

Stop the DFSR Service

#net stop dfsr

Open the ADSIEDIT.MSC tool, modify the following DN and two attributes on the domain controller you want to make authoritative (preferably the PDC Emulator, which is usually the most up to date for SYSVOL contents):

CN=SYSVOL Subscription,CN=Domain System Volume,CN=DFSR-LocalSettings,CN=<the server name>,OU=Domain Controllers,DC=<domain>

msDFSR-Enabled=FALSE
msDFSR-options=1

Modify the following DN and single attribute on all other domain controllers in that domain:

CN=SYSVOL Subscription,CN=Domain System Volume,CN=DFSR-LocalSettings,CN=<each other server name>,OU=Domain Controllers,DC=<domain>

msDFSR-Enabled=FALSE

Stop the DFSR service on all the remaining controllers

#net stop dfsr

Force Active Directory replication throughout the domain and validate its success on all DCs.

Start the DFSR service set as authoritative:(On the PDC emulator)

#net start dfsr

You will see Event ID 4114 in the DFSR event log indicating SYSVOL is no longer being replicated.

On the same DN from Step 1, set:

msDFSR-Enabled=TRUE

Run the below command to force Active Directory replication throughout the domain and validate its success on all DCs.

#repadmin /syncall /AdP

Run the following command from an elevated command prompt on the same server that you set as authoritative:

DFSRDIAG POLLAD

You will see Event ID 4602 in the DFSR event log indicating SYSVOL has been initialized. That domain controller has now done a “D4” of SYSVOL.

Start the DFSR service on the other non-authoritative DCs.

#net start dfsr

You will see Event ID 4114 in the DFSR event log indicating SYSVOL is no longer being replicated on each of them.

Modify the following DN and single attribute on all other domain controllers in that domain:

CN=SYSVOL Subscription,CN=Domain System Volume,CN=DFSR-LocalSettings,CN=<each other server name>,OU=Domain Controllers,DC=<domain>

msDFSR-Enabled=TRUE

Run the following command from an elevated command prompt on all non-authoritative DCs (i.e. all but the formerly authoritative one):

DFSRDIAG POLLAD

————————————————————————————-

Voila we could see the replication started working and when we checked the replication status  via the command

For /f %i IN (‘dsquery server -o rdn’) do @echo %i && @wmic /node:”%i” /namespace:\\root\microsoftdfs path dfsrreplicatedfolderinfo WHERE replicatedfoldername=’SYSVOL share’ get replicationgroupname,replicatedfoldername,state

it shows  the status 4 (which is all synced)

I am listing the below articles which helped me in the initial troubleshooting.

https://support.microsoft.com/en-us/help/967336/a-newly-promoted-windows-2008-domain-controller-may-fail-to-advertise

http://www.itprotoday.com/windows-8/fixing-broken-sysvol-replication

https://support.microsoft.com/en-us/help/2218556/how-to-force-an-authoritative-and-non-authoritative-synchronization-fo

http://kpytko.pl/active-directory-domain-services/non-authoritative-sysvol-restore-dfs-r

http://kpytko.pl/active-directory-domain-services/authoritative-sysvol-restore-dfs-r/

Good Luck

Muralee

Update 1 (29/01/2018) :

  • Added the start and stop DFSR commands.

 

November 5, 2017 at 12:19 pm 4 comments

Windows 2016 License Calculator

Hi

With recent change of Licensing approach by Microsoft to transient from Processor based to Core based license has triggered various confusions for customers.  But the HP has come up with a cool calculator that helps to calculate the exact licenses we need to procure per server  and the total rights for virtual OSE’s. Further this tool gives an option to add the number of VM’s that we are planning to host and in turn the tool gives the additional license pack we need to order;

http://h17007.www1.hpe.com/us/en/enterprise/servers/licensing/index.aspx#.WT5dwcb-vIU

June 12, 2017 at 12:51 pm Leave a comment

How to import Users to Windows 2012 Active Directory using PowerShell

Hi Guys

In many AD installations I do come across requirements  to create multiple users in Active Directory(More than 200 in many cases) .In these cases we could use the below mentioned CSV template and use the PS command to directly import the users in  to Active Directory.

users

Here the Path value is pointing to the OU that you want to place the users  in the Active Directory , which could be find using the Attribute Editor of the OU(We need to enable the Advance Feature in the ADUC Management Console)

PS Command Syntax
Import-CSV C:\anyname.csv | New-ADUser –AccountPassword (ConvertTo-SecureString –AsPlaintext “any complex password” –Force) –PassThru | Enable-ADAccount.

Example:

Import-CSV C:\Users_1.csv | New-ADUser –AccountPassword (ConvertTo-SecureString –AsPlaintext “P@ssw0rd” –Force) –PassThru | Enable-ADAccount

December 22, 2016 at 2:24 pm Leave a comment

There is no certificates installed on this remote desktop server

On the RD  Session Host Configuration when you tried to assign the SSL certificate which you obtained from any vendor you will receive the message in the title.

This is because the SSL certificate need to be imported on .PFX format , In my case the cert i downloaded from GoDaddy was having a .crt extension. Therefore I opened the Certificate-Snapin(Local Computer) and  selected the already imported certificate in the Personal container,then I  tried to export the certificate as  Personal Information Exchange(.pfx)so I could re-import it correctly But I was not able to do so as it was showing the below screen,

ssl_export_before_repair

As you see the Personal Information Exchange option is disabled as this is because the SSL certificate does not have the private key.

In order to overcome this get the serial number of the certificate(Open  the ssl certificate by double clicking on it and open the details TAB) then on a command prompt entere the below command;

certutil -repairstore my “SerialNumber”

That’s it now you could the export the cert as .pfx and re-import it on Personal and Remote Desktop containers in Certificate Snap-in.

Finally you could select the SSL on RD Session Host configuration.

Source:

http://scexblog.blogspot.com/2010/09/export-personal-information-exchange.html

 

Update1:

In 2012 and above MS have removed the RDP Snap-in to change the SSL Certificate thus you need to follow the steps mentioned in MS KB Article:https://support.microsoft.com/en-us/help/3042780/remote-desktop-listener-certificate-configurations-in-windows-server-2

 

May 25, 2015 at 2:27 pm Leave a comment

Trust relationship cannot be created because the following error occurred

Hi

I was trying to build a Forest wide Trust between 2003 R2 and 2008 R2 environment and I covered  the required prerequisites as below;

* The forest functional level should be  set to minimum  Windows 2003 Server(On the Windows 2003 Domain Controller)

* The conditional forwarding  was set up on 2003  and 2008 to resolve target domain names

But still I was getting  the error on the title along with the below error ;

“The operation failed: The error is: This operation cannot be performed on the current domain.”

trust_error

 

In order to solve this please make sure below identifiers are not same in your both target and source domains

– SID

– NetBIOS  name

– DNS name

In my case it was the NetBIOS name and I had to rename the domain name.

Reference

Known Issues for Creating Domain and Forest Trusts
Available From:https://technet.microsoft.com/en-us/library/cc794894%28v=ws.10%29.aspx Accessed (12th May 2015)

 

May 12, 2015 at 1:45 pm Leave a comment

Older Posts


Archives

Categories

Follow Hope you like it.. on WordPress.com

Blog Stats

  • 22,611 hits

%d bloggers like this: