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.

Monday, 16 November 2015

Resetting Terminal services for Server 2012, 2008 R2 and 2008 Standard for another 120 days

After setting up the server you have 120 free trail period to use Terminal Services such as Remote desktop. However after 120 has expired you will receive this error while trying to remote desktop :

However there is a work-round if you don't have licence to activate the services at hand and the clients or you urgently require to remote desktop.

Here is a simple trick to reset the timer and get another 120 days free trail.
You must delete the key in a registry type REG_BINARY
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod
Only leaving the default key.

If you are having issue deleting the key. You are required to take ownership of the key itself.

Select the key from above and click on "Take Ownership" and follow the steps again.

Note: Make sure you are running registry as Administrator.

Saturday, 3 January 2015

Restore file format and icons to default - Windows 8.1, 8, 7, Vista


Steps:

- Open "regedit" from Run or Search bar.
- Find "HKEY_CURRENT_USER"
- Open "Software"
- Open "Microsoft"
- Open "Windows"
- Open "CurrentVersion"
- Open "Explorer"
- Open "FileExts" - Here is all the file extensions.
- Locate the file extension you wish to change back to default. This case find ".dll"
- Delete both folders "OpenWithList" and "UserChoice"

Press F5 to refresh the registry and then restart the computer.

Or you could just simply open Task Manager and close "explorer.exe" and start it again.