Lapas

ceturtdiena, 2015. gada 15. janvāris

Configure AD NTP synchronization

Run command promt as administrator.
Check time before sync:
echo %time%

Configure local time servers:
w32tm /config /manualpeerlist:pool.ntp.org /syncfromflags:MANUAL

net stop w32time
net start w32time

Check time after sync:
echo %time%

Force resync:
w32tm /resync 

Check settings:
reg query HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Parameters
w32tm /query /source

Check status
w32tm /query /status

Change time zone:
Set-TimeZone -Name "FLE Standard Time"
or
tzutil /s "FLE Standard Time"

piektdiena, 2015. gada 9. janvāris

Disable 8.3 name creation on disk volumes

1. Check status for disk D:
fsutil 8dot3name query D:


2. Check global system seting
HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\
NtfsDisable8dot3NameCreation set value to 2


3. Disable 8.3 name creation

C:\Windows\system32>fsutil 8dot3name set d: 1

Successfully set 8dot3name behavior.

C:\Windows\system32>fsutil 8dot3name query D:
The volume state for Disable8dot3 is 1 (8dot3 name creation is disabled).
The registry state of NtfsDisable8dot3NameCreation is 2, the default (Volume level setting).
Based on the above two settings, 8dot3 name creation is disabled on D:

otrdiena, 2014. gada 25. novembris

Speed up windows search indexing

Run gpedit.msc

Enable policy Computer Configuration -> Administrative Template -> Windows Components -> Search -> Disable indexer backoff

Restart Windows Search service:
net stop wsearch
net start wsearch


Source: www.question-defense.com

ceturtdiena, 2014. gada 30. oktobris

Kill service with stopping status

sc queryex servicename 
taskkill /f /pid [PID]

For example:

C:\>sc queryex WSearch

SERVICE_NAME: WSearch
TYPE               : 10  WIN32_OWN_PROCESS
STATE              : 4  RUNNING
                                (STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE    : 0  (0x0)
SERVICE_EXIT_CODE  : 0  (0x0)
CHECKPOINT         : 0x0
WAIT_HINT          : 0x0
PID                : 5604
FLAGS              :

C:\>taskkill /t /f /pid 5604

otrdiena, 2014. gada 28. oktobris

Get list of all Office 365 users and their licenses

Here is PowerShell script to get list of all users and their licenses:

#######begin script#######

cls

Import-Module msonline

Connect-MsolService

Function Get-UserLicenseList {

$MasterList = @()

Get-MsolUser -All  | % {

$Object = New-Object PSObject -Property @{

DisplayName = $null

UserPrincipalName = $null

AssignedLicense = $null}

$Object.DisplayName = (Get-MsolUser -UserPrincipalName $_.UserPrincipalName).DisplayName

$Object.UserPrincipalName = (Get-MsolUser -UserPrincipalName $_.UserPrincipalName).UserPrincipalName

$Object.AssignedLicense = ((Get-MsolUser -UserPrincipalName $_.UserPrincipalName).licenses | select accountskuid).accountskuid

$MasterList += $Object}

$MasterList | Out-GridView

}

Get-UserLicenseList

#######end script#######


Source: comunity.office365.com