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

Set out of office reply on multiple mailboxes

Set same on Mulitple CSV with Heading UserPrincipalName Txt file with the HTML Code for the reply Connected to Exchange via powershell   This sets External message the internal message is set blank $Extmessage = Get-content -Path C:\Temp\externalmessage.txt Import-Csv C:\temp\Mailboxes.csv | ForEach-Object { $user1 = $_."UserPrincipalName" Set-MailboxAutoReplyConfiguration -identity $user1 –AutoReplyState Enabled –InternalMessage '' –ExternalMessage "$Extmessage" } check it has updated Import-Csv C:\temp\Mailboxes.csv | ForEach-Object { $user1 = $_."UserPrincipalName" Get-MailboxAutoReplyConfiguration -identity $user1 | select Identity,ExternalMessage| fl }      ...
Read More

Create signature Outlook web app

Login to https://outlook.office.com/owa/ click on gear icon and select view all outlook setting on Email tab select compose and reply and fill in your signature Login to https://outlook.office.com/owa/ If you get error the text your types is too long, clean up the signature Copy to new word documents and save the document as web page Filtered closed word and reopen the doc (it should open in web browser) then select the text and copy then paste in to signature are in OWA...
Read More

Add signature to Outlook client

Open a new email message. On the Message menu, select Signature > Signatures. Under Select signature to edit, choose New, and in the New Signature dialog box, type a name for the signature. Under Edit signature, compose your signature. Under Choose default signature for new messages select your signature, for replies is you want to use the same signature select the signature name or create a new signature. On Outlook for MacOn the Outlook menu, select Preferences.Under Email, select Signatures.Select Add to add a new signatureIn the Signature editor, type the text that you want to include in your signature.After you are done creating your signature, close the editor window Under Choose default signature for new messages select your signature, for replies is you want to use the same signature select the signature name or create a new signature. close the Signatures window.     ...
Read More

Managing membership of Distribution and 365 Groups

Distribution Groups Login to https://outlook.office.com/owa/ Click gear icon select view all outlook settings Go to General then distribution groups https://outlook.office.com/mail/options/general/distributionGroups   Office 365 Groups Login to https://outlook.office.com/owa/ on left side Groups select mange groups and will take you to https://outlook.office.com/people/group/owner Select required group and click on Members tab and remomve or all ones your require...
Read More

Office 365 – check which mailboxes a particular user has access to

Connect to 365 via powershell $UserCredential = Get-Credential $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection Import-PSSession $Session -DisableNameChecking.   Get-Mailbox | Get-MailboxPermission -User userA UserA would be the user that you want to know for instance; What mailboxes does Matt have access to would be as follows: Get-Mailbox | Get-MailboxPermission -User matt  ...
Read More

Office 365 – Azure backup remove recovery services vault

Within Azure I used the Azure Backup server I unregsitered the server I was using however backup items still displayed which prevent me removing the vault solution was to go to manage > backup infrastructure then under management servers click on Backup mananagement server and remove from there. If it is a single server backup under backup ingrastructure go to protected servers (azure backup agent) select server and choose delete Once removed you can then delete the recovery vault...
Read More

Search Exchange mailbox for a particular folder

Connect to 365 via powershell $UserCredential = Get-Credential $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection Import-PSSession $Session -DisableNameChecking. Get-MailboxFolderstatistics -Identity mailboxname | Where {$_.Name -Match "foldername"} For instance to search my mailbox name Matt for a folder that contains alerts the command looks like this: PS C:\WINDOWS\system32> Get-MailboxFolderstatistics -Identity matt | Where {$_.Name -Match "alerts"} Although this give the output below, If you have multiple folders that contain your search criteria it can be difficulty to read To get a better idea of where the folder is located use the identity to filter PS C:\WINDOWS\system32> Get-MailboxFolderstatistics -Identity matt | Where {$_.Name -Match "alerts"} | select identity Identity -------- matt\LanSweeperAlerts Another example is a folder called backups that is within my inbox folder PS C:\WINDOWS\system32> Get-MailboxFolderstatistics -Identity matt | Where {$_.Name -Match "backups"} | select identity Identity -------- matt\Inbox\Backups Once you have finished disconnect your exchange powershell session Remove-PSSession $Session...
Read More