Tuesday, 29 November 2016

How to create script to restart DNS Server and do it automatically.

You can restart your DNS Service by going into the DNS Server.
However depending on environment some servers may require daily or even hourly DNS refresh to maintain a clean Server and reduce any DNS issues you may have.

The best way to do this is by creating a batch file and set it up on Schedule Tasks.

Open Notepad
Type in the following:
Net stop "dns server"
Net start "dns server"

Save the Notepad as .cmd (drop-down all files)

Search and open Task Schedule
Click on Create Task
On the Action Tab select "new"
Browse the batch file
Set the conditions
On the Trigger Tab select "new"

Here you can set up batch to be triggered Daily/Weekly/Monthly as Schedule
You can also Trigger the task by various other option.
My favourite "on disconnect from user session" since our clients uses remote access to work, so every time they log off the DNS refreshes for the next remote access.

Create Password Policy without a Server

Search & Run 'Local Security Policy' (LSP)
Account Policies > Password Policy
Here you will find the Policies you can apply.

Ideal Policies to add:
System will remember 5 previous Password so same password cannot be used over and over.
Password requires to be changed every 28 days.
Password is minimum 8 Characters long
Password complexity is applied (Case sensitive, numbers, special characters.)

How to restrict storage access (USB, DVDs and External HDD)

It is important to protect user and business files from competitors or vigilantes or even your staff members.
Together we will create a policy that is mostly used on computers that has sensitive information and is shared amongst multiple users.

What does the policy do ?
It restricts access to specified devices.

Guide:

Search & Open Microsoft Management Console (MMC)
File > Add/Remove Snap-in
Add Group Policy Object Editor (gpedit) > Browse Users > Non-Admin Users (Ideally or you can direct the policy to any user or group )
User Configuration > Administrative Templates > System > Removable Storage Access

Here you can select what policy to apply.
Just select what policy to apply and select enabled.

If you would like to restrict Storage Access on everyone including yourself, follow the steps below:

Search & Open Group Policy Object Editor (gpedit.msc)
User Configuration/Computer Configuration > Administrative Templates > System > Removable Storage Access

And simply select the policy you want to apply.