When you copy an entire folder with ROBOCOPY, sometimes it hides files. Use this on the end to prevent:
/A-:SH
When you copy an entire folder with ROBOCOPY, sometimes it hides files. Use this on the end to prevent:
/A-:SH
IPCONFIG /ALL
. That will get you a list of active NICs. DNS in use, is set for each NIC if you have more than one.Ethernet adapter Embedded LOM 1 Port 2
.Set-DnsClientServerAddress "Embedded LOM 1 Port 1" -ServerAddresses ("10.11.12.13","10.11.12.14","10.11.12.15")
Set-DnsClientServerAddress "Embedded LOM 1 Port 2" -ServerAddresses ("10.11.12.13","10.11.12.14","10.11.12.15")
Set-DnsClientServerAddress "Ethernet" -ResetServerAddresses
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.
We can do this:
powershell "& {set-netfirewallprofile -profile domain,public,private -enabled 1}" -command
Anything placed after -command
is treated as an argument.
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
Lots of interesting things here:
http://code.google.com/p/googlecl/
including, just for starters, command-line upload to Youtube.
Try this:
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.
For Server 2003 SP2 and up, we have something new, ICACLS . Here’s some docs:
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: