Hide

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again.

Delete that bloated snippets file you've been using and share your personal repository with the world. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.


If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/

Get involved!

You can sign-in using OpenID credentials, or register a traditional username and password.

First-time OpenID users will be automatically assigned a username which can be changed after signing in.

Hide

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for:

Hide

News

2011-03-12 - Confoo 2011 presentation
Slides are available from the commandlinefu presentation at Confoo 2011: http://presentations.codeinthehole.com/confoo2011/
2011-01-04 - Moderation now required for new commands
To try and put and end to the spamming, new commands require moderation before they will appear on the site.
2010-12-27 - Apologies for not banning the trolls sooner
Have been away from the interwebs over Christmas. Will be more vigilant henceforth.
2010-09-24 - OAuth and pagination problems fixed
Apologies for the delay in getting Twitter's OAuth supported. Annoying pagination gremlin also fixed.
Hide

Tags

Hide

Functions

wmi

Terminal - wmi
wmic -U DOMAIN/user --password='password' //IP_HOST "select Caption,CSDVersion,CSName from Win32_OperatingSystem" | grep Windows
2010-09-20 14:23:37
User: dr_gogeta86
Functions: grep
-3
wmi

Get windows version with servicepack and hostname

Alternatives

There are 2 alternatives - vote for the best!

Terminal - Alternatives

Know a better way?

If you can do better, submit your command here.

What others think

fantastic, thanks

PS:

TapeDrive Select * from Win32_TapeDrive

UserAccount Select * from Win32_UserAccount

ComputerSystem Select * from Win32_ComputerSystem

NTEvent Select * from Win32_NTLogEvent

MEMCACHE Select * from WIN32_CACHEMEMORY

PageFileSet Select * from Win32_PageFileSetting

Voltage Select * from Win32_VoltageProbe

Alias Select * from Msft_CliAlias

NetClient Select * from WIN32_NetworkClient

SysAccount Select * from Win32_SystemAccount

NetLogin Select * from Win32_NetworkLoginProfile

DiskQuota Select * from Win32_DiskQuota

DESKTOP Select * from WIN32_DESKTOP

SystemEnclosure Select * from Win32_SystemEnclosure

BootConfig Select * from Win32_BootConfiguration

WMISet Select * from Win32_WMISetting

RecoverOS Select * from Win32_OSRecoveryConfiguration

NetProtocol Select * from Win32_NetworkProtocol

SystemSlot Select * from Win32_SystemSlot

SoftwareFeature Select * from Win32_SoftwareFeature

NetUse Select * from Win32_NetworkConnection

SCSICONTROLLER Select * from Win32_SCSIController

Startup Select * from Win32_StartupCommand

LogicalDisk Select * from Win32_LogicalDisk

SoundDev Select * from WIN32_SoundDevice

SoftwareElement Select * from Win32_SoftwareElement

MemPhysical Select * from Win32_PhysicalMemoryArray

PageFile Select * from Win32_PageFileUsage

Process Select * from Win32_Process

PortConnector Select * from Win32_PortConnector

Job Select * from Win32_ScheduledJob

DCOMAPP Select * from WIN32_DCOMApplication

Service Select * from Win32_Service

BaseBoard Select * from Win32_BaseBoard

LOGON Select * from Win32_LogonSession

SysDriver Select * from Win32_SystemDriver

Temperature Select * from Win32_TemperatureProbe

DeviceMemoryAddress Select * from Win32_DeviceMemoryAddress

NTEventLog Select * from Win32_NTEventlogFile

BIOS Select * from Win32_BIOS

DMAChannel Select * from Win32_DMAChannel

LoadOrder Select * from Win32_LoadOrderGroup

TimeZone Select * from Win32_TimeZone

CPU Select * from WIN32_PROCESSOR

Port Select * from Win32_PortResource

Share Select * from Win32_Share

Partition Select * from Win32_DiskPartition

FSDir Select * from Win32_Directory

NTDOMAIN Select * from Win32_NTDomain

Environment Select * from Win32_Environment

VolumeQuotaSetting Select * from Win32_VolumeQuotaSetting

QuotaSetting Select * from Win32_QuotaSetting

IDECONTROLLER Select * from Win32_IDEController

DiskDrive Select * from Win32_DiskDrive

DataFile Select * from CIM_DataFile

CDROM Select * from Win32_CDROMDrive

QFE Select * from Win32_QuickFixEngineering

OnBoardDevice Select * from Win32_OnBoardDevice

PrintJob Select * from Win32_PrintJob

UPS Select * from Win32_UninterruptiblePowerSupply

CSProduct Select * from Win32_ComputerSystemProduct

Server Select * from Win32_PerfRawData_PerfNet_Server

Printer Select * from Win32_Printer

IRQ Select * from Win32_IRQResource

Product Select * from Win32_Product

PrinterConfig Select * from Win32_PrinterConfiguration

Group Select * from Win32_Group

DesktopMonitor Select * from WIN32_DESKTOPMONITOR

OS Select * from Win32_OperatingSystem

Registry Select * from Win32_Registry

NICConfig Select * from Win32_NetworkAdapterConfiguration

MemLogical Select * from Win32_LogicalMemoryConfiguration

NIC Select * from Win32_NetworkAdapter

Comment by oernii3 217 weeks and 4 days ago

wmic for linux:

http://jkern.posterous.com/compiling-wmic-for-linux-without-installing-s

Comment by oernii3 217 weeks and 4 days ago

Your point of view

You must be signed in to comment.

Related sites and podcasts