cmd

command line

Log Off User remotely – cmd

If you ever wondered how to log off user remotely (or locally) via command line try this. As usual membership of the local admins group is needed. Start cmd with elevated privileges. check logged user and their session number with qwinsta: QWINSTA /server:computername Memorize the session ID and use the logoff command: LOGOFF sessionID /server:computername.    

Check program/app ports

To check which ports are used by an app/program go to Task Manager, find the needed one and note its PID. Then Open a command prompt and type: netstat -ano | findstr xxxx (where “xxxx” is PID number)

External HDD Access Denied Windows 8.1

When pissed off by my own external hdd asking for administrator approval every time when I move fielks around i did this: takeown /F “Complete path of the file location”: icacls “Complete path of the file location”: /grant “ComputerName”\”UserName”:F It helped. Somehow 🙂

Set Ip Server 2012 PowerShell

To set a static IP address In Windows PowerShell, run Get-NetIPInterface. Make a note of the number shown in the IfIndex column of the output for your IP interface or the InterfaceDescription string. If your computer has more than one network adapter, make a note of the number or string corresponding to the interface for which you wish to set a static IP address. In Windows PowerShell, run New-NetIPAddress –InterfaceIndex 12 –IPAddress -192.0.2.2 –PrefixLength 24 –DefaultGateway -192.0.2.1 Where: InterfaceIndex is the value of IfIndex from Step 2 (in this example, 12) IPAddress is the static IP address you intend to set (in this example, 192.0.2.2) PrefixLength is the prefix length (another form of subnet mask)… Read More »Set Ip Server 2012 PowerShell

Dumpchk

I was digging a blue screen minidump today and received weird “symbols not correct!” error. c:\program files\debugging tools for windows> dumpchk -y srv*c:\websymbols*http://msdl.microsoft.com/download/symbols c:\windows\minidump\mmddyy-nn.dmp The command above is downloading correct symbols directly from Microsoft and downloads them in c:\websymbols more on this tomorrow…