Useful Commands I should remember, but don’t

December 16th, 2013 Leave a comment Go to comments

Windows

runas /user:computername\Administrator “rundll32.exe shell32.dll,Control_RunDLL command.cpl”  – Change command.cpl to appropriate cpl

 

Linux –

Hardware

sudo blkid  — Get the UUID of a hdd in Ubuntu

 

File System

sudo ln -s <target> <name>

 

Windows Server –

Domain

netdom query /domain:<your domain here> fsmo – Determine FSMO role holders

 DFS Backuplog

dfsrdiag backlog /rgname:<replication group name> /rfname:<replication folder name> /sendingmember:<Sending Server> /receivingmember:<receiving server>

FileSystem
Clean a USB Disk –

  1. Diskpart
  2. list disk
  3. select disk <#>
  4. clean
Windows Trial Period
slmgr /rearm – Resets the Activation Length to 30 days (maximum 3 times)
slmgr -dli – Shows number of days remaining on trial.

 

What svchost.exe points to which process?
tasklist /svc /FI “IMAGENAME eq svchost.exe”

 

Set server to point to another Server
net time \\<server> /set /yes

 

Exchange – Enable External Replay

Get-ReceiveConnector “<relay>” | Add-ADPermission -User “NT AUTHORITY\ANONYMOUS LOGON” -ExtendedRights “ms-Exch-SMTP-Accept-Any-Recipient”

 

VMWARE –

backup esxi configuration data

vicfg-cfgbackup -s -server <ip addr> <backup filename>

#downloaded file will be in AppData\Local\VirtualStore\Program Files (x86)\VMware\VMware vSphere CLI\bin\

  1. No comments yet.
  1. No trackbacks yet.