Code Snippets

Exchange-GetServiceURLs

Exchange-GetServiceURLs

Get-MapiVirtualDirectory | FL server,*url* Get-WebServicesVirtualDirectory | FL server,*url* Get-ClientAccessServer | fl Name, AutodiscoverServiceInternalUri Get-OABVirtualDirectory | FL server,*url* Get-AutodiscoverVirtualDirectory | FL server,*url* Get-OutlookAnywhere | FL server,*hostname*

Set-MsolDomainAuthentication

Set-MsolDomainAuthentication

PS C:\Users\kschweiger> Connect-MsolService PS C:\Users\kschweiger> Get-MsolDomain Name Status Authentication —- —— ————– customer.mail.onmicrosoft.com Verified Managed customer.onmicrosoft.com Verified Managed customer.at Verified Federated PS C:\Users\kschweiger> Set-MsolDomainAuthentication -DomainName customer.at -Authentication Managed PS C:\Users\kschweiger> Get-MsolDomain Name Status Authentication —- —— ————– customer.mail.onmicrosoft.com Verified Managed customer.onmicrosoft.com Verified Managed customer.at Verified Managed

Invoke-ADSyncDiagnostics -PasswordSync

Invoke-ADSyncDiagnostics -PasswordSync

PS C:\Users\Administrator> Invoke-ADSyncDiagnostics -PasswordSync ======================================================================== = = = Password Hash Synchronization General Diagnostics = = = ======================================================================== AAD Tenant – customer.onmicrosoft.com Password Hash Synchronization cloud configuration is enabled False AD Connector – customer.intern Password Hash Synchronization is enabled Latest Password Hash Synchronization heartbeat is detected at: 09/13/2021 09:37:40 UTC Directory Partitions: ===================== Directory Partition -...

Ansible JSON Object Multiple VMs

Ansible JSON Object Multiple VMs

{ "Nodes":"local-test01, local-test02, local-test03", "VMs": { "local-test01": { "TimeUTC": "2020-01-01T00:00:00Z", "DayOfWeek": "Monday", "WeeksOfMonth": 1, "PRTGID": "000000", "LoadbalancerPath": "C:\\inetpub\\Monitoring\\lbcheck.txt", "LoadbalancerActiveString": "Active", "ExchangeVersion": "EX2019" }, { "local-test02": { "TimeUTC": "2020-01-01T00:00:00Z", "DayOfWeek": "Friday", "WeeksOfMonth": 2, "PRTGID": "000000", "LoadbalancerPath": "C:\\inetpub\\Monitoring\\lbcheck.txt", "LoadbalancerActiveString": "Active", "ExchangeVersion": "EX2016" }, { "local-test03": { "TimeUTC": "2020-01-01T00:00:00Z", "DayOfWeek": "Thuesday", "WeeksOfMonth": 1, "PRTGID": "000000", "LoadbalancerPath": "C:\\inetpub\\Monitoring\\lbcheck.txt", "LoadbalancerActiveString":...

Ansible JSON Object VMs Print Task sucess

Ansible JSON Object VMs Print Task sucess

– name: JSONTesting hosts: "all" tasks: – name: Print JSON debug: msg: – "DayOfWeek: {{ VMs[\"local-test01\"].DayOfWeek }}"

Ansible JSON Object VMs

Ansible JSON Object VMs

{ "Nodes":"local-test01", "VMs": { "local-test01": { "TimeUTC": "2020-01-01T00:00:00Z", "DayOfWeek": "Monday", "WeeksOfMonth": 1, "PRTGID": "000000", "LoadbalancerPath": "C:\\inetpub\\Monitoring\\lbcheck.txt", "LoadbalancerActiveString": "Active", "ExchangeVersion": "EX2019" } }

roborock.rules – Wischtag

roborock.rules – Wischtag

### Variable um den jeweiligen Reinigungsdurchgang zu tracken var Number cleanCycle ### Startet den Wischtag und beginnt mit den ersten beiden Räumen rule "ROBOROCK – CleaningDay Start" when Item pt_Roborock01_EG_cleaningDay changed to ON then logInfo("ROBOROCK – Start CleaningDay","Checking if all components are ready"); if(pt_Roborock01_EG_statusMop.state == ON){ logInfo("ROBOROCK – Start CleaningDay", "Start initial Room Cleaning for...

Generate new Exchange Authentication Certificate

Generate new Exchange Authentication Certificate

### Generate a new Certificate, replace the DomainName with your Exchange Domain New-ExchangeCertificate -KeySize 2048 -PrivateKeyExportable $true -SubjectName "cn=Microsoft Exchange Server Auth Certificate" -FriendlyName "Microsoft Exchange Server Auth Certificate" -DomainName "exchange.domain.com" ### Set the new generated Exchange Certificate as Authentication Certificate Set-AuthConfig -NewCertificateThumbprint <ThumbprintFromStep1> -NewCertificateEffectiveDate (Get-Date) Set-AuthConfig -PublishCertificate Set-AuthConfig -ClearPreviousCertificate ### Restart the IIS Server...

Get-ExchangeCertificate (Get-AuthConfig).CurrentCertificateThumbprint

Get-ExchangeCertificate (Get-AuthConfig).CurrentCertificateThumbprint

[PS] C:\Windows\system32>Get-ExchangeCertificate (Get-AuthConfig).CurrentCertificateThumbprint | select Subject, NotAfter, NotBefore Subject NotAfter NotBefore ——- ——– ——— CN=Microsoft Exchange Server Auth Certificate 03.08.2021 09:34:18 03.08.2016 09:34:18