Wednesday, January 31, 2018

[EX2016] Enable HTTP Strict Transport Security (HSTS)



In IIS, we can add a new header for our site, though, we can also set the response header at the server or folder level if necessary.
  • Open IIS Manager and select the site
  • Double-click on the HTTP Response Headers
  • Click Add…
  • Set the name to: Strict-Transport-Security
  • Set the value to: max-age=10886400 then click OK

Sunday, January 7, 2018

[LY15] Cannot install KB2982006



Get-Hotfix KB2919442,KB2919355,KB2982006

Expand -F:* C:\UCLobby\Windows8.1-KB2982006-x64.msu C:\UCLobby\KB2982006

dism /Online /Add-Package /PackagePath:C:\UCLobby\KB2982006\Windows8.1-KB2982006-x64.cab

Get-Hotfix KB2919442,KB2919355,KB2982006

Monday, December 11, 2017

[O365] Change/remove groups and teams SMTP addresses




  • List all groups and their addresses:



Get-UnifiedGroup | fl alias,*primary*,*emailadd* 

  • Change primary SMTP

Get-UnifiedGroup group1 | Set-UnifiedGroup -PrimarySmtpAddress group1@newdomain.tech

  • Remove SMTP address from old domain:

Get-UnifiedGroup group1 | Set-UnifiedGroup -EmailAddresses @{remove="group1@olddomain.com"}

  • List group addresses:

Get-UnifiedGroup group1 | fl alias,*primary*,*emailadd* 

Friday, October 13, 2017

[WIN] Recover lost/missing system tray icons



$registryPath = "HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify"
$Name1 = "IconStreams"
$Name2 = "PastIconsStream"
$value = $null
New-ItemProperty -Path $registryPath -Name $Name1 -Value $value -PropertyType BINARY -Force | Out-Null
New-ItemProperty -Path $registryPath -Name $Name2 -Value $value -PropertyType BINARY -Force | Out-Null
Get-Process explorer | Stop-Process -Force
.

Sunday, September 24, 2017

[LY13] Export address book to file



abserver -dumpfile "C:\LyncShare\n-WebServices-n\ABFiles\00000000-0000-0000-0000-000000000000\00000000-0
000-0000-0000-000000000000\F-0ef3.lsabs" c:\ABS-dump26Jun.txt

Sunday, August 27, 2017

[WSRV] Script to Block .Net 4.7


$registryPath = "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\WU"
New-Item -Path $registryPath -Force | Out-Null
$Name = "BlockNetFramework47"
$value = "1"
New-ItemProperty -Path $registryPath -Name $name -Value $value -PropertyType DWORD -Force | Out-Null

Saturday, August 5, 2017