Wednesday, June 21, 2017

Enable Exchange Online for modern authentication

By default, modern authentication isn't enabled in Exchange Online, but you can enable it.
 
Enable modern authentication in Exchange Online
 
1. Connect to Exchange Online PowerShell.
2. Run the following command in Exchange Online PowerShell:
 
 Set-OrganizationConfig -OAuth2ClientProfileEnabled $true
 
3. To verify that the change was successful, run the following command in Exchange Online PowerShell:
 
Get-OrganizationConfig | Format-Table -Auto Name,OAuth*

Enable Modern Authentication for Microsoft Office 2013

For enable modern authentication for Microsoft Office 2013, you need to set specific registry keys.
 
Note: Modern authentication is already enabled for Office 2016
 

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}