Category: Command Line

Files piling up in C:\ProgramData\Microsoft\Crypto\RSA\S-1-5-18
article #1100, updated 13 days ago

When certain antivirus products go a bit haywire, or other unfortunate things happen, hundreds of thousands of small files can pile up in either the location in the title of this article, or here:

C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys

The location in the title seems to be more common in Windows 10, the other more for Windows 7, but check both, and if you have a pileup in either, run this CMD command inside:

forfiles /D -10 /C "cmd /C attrib -s @file & echo @file & del @file"

forfiles is a very nice command that iterates through the files in a folder according to its parameters. /D -10 iterates through all files more than 10 days old. attrib -s takes off the System attribute, which is needed for DEL (delete) to work. The echo is there so you can see that it is doing its job.

Categories:   Command Line   Windows OS-Level Issues

==============

Embed PowerShell in a CMD command
article #1097, updated 13 days ago

We can do this:

powershell "& {set-netfirewallprofile -profile domain,public,private -enabled 1}" -command 

Anything placed after -command is treated as an argument.

Categories:   Command Line   

==============

Set a user's password to non-expiring via CMD
article #731, updated 1127 days ago

NET USE does not appear to be able to set a user’s password to non-expiring. However, we do have this:

WMIC USERACCOUNT WHERE "Name='username'" SET PasswordExpires=FALSE

Categories:   Command Line   Windows OS-Level Issues

==============

Google command line tools
article #593, updated 1484 days ago

Lots of interesting things here:

http://code.google.com/p/googlecl/

including, just for starters, command-line upload to Youtube.

Categories:   Command Line   Tools

==============

Excellent reference to CMD, Bash, PowerShell, Microsoft SQL, and several other command line environments
article #574, updated 1532 days ago

Try this:

http://ss64.com

Categories:   Command Line   

==============

Command-line DVD pre-preparation
article #285, updated 2344 days ago

The following converts a huge variety of video formats (replace .ABC with whatever you have, AVI, FLV, etc.) to DVD-compatible MPEG:

ffmpeg -i videofile.ABC -target dvd -aspect 16:9 -sameq videofile.mpg

FFMPEG is standard in probably all non-minimalist Linux distros, and can also be had for Windows now.

Categories:   Audio-Video   Command Line

==============

File and folder permissions from the command line
article #219, updated 2545 days ago

For Server 2003 SP2 and up, we have something new, ICACLS . ┬áHere’s some docs:

http://ss64.com/nt/icacls.html

Categories:   Command Line   Windows OS-Level Issues

==============

Convert PDF to TIFF with free software (Ghostscript)
article #216, updated 2551 days ago

Here is a valid command line:

gswin32c -q -dNOPAUSE -sDEVICE=tiffg4 -sOutputFile=output.tif input.pdf -c quit

A good place to get Ghostscript for Windows is here:

http://sourceforge.net/projects/ghostscript/

Categories:   Application Issues   Command Line

==============

Command-line creation of Windows shares
article #74, updated 3193 days ago

Here is some info on creation of Windows shares by command-line. It involves a free download from Microsoft called RMTSHARE.


http://windowsitpro.com/articles/index.cfm?articleid=74678

Categories:   Command Line   

==============

Best command-line reference for many systems
article #73, updated 3193 days ago

Probably the very best command-line reference, for Windows, Bash, Oracle, and SQL Server:

http://www.ss64.com/index.html

Categories:   Command Line