PS>net accounts /minpwlen:14
PS>net accounts /minpwlen:14
# Enable the password-complexity policy via secedit (no reboot needed).PS>$inf = "$env:TEMP\pwcomplexity.inf"PS>@'PS>[Unicode]PS>Unicode=yesPS>[Version]PS>signature="$CHICAGO$"PS>[System Access]PS>PasswordComplexity = 1PS>'@ | Set-Content -Path $inf -Encoding UnicodePS>secedit /configure /db "$env:TEMP\pwcomplexity.sdb" /cfg $inf /areas SECURITYPOLICY
# BitLocker requires Windows Pro/Enterprise/Education (absent on Home).PS>if (Get-Command Enable-BitLocker -ErrorAction SilentlyContinue) {PS> Enable-BitLocker -MountPoint 'G:' -EncryptionMethod XtsAes256 -UsedSpaceOnly -RecoveryPasswordProtector -SkipHardwareTestPS> if ('G:' -eq $env:SystemDrive) { Add-BitLockerKeyProtector -MountPoint 'G:' -TpmProtector } else { Enable-BitLockerAutoUnlock -MountPoint 'G:' }PS>} else {PS> Write-Warning 'BitLocker is unavailable on this Windows edition.'PS>}
PS>Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer' -Name NoDriveTypeAutoRun -Value 255 -Type DWord -Force
PS>auditpol /set /subcategory:'Logon' /success:enable /failure:enable
PS>Get-CimInstance Win32_NetworkAdapterConfiguration -Filter 'IPEnabled=True' | ForEach-Object { Invoke-CimMethod -InputObject $_ -MethodName SetTcpipNetbios -Arguments @{ TcpipNetbiosOptions = 2 } | Out-Null }