Thursday, June 8, 2017

Enable and Disable SMBv1, SMBv2, and SMBv3 in Windows and Windows Server

(draft)

How to remove SMB v1 in Windows 8.1, Windows 10, Windows 2012 R2, and Windows Server 2016


• Windows Server PowerShell Command:
Remove-WindowsFeature FS-SMB1
 
• Windows Client PowerShell Command:
Disable-WindowsOptionalFeature -Online -FeatureName smb1protocol

How to enable or disable SMB protocols on the SMB server

Windows 8 and Windows Server 2012

• To view the current state of the SMB server protocol configuration, run the following command:
Get-SmbServerConfiguration | Select EnableSMB1Protocol, EnableSMB2Protocol

• To disable SMBv1 on the SMB server, run the following command:
Set-SmbServerConfiguration -EnableSMB1Protocol $false

• To disable SMBv2 and SMBv3 on the SMB server, run the following command:
Set-SmbServerConfiguration -EnableSMB2Protocol $false

• To enable SMBv1 on the SMB server, run the following command:
Set-SmbServerConfiguration -EnableSMB1Protocol $true

• To enable SMBv2 and SMBv3 on the SMB server, run the following command:
Set-SmbServerConfiguration -EnableSMB2Protocol $true

Notes:
You do not have to restart the computer after you run the Set-SMBServerConfiguration.
When you enable or disable SMBv2 in Windows 8 or in Windows Server 2012, SMBv3 is also enabled or disabled.

Tips of the day #1706

Tip of the day #1706-1

Use Windows PowerShell to change the UPN suffix for all users
Change all company.local suffixes to company.com

Import-Module ActiveDirectory

Example 1.
$LocalUsers = Get-ADUser -Filter {UserPrincipalName -like '*company.local'} -Properties userPrincipalName -ResultSetSize $null

$LocalUsers | foreach {$newUpn = $_.UserPrincipalName.Replace("company.local","company.com"); $_ | Set-ADUser -UserPrincipalName $newUpn}


Monday, March 20, 2017

Rename and Move an Exchange Mailbox Database


To rename the default database running the following command:
[PS] C:/>Set-Mailbox "Mailbox Database 12453789" -Name "MailBoxDB-2"


Move the database files:
[PS] C:/> Move-DatabasePath -Name "MailBoxDB-2" -EdbFilePath "D:/MailBoxDB/MailBoxDB-2/MailBoxDB-2.edb" -LogFolderPath "E:/MailBoxDBLogs/MailBoxDB-2"


Update AD Group ManagedBy Attribute – PowerShell Script


 

Example 1.

Input File
Groups-170316-1.csv - The input file contains group names.



Script

Import-module ActiveDirectory

$User = "User-170316"

Import-CSV "C:\Scripts\Groups-170316-1.csv" | % {

$Group = $_.GroupName

Get-ADGroup $Group | Set-ADGroup -ManagedBy $User
}

Notes:
$User = <ADUser>


Example 2.

Input File
Groups-170316-2.csv - The input file contains group and user names.


Wednesday, March 1, 2017

Exchange 2007 - end of life on April 11th


11 квітня завершується підтримка Exchange Server 2007.
Також завершується підтримка інших продуктів Office 2007.

Детальніше за посиланнями:

Exchange 2007 reaches end of life on April 11th. What’s your plan to move?

Exchange 2007 End of Life Roadmap