TechShizz | All posts tagged 'Operating Systems'

Time Sync Issues

w32tm /resync

[/computer:<computer>]

[/nowait]

[/rediscover]

[/soft]

Tells a computer that it should resynchronize its clock as soon as possible, throwing out all accumulated error statistics.

computer:<computer> – Specifies the computer that should resynchronize. If not specified, the local computer will resynchronize.

nowait – do not wait for the resynchronize to occur; return immediately. Otherwise, wait for the resynchronize to complete before returning.

rediscover – Redetect the network configuration and rediscover network sources, then resynchronize.

soft – resynchronize using existing error statistics. Not useful, provided for compatibility.


Example: w32tm /resync /computer:Server01

Sample Hosts File

# The localhost entry should be in every HOSTS file and is used

# to point back to yourself.

127.0.0.1        localhost

# My test server for the website

192.168.1.2        test.bleepingcomputer.com

#Blocking known malicious sites
127.0.0.1  admin.abcsearch.com
127.0.0.1  www3.abcsearch.com #[Browseraid]
127.0.0.1  www.abcsearch.com #[Restricted Zone site]

Features on Demand

Get list of Windows Features/Roles

 

get-windowsfeature

======================================

To uninstall a single feature/role

 

Uninstall-WindowsFeature DHCP -remove

======================================

To uninstall all Features/Roles not installed


Get-WindowsFeature | Where-Object -FilterScript { $_.Installed -Eq $False } | Uninstall-WindowsFeature -Remove

======================================

To install a removed feature

Insert the iso or CD, and this will be used as the source for the binaries.

 

Install-WindowsFeature DHCP -source D:\sources\sxs

Install-WindowsFeature DHCP -source WIM:D:\sources\install.wim:1


 

REMEMBER to select the correct Index for the WIM file. Must be same Index as the current OS.