Archiv der Kategorie: Microsoft

Mailflow issue from Exchange On-Prem to Office 365 – Lalit Bisht Blogs

You are on Exchange Hybrid environment and sending emails to Office 365 via specific SendConnector which has TlsCertificateName attribute configured and EOP is doing certificate validation for Inbound SMTP connections.

You might see any of the following errors in the queue/Protocol Logs.
–> 454 4.7.5 The certificate specified in TlsCertificateName of the SendConnector could not be found.
–> TLS negotiation failed with error NoCredentials.
–> „421 4.4.1 Connection timed out.“ Attempted failover to alternate host, but that did not succeed. Either there are no alternate hosts, or delivery failed to all alternate hosts

It may be because of the following issues:
–> You changed the third party SMTP certificate but didn’t update the TlsCertificateName attribute on the send connector.
–> Third party certificate is not assigned to the SMTP services.
–> Status of that third party certificate shows „INVALID“ or „RevocationCheckFailure“.

Please perform the following to resolve the issue.
–> Update the TLSCertificateName attribute on the Office 365 SendConnector.

$cert = Get-ExchangeCertificate -Thumbprint
$TLSCert = (‘<I>’+$cert.issuer+'<S>’+$cert.subject)
Set-SendConnector -Identity -TLSCertificateName $TLSCert
–>Make sure required certificate is assigned to the SMTP service and certificate Status shows VALID.

Quelle: Mailflow issue from Exchange On-Prem to Office 365 – Lalit Bisht Blogs

Excel „objekte verknüpfen und einbetten ist nicht möglich“

Fehlermeldung beim Starten von Excel: „objekte verknüpfen und einbetten ist nicht möglich“ dazu die Fehlermeldung im Eventviewer unter „Microsoft Office Alerts“ (OAlerts):
Event ID: 300
Data: „….100407…“

EN: cannot use object linking and embedding error

In meinem Fall hatte ein lokales Account zur Dokumentkonvertierung den Fehler hervorgerufen.

Die Lösung :

1: start->run and type ‚DCOMCNFG‘
2: Open ‚DCOM Config‘ and locate ‚Microsoft Excel Application‘
3: Set its identity to ‚The Launching User‘.

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/f159ae60-66d1-469b-9d8d-1c6aebff6149/excel-2013-cannot-use-object-linking-and-embedding-error?forum=exceldev

Windows change access permissions from the command line

CACLS files /e /p {USERNAME}:{PERMISSION}

Where,

  • /p : Set new permission
  • /e : Edit permission and kept old permission as it is i.e. edit ACL instead of replacing it.
  • {USERNAME} : Name of user
  • {PERMISSION} : Permission can be:
    • R – Read
    • W – Write
    • C – Change (write)
    • F – Full control

For example grant Rocky Full (F) control with following command (type at Windows command prompt):

C:> CACLS files /e /p rocky:f

Read complete help by typing following command:

C:> cacls /?

Quelle: Windows change access permissions from the command line

Konten im Active Directory entsperren oder aktivieren mit PowerShell | WindowsPro

Ein Tipp von meinem lieben Kollegen Rainer:

Search-ADAccount -LockedOut -UsersOnly -SearchBase „OU=IT,DC=contoso,DC=com“

Search-ADAccount -AccountExpired -UsersOnly

Search-ADAccount -AccountExpiring -TimeSpan „10“7

Unlock-ADAccount -Identity amueller

Set-ADAccountExpiration -DateTime 30.04.2017

Quelle: Konten im Active Directory entsperren oder aktivieren mit PowerShell | WindowsPro

ADFS 2012 R2 now supports Password Change (not reset) across all devices – samueld

Enabling Change Password in ADFS

By default, this functionality is disabled in ADFS. Change password looks just like another endpoint in ADFS and all you need to do is enable the endpoint. You can use the MMC snapin to enable this.

You can also do this via PSH using the Set-AdfsEndpoint cmdlet.

Once enabled, users can always access the change password page via https://adfs.contoso.com/adfs/portal/updatepassword/. It would look like this

Quelle: ADFS 2012 R2 now supports Password Change (not reset) across all devices – samueld

Use shared mailbox mobile and other clients

Eine „shared mailbox“ aus Exchange 20XX bzw. Office365 kann nicht einfach auf mobilen Geräten (und anderen, die keinen eigenen Outlook Client installiert haben) genutzt werden. Dazu gibt es aber Lösungen

  1. IMAP-Konfig:
    E-Mail: xy@mydomain.com
    User: firstname.lastname@mydomain.com/xy
    PW: MyPassword
  2. Konto aktivieren
    Im Active Directory das Konto der „Shared Mailbox“ aktivieren und ein Kennwort festlegen. Dann kann das Postfach wie jedes andere am Client hinzugefügt werden.

have i been pwned? Test all users of your domain

Aus einem Powershell-Beispiel von „IT Pro blog“ weiterentwickelt
https://infracloud.wordpress.com/2015/10/29/have-you-been-pwned-use-powershell-to-find-out/
Get-Pwned.ps1

Import-Module „C:\adm\custom\BasicTools.psm1“
$Global:CheckURI = „https://haveibeenpwned.com/api/v2/breachedaccount“
$global:OutputPath = „C:\“
$global:results = @()
Function ValidateAddress($Emailaddress){
try{
$Request = Invoke-WebRequest -Uri „$global:CheckURI/$Emailaddress“
$Response = ConvertFrom-Json $Request
Return $Response
}
catch [exception]
{
Return $null
}
}
Function IsValidEMail($email){
    $EmailRegex = ‚^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$‘;
    return ($email -match $EmailRegex)
}
Function IsValidDomain($mailaddress){
$domain = $mailaddress.Substring($mailaddress.IndexOf(„@“)+1)
$obj = Get-AcceptedDomain -Identity $domain -ErrorAction SilentlyContinue
if ($obj -eq $null){
$result = $false
}else{
$result = $true
}

return $result
}
Function ConvertHaveibeenpwnedObject($obj,$mailaddress,$username){
Set-ToolsLogAddLine -LogTXT „Compromised account $username, $mailaddress“
$result = New-Object -TypeName PSObject
$result | Add-Member -MemberType NoteProperty -Name username -Value $username
$result | Add-Member -MemberType NoteProperty -Name mailaddress -Value $mailaddress
$result | Add-Member -MemberType NoteProperty -Name HIBPAddedDate -Value $obj.AddedDate
$result | Add-Member -MemberType NoteProperty -Name HIBPBreachDate -Value $obj.BreachDate
$result | Add-Member -MemberType NoteProperty -Name HIBPDataClasses -Value ([system.String]::Join(„;“,$obj.DataClasses))
$result | Add-Member -MemberType NoteProperty -Name HIBPDescription -Value $obj.Description
$result | Add-Member -MemberType NoteProperty -Name HIBPDomain -Value $obj.Domain
$result | Add-Member -MemberType NoteProperty -Name HIBPIsSensitive -Value $obj.IsSensitive
$result | Add-Member -MemberType NoteProperty -Name HIBPIsVerified -Value $obj.IsVerified
$result | Add-Member -MemberType NoteProperty -Name HIBPLogoType -Value $obj.LogoType
$result | Add-Member -MemberType NoteProperty -Name HIBPName -Value $obj.Name
$result | Add-Member -MemberType NoteProperty -Name HIBPPwnCount -Value $obj.PwnCount
$result | Add-Member -MemberType NoteProperty -Name HIBPTitle -Value $obj.Title
return $result
}
Function main{
Set-ToolsLogCreate -LogFilePath „C:\adm\custom\logs\“ -LogPrefix „CompromisedAccounts“
Remove-ToolsLog -olderThenDays 21
Set-ToolsLogAddLine -LogTXT „Collect accounts“

$users = Get-ADUser -LDAPFilter „(mail=*)“ -Properties mail, proxyaddresses -ResultSetSize $null

$i = ($users).Count
Set-ToolsLogAddLine -LogTXT „Test $i accounts“
$i = 0
foreach($user in $users){
$i ++
if($i/100 -is [int]){Set-ToolsLogAddLine -LogTXT „$i accounts tested“}
$proxymail = „“
$usermail = „“
$usermail = $user.mail.ToLower()
$output = „“
if (IsValidEMail($usermail)){
if (isValidDomain($usermail)){
$obj = ValidateAddress($usermail)
if ($obj -ne $null){
$global:results += ConvertHaveibeenpwnedObject -obj $obj -mailaddress $usermail -username $user.SamAccountName
}
}
}
Foreach($proxyAddress in $user.proxyaddresses){
$proxymail = $proxyAddress.ToLower()
if ($proxymail.StartsWith(„smtp:“)){
$proxymail = $proxymail.Substring($proxymail.IndexOf(„smtp:“)+5)
if (IsValidEMail($proxymail)){
if ($proxymail -ne $usermail){
if (isValidDomain($proxymail)){
$obj = ValidateAddress($proxymail)
if ($obj -ne $null){
$global:results += ConvertHaveibeenpwnedObject -obj $obj -mailaddress $usermail -username $user.SamAccountName
}
}
}
}
}
}
}
Set-ToolsLogAddLine -LogTXT „Finish“ -foregroundcolor „green“ -backgroundcolor „darkgray“
$global:results | Export-csv „$global:OutputPath\CompromisedAccounts.csv“
}

main