Move share folder from one drive to another retaining share and security permissions

We will use the robocopy command in order to copy the folder and retain all the security permissions

robocopy "D:\Data\FolderName" "G:\Data4\FolderName" /MIR /SEC /ZB /V /r:1 /w:2 /nfl /ndl

In order to move the share permissions we have to open the following registry key,locate the share and change the path:
HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares
Restart the Server service and we are done.

Posted in Uncategorized | Leave a comment

Change the smtp address of a Microsoft 365 Group

In order to create a remote powershell session to 365, open Windows Powershell and run below commands:

$UserCredential = Get-Credential

and enter your 365 credentials when prompted.
Then type:

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session -DisableNameChecking

To add required smtp address:

Set-UnifiedGroup -Identity "Group Name" -EmailAddresses: @{Add ="[email protected]"}

To promote as a primary smtp address:

Set-UnifiedGroup -Identity "Group Name" -PrimarySmtpAddress "[email protected]"

To remove the old address from the group:

Set-UnifiedGroup -Identity "Group Name" -EmailAddresses: @{Remove="[email protected]"

To end your Exchange Online Powershell session:

Remove-PSSession $Session
Posted in Windows | Leave a comment

Freenas issue when replacing failed disk

When replacing a failed hard disk from the GUI you get the following error:
“Unable to GPT format the disk ada…”.
From the command line:
sysctl kern.geom.debugflags=0x10

dd if=/dev/zero of=/dev/ada3 bs=512 count=1

Posted in Linux | Comments Off on Freenas issue when replacing failed disk