Yes you are right, there is a type in the script, it should be “$_.CounterSamples”, not “$_.CounterExamples”
Cheers
Reda DZRado Rafiringa commented on
Understanding PowerShell Begin, Process, and End blocks 13 hours, 44 minutes ago
If cleanup is necessary regardless of whether an exception is thrown or not, what is the advantage of using begin, process and end blocks instead of try, catch and finally blocks?
First, create VM Hyper-V using a ISO Windows 2016. Then, How-to Install-WindowsFeature and apps (chocolatey) using Remote Powershell, against Virtual Machine (Windows 2016) in Hyper-V (in Windows 10) ?
SteveA commented on Configure protection against potentially unwanted apps using PowerShell or Group Policy 1 day ago
The screenshot has a different setting than what is highlighted.
SteveA commented on Configure protection against potentially unwanted apps using PowerShell or Group Policy 1 day ago
It would of been helpful to give the path of the group policy settings.
Rex Keene commented on Getting started with Jenkins 2 days ago
Thanks for that, but it’s a very dev oriented piece.
I’ll never see those file types, I’m not a Jenkins user, but I do have to install and maintain Jenkins servers, and I’d have appreciated a more infrastructure oriented piece.Whenever I have a need for something to be read only like this though, I’ll set set the permissions to read-only.
Found this for people looking for a replacement. https://github.com/lithnet/idle-logoff/wiki
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’.
Joe Stutter commented on
How to create an open file/folder dialog box with PowerShell 3 days, 14 hours 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.
Can’t wait to read about Cobian–seems like it’s pretty neat!
Tony Pieromaldi commented on Windows Defender Application Control (WDAC): Secure Windows 10 / 11 against malicious apps and rogue drivers with recommended WDAC block rules 4 days, 2 hours ago
hi there. I am following these instructions verbatim but cannot get this to work on my Intune test machine. The error code given in Intune is 0x87d10190, any ideas? Thanks
bunglegrind commented on Enable AppLocker on Windows 10 Pro and Windows 11 Pro with PowerShell 5 days, 1 hour ago
Concerning the DLL rules (MDM_AppLocker_DLL03) it looks like it’s working correctly (your script doesn’t provide the DLL feature, but it could be easily extended). I’m running the DLL rules in audit mode, and logs are correctly showed in events manager.
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 webadministrationHow in the world is robocopy finding corruption and correcting it? afaik robocopy doesn’t have a built-in compare function.
andy N commented on
Uninstall tamper-protected Sophos Antivirus with PowerShell 6 days, 18 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
Samir commented on
Robocopy usage examples 1 week ago
A lot of sites have more details on the switches, but it is also hit and miss on how well it works depending on the source and destination.
For one backup operation I had to make a ‘fall’ and ‘spring’ set since when dst kicked in, robocopy would copy everything again and not just the changed files.
Samir commented on
Robocopy usage examples 1 week ago
It might also be worth mentioning a few tricks for copying and comparison.
For copying from one source to multiple destinations, using the ‘start’ command in a ‘for’ loop can start the copies simultaneously and allow the 100% cache hit to effectively double the copy speed since the original is basically only being read once and written twice. I’ve used this for up to 4 destinations simultaneously and it works best with similar destinations. Even when the destinations are not similar and the individual robocopy sessions become ‘off sync’ from each other, the latency of hitting the disk usually brings them back into alignment because one of the sessions has a cache hit while the other is still going to disk.
For comparison, MS’s own windiff is a pretty good way to compare entire tree branches. However, if one needs to compare a single source to multiple destinations, winmerge does a better job since it has the ability to actually compare a single source to 2x destinations. And being a portable program that runs on the various windows platforms (just like windiff), it’s another handy tool that can check the work of a robocopy session for bit by bit accuracy.
- Load More