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/
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.
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
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:
Have you ever wanted to connect to a win machine with Remote Desktop disabled?
You can activate the permission remotely and then connect to your remote server with the magic wmic.
If you can do better, submit your command here.
You must be signed in to comment.
When would this not work? What needs to be enabled on the Windows System for this to work?
This is useful when the remote windows system has Remote Desktop disabled by Group Policy.
See http://support.microsoft.com/kb/306300 for further details.
If you administer a remote machine with Remote Desktop disabled and you need to access it remotely you can re-enable it remotely with the wmic command I've provided.
You don't want to travel to the place where the remote machine is to activate Remote Desktop locally right? ;)
Of course, you need admin privileges... you must be the network administrator...
Best regards,
What this package is "wmic" ??
I have this message in my Ubuntu
No command 'wmic' found, did you mean:
Command 'wmc' from package 'wine' (universe)
Command 'wmc' from package 'wine1.2' (universe)
Command 'wmix' from package 'wmix' (universe)
Command 'wmii' from package 'wmii' (universe)
Command 'wmii' from package 'wmii2' (universe)
Command 'rmic' from package 'openjdk-6-jdk' (main)
Command 'rmic' from package 'kaffe' (universe)
Command 'rmic' from package 'gcj-4.3' (universe)
Command 'rmic' from package 'gcj-4.4-jdk' (main)
Command 'rmic' from package 'sun-java6-jdk' (multiverse)
Command 'wmlc' from package 'wap-wml-tools' (multiverse)
wmic: command not found
wmic is a windows command.
There's a port for linux called wmi-client
On your Ubuntu maybe you can install it with this syntax:
sudo apt-get install wmi-clientRegards,
not working in Ubuntu
Because:
Usage: [-?|--help] [--usage] [-d|--debuglevel DEBUGLEVEL] [--debug-stderr]
[-s|--configfile CONFIGFILE] [--option=name=value]
[-l|--log-basename LOGFILEBASE] [--leak-report] [--leak-report-full]
[-R|--name-resolve NAME-RESOLVE-ORDER]
[-O|--socket-options SOCKETOPTIONS] [-n|--netbiosname NETBIOSNAME]
[-W|--workgroup WORKGROUP] [--realm=REALM] [-i|--scope SCOPE]
[-m|--maxprotocol MAXPROTOCOL] [-U|--user [DOMAIN\]USERNAME[%PASSWORD]]
[-N|--no-pass] [--password=STRING] [-A|--authentication-file FILE]
[-S|--signing on|off|required] [-P|--machine-pass]
[--simple-bind-dn=STRING] [-k|--kerberos STRING]
[--use-security-mechanisms=STRING] [-V|--version] [--namespace=STRING]
//host query
Example: wmic -U [domain/]adminuser%password //host "select * from Win32_ComputerSystem"
What command have you introduced?
You may be careful about the slash and backslash...
Alternatively you could use the psexec port for *nix called winexe and do somethin' like this:
winexe -U HOME/Administrator%Pass123 //host 'reg add reg add "hklm\system\currentcontrolset\control\terminal server" /f /v fDenyTSConnections /t REG_DWORD /d 0'# wmic
-bash: wmic: command not found