AD Change Display name

At the company were I worked we had a name change. They also use the display name in outlook to send mail. Example: Daag van der Meer [Company] So everyone see direct what the company is.

The script below built the display name with firstname lastname [Company]

 

Enable Windows Photo Viewer in Windows 10

In windows 10 Windows Photo Viewer is gone.
Here is how to activate it.
Download the following regkeys.
Activate-Windows-Photo-Viewer-on-Windows-10

When runned. Right click on a picture. Goto open with, Choose another app.

Now you get a list, Select Windows Photo Viewer and check Always use this app to open .* files.

Source: howtogeek.com

Here is the XML for GPO import Registry. Save as XML and drag and drop it in Computer Configuration > Preferences > Windows Settings > Registry

AD Change Roaming profile Path Terminal server

I created this script because of moving the profiles to a server in the data center were also the terminal server is located.

Powershell needs to be runned as Administrator

 

Raspberry PI as a VPN Client to FRITZBOX with IPSEC

Setup of VPN at the Fritzbox

First, a new user is created under System-> FRITZ! Box user.

Here, the access from the Internet must be granted and VPN (of course, be unlocked, everything else is deselected.

we remember the information from the iphone settings:

  • Description:
  • Server: arpdggefuegr23723n.myfritz.net
  • Account: vpn_user
  • Password: Password of the FRITZ! Box user “vpn_user”
  • Use certificate is disabled
  • Group name: vpn_user
  • Shared Secret: TANrpS1y34hHHJGIS4
 Now it goes on the Raspi ….

Installation:

sudo apt-get install vpnc

Create and customize config:

sudo nano /etc/vpnc/fritzbox.conf

IPSec gateway arpdggefuegr23723n.myfritz.net
IPSec ID vpn_user
IPSec secret TANrpS1y34hHHJGIS4
IKE Authmode psk
Xauth username vpn_user
Xauth password <passwort>
local port 0
DPD idle timeout (our side) 0

first test of the tunnel:

sudo vpnc fritzbox.conf

Ending the VPn connection:

sudo vpnc-disconnect

I have the start of the script in /etc/rc.local registered so that the VPN connection is established during boot.

vpnc fritzbox.conf

– Update –

Since the VPN connection breaks partially uncontrolled Abdelkader Wahb has made a script that monitors the connection and reboots when needed. I do not want to deprive you of this:

Entry in / etc / crontab so that every 3 minutes is automatically executed on boot:

* / 3 * * * * root /etc/init.d/autovpncscript

Source: kuemmel.wtf

Outlook displays “Disconnected” in the status bar if the last character in the legacyExchangeDN attribute is a space

Applies to: Outlook 2016Outlook 2013

Symptoms


In Microsoft Outlook 2016 or Outlook 2013, you experience one or several of the following symptoms:

  • You receive the following error message:
    The Microsoft Exchange Administrator has made a change that requires you quit and restart Outlook.

  • You receive the following error message when you start Outlook:
    Cannot start Microsoft Outlook. Cannot open the Outlook window. The set of folders cannot be opened. The file C:\Users\<username>\AppData\Local\Microsoft\Outlook\user@doamin.com.ost is not an Outlook data file (ost).
  • Outlook displays one of the following message in the status bar:
    Trying to connect…
    Disconnected

Cause


This issue occurs if there is a trailing space (that is, if a space is the last character) in the legacyExchangeDN attribute.

Resolution


To resolve this issue, remove the trailing space from the legacyExchangeDN attribute by using ADSIEdit.msc. To do this, follow these steps.

Important After you make this change in the legacyExchangeDN attribute, recipients who previously received an email message from this user will receive a non-delivery report (NDR) message if they try to reply to an email message that they received from this user before the change was made. This problem will not occur for replies to new email messages that the user sends after the change was made.

  1. Open the Run dialog box. To do this, use one of the following methods, as appropriate for your situation:
    • Windows 10, Windows 8.1 or Windows 8: Press the Windows key + R.
    • Windows 7 or Windows Vista: Click Start, and then click Run.
  2. Type ADSIEdit.msc, and then press Enter.
  3. Expand the Default naming context to CN=Users.
  4. Select the user account whose mailbox is prompting the error.
  5. Right-click this account, and then click Properties.
  6. Locate the legacyExchangeDN attribute, and then click Edit.
  7. Remove the trailing space at the end of the username.
  8. Click OK, click Apply, and then exit ADSIEdit.msc.
  9. Have the user exit and then restart Outlook.

Source: Microsoft

Raspberry pi cleanup script

Create with the following command in your raspberry pi the script.

Paste below the text and with CTRL + X close nano

To run the script. First:

Start the cleanup: