I think I see what you’re saying. If someone alters the destination file, it would be replaced by the source to restore the ‘corruption’.
Baki Dayi posted an update in the group
PowerShell 13 hours, 53 minutes ago
Get familiar with executing a DNS backup and restore procedure to avoid outage that can cause downtime for users across your organization.Joe Stutter commented on
How to create an open file/folder dialog box with PowerShell 15 hours, 49 minutes ago
I got the code you mentioned here “I also found a better folder browser dialog – Sapien Forums but I could not get it to run. to work. The issue is on line 122. The original looks like this:
for (int i = 1; i < names.Length; ++i) { type = type.GetNestedType(names, BindingFlags.NonPublic); }
it should be:
for (int i = 1; i < names.Length; ++i) { type = type.GetNestedType(names[i], BindingFlags.NonPublic); }
names is an array and it is missing the counter [i] in the code.
The MIR function at a minimum compares timestamps. Unless there is a way to change a file without altering the timestamp (there maybe, I am unsure) then robocopy /MIR will ensure the source files overwrite the destination files if there is a change recorded in the OS.
It probably wouldn’t repair hardware or driver level corruption, but it is great at fixing the corruption introduced by users.Samir commented on
Robocopy examples 1 day ago
Can’t wait to read about Cobian–seems like it’s pretty neat!
Thats the beauty of Cobian – it produce flat files copy or a simple zip archives that can be extracted by anything. Im preparing a post about Cobian, you will be able to read it soon if you like.
Great post as usual. Thank you for sharing the useful trick Mr. Wolfgang.
It’s pretty simple actually. If your source is T:SUBDIR and destinations are 10.10.10.1VOLUME, 10.10.10.2VOLUME, 10.10.10.2VOLUME, then something like:[code]FOR %F IN (10.10.10.1VOLUME 10.10.10.2VOLUME 10.10.10.2VOLUME) DO START ROBOCOPY T:SUBDIR %FSUBDIR /MIR /COPY:ALL /R:3 /W:3[code]I would also recommend testing to make sure your command is correct by using echo:
[code]FOR %F IN (10.10.10.1VOLUME 10.10.10.2VOLUME 10.10.10.2VOLUME) DO ECHO START ROBOCOPY T:SUBDIR %FSUBDIR /MIR /COPY:ALL /R:3 /W:3[code]Backup programs can also add their own additional point of failure though if a restore has to be done through the backup program. This is why I’ve stuck with straight file copies for backups.
you need to import the webadministration module first
run this command
import-module webadministrationYou are welcome to share such tricks with specific commands, readers would appriciate that.
For backups in general I prefer more sophisticsted tools, like free and great Cobian Backup with its own service, schedule, compressions etc..
How in the world is robocopy finding corruption and correcting it? afaik robocopy doesn’t have a built-in compare function.
Surender Kumar commented on
How to change Remote Desktop port (RDP port) using PowerShell 3 days, 5 hours ago
Additionally, if you access remote desktop from known IP addresses only, it is a good idea to modify the firewall rules to permit your custom RDP port for known IP addresses only to make it more secure.
Surender Kumar commented on
How to change Remote Desktop port (RDP port) using PowerShell 3 days, 5 hours ago
You’re right. VPN is the way to go for RDP access over internet but port obfuscation also helps a bit to keep dumb-bots in check who keep knocking on the default ports.
Job Cacka commented on
How to change Remote Desktop port (RDP port) using PowerShell 3 days, 12 hours ago
After doing this attempt to run nmap against those ports. I believe the command is this.
#nmap -p0- -v -A -T4It should show that the obfuscation of changing the port number is easily detected and VPN is absolutely necessary.
Thanks for posting this. I have used the MIR function of Robocopy to maintain a software distribution scheme so that all of the destinations end up with the same files as the source regularly. It “finds” corruption and corrects it nicely against a known good copy and helps force good update practices.
andy N commented on
Uninstall tamper-protected Sophos Antivirus with PowerShell 3 days, 19 hours ago
tested and confirm, this script is no longer working – you must update parts of this with updated GUID’s to get it working again
I use robocopy to copy bulk data on my eDiscovery servers and it still works great. You did a great job explaining its use cases. Thank you Leos.
- Load More