Scripting - Enumerate file extension, count them and indicate total size

If you have necessity to analyze single folder (and relatives subfolders), identifying all files extensions, count files numbers and indicate total size this script will assist you on this requirement

$directory = "D:\foo"

#Get all items

Get-ChildItem -Path $directory -Recurse |

#Get only files

Where-Object { !$_.PSIsContainer } |

#Group by extension

Group-Object Extension |

#Get data

Select-Object @{n="Extension";e={$_.Name -replace '^\.'}}, @{n="Size (MB)";e={[math]::Round((($_.Group | Measure-Object Length -Sum).Sum / 1MB), 2)}}, Count

https://stackoverflow.com/questions/22616634/determine-recursively-both-count-and-sum-of-all-extensions-in-a-folder


Hardware - mSATA vs SATA vs M.2 SSD

Here it is a quick article that well explain differences between mSATA vs SATA vs M.2 SSD

https://techgenix.com/msata-ssd-comparison/

Security - MFA override

Here it is mentioned, in italian language a way to override MFA when a proper phishing email is sent to user that will redirect him to a similar website page (a.e. web bank)

End user will insert user and password. Immediately crimes will insert user and password on original website (a.e. bank).

User will receive email with temporary code (true), that will be inserted in duplicated page. Crimes will use this latter code on original webpage having full access on user account (a.e. bank)

So attention to phishing emails must be improved.

https://www.hwupgrade.it/news/sicurezza-software/l-autenticazione-a-due-fattori-puo-essere-bucata-dall-italia-arriva-la-scoperta-ma-non-c-e-soluzione_106327.html

Security - Edge VPN built-in feature Microsoft implementation on going and Opera Built in VPN free

Today  I would like to mention that Microsoft is working to release new Edge version with VPN integrated, it should be for free for limited traffic amount, an account creation should be necessary. 

In any case is an interesting information (to improve security) and encrypt traffic, for providers too, and to hide you public IP address

https://www.cnet.com/tech/services-and-software/microsoft-edge-is-getting-a-built-in-vpn/

https://www.hwupgrade.it/news/sistemi-operativi/microsoft-edge-avra-la-sua-vpn-integrata-e-gratuita-arriva-l-annuncio-ufficiale_106800.html

Another browser that already have, built in VPN feature, for free, is Opera, have a look to below link:

https://www.opera.com/features/free-vpn

Server - SMB Protocols some useful information



Consider that on each Win O.S. there are two services (one is necessary to connect to remote shares, other one is necessary to publish shares):
  1. Client (LanmanWorkstation)
    Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation
  2. Server side (LanmanServer
    Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer

Here they are some useful commands:

Get-Service Lanman*
Get-SmbShare
Get-Service LanmanServer -DependentServices

To log any if SMB 1.0 protocol is enabled on file server you must use below powershell command 

Set-SmbServerConfiguration -AuditSmb1Access $True -Force

On eventviewer logs are here located:

Applications and Services Logs > Microsoft > Windows > SMBServer > Audit

EventID 3000 

to view events using powershell you must use:

Get-WinEvent -LogName Microsoft-Windows-SMBServer/Audit | Out-GridView

to view if SMB 1.0 is enabled 

Get-SmbServerConfiguration | select EnableSMB1Protocol

If you want to see which SMB versions are using your clients

Get-SmbSession | select ClientComputerName, ClientUserName, NumOpens, Dialect

Dialect is correct column indicating SMB version

There are possibilities to encrypt End-to-End encryption, for single share:

Set-SmbShare -Name Projects$ -EncryptData $True -Force

and for entirely file server

Set-SmbServerConfiguration –EncryptData $True -Force

Meanwhile Microsoft is going to not support, SMB 1 on Windows 11 due to well known security problems. (driver and DLL would not be included)


[original article]