powershell list folders or files that are over 256 caharacters

You can check for file and folder name length limits in Windows using PowerShell. Here's a script that can help you identify files and folders with names that exceed the 256 character limit in Windows: powershell Copy code # Set the path to the root folder you want to check $rootFolder = "C:\Path\To\Your\Folder" # Function to recursively check file and folder names function Check-PathLength { param ( [Parameter(Mandatory = $true)] [string]$path ) # Check the length of the path if ($path.Length -gt 256) { Write-Host "Path length exceeds 256characters: $path" } # Check the length of subfolder names $subfolders = Get-ChildItem -Directory $path foreach ($subfolder in $subfolders) { if ($subfolder.FullName.Length -gt 256) { ...
Read More

Microphone too quiet

Limit options to boot auto within windows Use third party Tool http://sourceforge.net/projects/equalizerapo/ During installation it will ask to which device, ensure you have your Microphone connected once installed restart your computer Go to C:\Program Files\EqualizerAPO\config\config.txt Add the line Preamp: +16db Test your Mic (Teams test call or Zoom Test)...
Read More

Convert vhd to vhdx

Downloaded a vhd from azure added it to gen1 vm however only showed blinking cursor Created gen 2 vm however could not add the vhd issue reading it Converted vhd to vhdx and was able to boot On VM setting go to disk Edit Choose action Convert select VHDX set type fixed or dynamic set location finish on hyper v settings edit disk browser to disk Choose action Convert select VHDX set type fixed or dynamic set location finish...
Read More

Check if a program is installed and report version to a text file

In this example it checks for chrome $Hostname = hostname $user = whoami $time = Get-Date -Format ddmmHHmm $Program = Get-Package -ProviderName Programs -IncludeWindowsInstaller '*Chrome*' | select Name,Version New-Item -path "\\Server\Share" -Name "Chrome$Hostname.txt" -ItemType "file" -Value "$Hostname,$user,$Program,$time"   output file Chromews03.text Content WS03,azuread\mattl,@{Name=Google Chrome; Version=88.0.4324.146},06021702  ...
Read More

Reset password on activate directory via powershell

Single user Set-ADAccountPassword –Identity useralias–Reset –NewPassword (ConvertTo-SecureString -AsPlainText "Newp@ssw0rd" -Force)   Multiple Users csv with heading SamaccountName and the new password $UserFile = "C:\Temp\MultiUser.CSV" Foreach ($User in $UserFile) { $SamAccountName = $User .SamAccountName $ThisPassword = $User .Password Set-ADAccountPassword –Identity $SamAccountName –Reset –NewPassword (ConvertTo-SecureString -AsPlainText "$Password" -Force) }...
Read More