Category Archives : Uncategorized

SYSVOL Migration (FRS to DFRS)

dfsrmig /setglobalstate 1
repadmin /syncall /force /APed
dfsrdiag pollad
dfsrmig /getmigrationstate

Success?

dfsrmig /setglobalstate 2
repadmin /syncall /force /APed
dfsrdiag pollad
dfsrmig /getmigrationstate

Success?

dfsrmig /setglobalstate 3
repadmin /syncall /force /APed
dfsrdiag pollad
dfsrmig /getmigrationstate

Success?

WMIC command lines

Get BIOS version

wmic bios get smbiosbiosversion

Get Dell Service Tag

wmic bios get serialnumber

psexec \\PCNAME cmd above to get it remotely

Get motherboard info

wmic baseboard get product,manufacturer,version,serialnumber

Powershell for various AD user info

Get-ADUser -Filter * -Properties LastLogonDate | Sort -Property LastLogonDate | FT Name, LastLogonDate
Get-ADUser -Filter * -Properties lastLogontimeStamp | Sort -Property lastLogontimeStamp | FT Name, lastLogontimeStamp
Get-ADUser -Filter * -Properties passwordlastset | Sort -Property passwordlastset | FT Name, passwordlastset
Get-ADDomaincontroller -Filter * | % {$DC = $_.name ; Get-ADuser COMPUTERNAME -properties * -Server $_.name | select @{n="LastLogon";e={[datetime]::FromFileTime($_.lastlogon)}},@{n="DC";e={$DC}} }
$DateCutOff = (Get-Date).AddDays(-30)
Get-ADUser -Filter * -Properties whenCreated | where {$_.whenCreated -gt $DateCufOff} | FT Name, whenCreated

Next Page »
Back to Top