Windows Core: Move Page File via PowerShell

Reading Time: < 1 minute

You have configured a Windows Core Server and the page file resides on disk C. You would like to move it to Disk P

Run the below commands one at a time. If copying and pasting the commands, you may need to reenter the ” if any of the commands error.
Also, if you receive Description = Invalid query when running command 2, please reboot your server and run all commands again.
1)
wmic computersystem set AutomaticManagedPagefile=False

2)
wmic pagefileset where name=”C:\\pagefile.sys” delete

3)
wmic pagefileset create name=”P:\pagefile.sys”

4) Amend the InitialSize and MaximumSize figures as required. This command is based on a server including 4GB of memory. If your server includes 4GB of memory, it’s fine to use the below command:

wmic pagefileset where name=”P:\\pagefile.sys” set InitialSize=6144,MaximumSize=6144

5) Reboot the server

6) Run below command to confirm location of your page file
wmic pagefile list /format:list

Windows 2012 Core – How to configure network card using Powershell

Reading Time: < 1 minute
  1. If you have multiple NIC’s you need to identify the name of the NIC. If you’re using a virtual server, disconnect all NICs apart from the one so it can be identified in the next step.
  2. Type Get-NetAdapter
  3. Make a note of your NIC name, for example Ethernet. If you have disconnected all other NICs, Ethernet should be the only one showing as UP
  4. Next, type the below command but amend to your IP address, Gateway and Subnet PreFix LengthNew-NetIPAddress -InterfaceAlias Ethernet -IPAddress 0.0.0.0 -DefaultGateway 0.0.0.0 -PrefixLength 24
  5. Press Enter
  6. To configure DNS entries, the command would be:Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddress 0.0.0.0, 0.0.0.0
  7. Press Enter
  8. Done

Please note, if copying the commands, you may need to reenter – and ” if the commands fail

Google UK Adwords Voucher

Reading Time: < 1 minute

Google are currently offering a £75 voucher for new Adwords accounts, which can be very useful in getting started with advertising your products and services to millions of potential customers around the world.

Why Google AdWords?
Attract more customers. Whether you’re looking to bring in new website visitors, expand online sales, get the phones ringing or keep customers coming back for more, Google AdWords can help.

Advertise locally or globally
Target your ads to customers in certain countries, regions or cities – or within a set distance from your business or shop

Reach the right people at the right time
Your business gets found by people on Google precisely when they’re searching for the things that you offer.

Click Google Adwords Voucher to obtain the voucher

Configure time on server to sync with external time server(s)

Reading Time: < 1 minute

The below was carried out on a Windows 2012 DC

Take a backup of W32Time Registry folder (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Services\W32Time) (Right click on the folder and export)

1) Launch regedit

2) Browse to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
\W32Time\Parameters\Type

3) Click Type and then modify. Replace NT5DS with NTP and save

4) Browse to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Services\W32Time\Config\AnnounceFlags

5) Modify AnnounceFlags key and replace 10 with 5, save

6) Enable NTPServer. To do this locate and then click the following registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
\W32Time\TimeProviders\NtpServer

7) In the right pane, modify key Enabled and ensure value is set to 1

8) Browse to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet
\Services\W32Time\Parameters and locate NTPServer and replace time.windows.com,0x9 with your external time servers. 212.10.10.1,0×1 212.52.240.2,0×1 (Example shows two servers, one for backup.)

Save

8) Select the poll interval. To do this, locate and then click the following registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\
W32Time\TimeProviders\NtpClient\SpecialPollInterval

9) Replace value 3600 with 900 (Recommended value which configures the time server to poll every 15 minutes)

10) Browse to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Services\W32Time\Config\MaxPosPhaseCorrection

11) Amend key MaxPosPhaseCorrection, replace decimal 172800 with 3600 (which is 1 hour), save

12) Browse to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Services\W32Time\Config\MaxNegPhaseCorrection

13) Modify key MaxNegPhaseCorrection and replace 172800 decimal with 2600 (which is 1 hour) save

14) At the command prompt type and run net stop w32time & then type net start w32time

Migrate FSMO roles from 2008 to 2012 Server

Reading Time: 2 minutes

Take a system state backup of the DC’s which hold your FSMO roles, just incase. Always good practice to take a backup.

In this example, we are migrating FSMO roles from 2008 DC to 2012 DC

1) Locate where your FSMO roles are located. Logon to a DC, open command prompt and type, netdom query fmso
Depending on the size of your environment your FSMO roles may be split as show below:

The roles are:

Split 1
PDC
RID pool manager
Infrastructure Master

Split 2:
Domain Naming Master
Schema Master

Transfer: PDC, RID pool manager, Infrastructure Master

1) Logon to the DC2012 as domain administrator and ensure the account has schema admin rights, else when you get to the schema master migration, the button will be greyed out.
2) Launch Active Directory Users and Computers
3) Right click on yourdomain.local and click Operations Masters
4) Click on the PDC tab, click the change button to change the role to 2012DC
5) Click Yes to confirm when prompted
6) Confirm the text box now shows DC2012 as new owner of PDC role
7) Repeat the same steps above for RID and Infrastructure Roles

Transfer: Domain Naming Master

1) Logon to 2012DC as domain administrator. If you’re placing all roles on the same server you will already be logged onto this server. If you are separating Domain Naming Master and Schema Master role, logon to
DC2012_number2
2) Launch Active Directory Domains and Trusts
3) Right click on Active Directory Domains and Trusts and click Operations Masters
4) Click change and select new 2012 DC, click Yes to confirm.
5) Confirm the role has changed

Transfer: Schema Master

1) Logon to your 2012 DC as domain administrator
2) click run and type: regsvr32 schmmgmt.dll
3) Click ok and you should be prompted with ‘DllRegisterServer in schmmgmt.dll succeeded’
4) Click ok
5) Launch mmc from run (Click start, run, and type mmc, click ok)
6) Click Add/Remove Snap-In from file menu
7) Select to highlight Active Directory Schema and click the add button
8) Click OK
9) Right click Active Directory Schema and click Change Active Directory Domain Controller
10) Select New 2012 DC and click OK
11) An information box will appear including a message ‘Active Directory Schema snap-in is not connected to the schema operations master…..) Click OK to this message
12) Right click Active Directory Schema and click Operations Master
13) Click change and select new 2012 DC
14) Click Yes to confirm go ahead
15) Confirm schema server now showing as new 2012 DC

Run command netdom query fmso to confirm location of FSMO roles

It will take time for data to copy around so do not decom old DC straightaway.