Convert P12 to P8 certificate

Do you of some reason need to convert a P12 certificate to a P8 certificate?

This is how you can do that.

Step 1.

openssl pkcs12 -in certificate.p12 -out certificate.pem -clcerts -nokeys

Step 2

openssl pkcs12 -in certificate.p12 -out key.pem -nocerts -nodes

Step 3

openssl pkcs8 -topk8 -inform PEM -outform PEM  -in in.key -out out.pkcs8 -v1 PBE-MD5-DES

Trust relationship failed

Do you have a login problem with a domain-joined computer?
Do you get a message like image blow?

Windows machines trust relationship has failed

Then your computer is has lost its trust relationship and it has failed.
This happened to me after I needed to restore a server.

If you have access to a local account or a cached account you can still log in on it.

To solve this:
Remove the machine from the domain
and take it back into the domain again.


Remember this!

*Make sure have access local admin account on the machine before removing it from the domain, or else it will be hard to log in

* Make sure to have access to an account that can bring the machine back into the domain after logged in with local admin, and that is connected to a network so it can talk to domain controller.

* If its a windows 10 machine and you can’t log on it, try this guide.

I hope this can help you with the restore Trust relationship that had failed in your domain.

Teams background

Press the Windows logo and r
paste or write this URL
%AppData%\Microsoft\Teams\Backgrounds\Uploads

You should end up something like the address below.
C:\Users\user.account.name\AppData\Roaming\Microsoft\Teams\Backgrounds\Uploads

In this folder you can place your image that you want to use as a background image.



How to change a background in Microsoft Teams?
Step 1: Join a meeting. …
Step 2: While in the meeting, click the 3-dot menu button in the bottom bar.
Step 3: Now, click background effects.
Step 4: You will get the ‘Background settings’ menu in the right pane.


Their many sites with good backgrounds out there, use the power of Google to find them.
here suggestion or site with backgrounds, another one contentlab.

Privileged Identity Management

Privileged Identity Management, or PIM as many say.
This is way higher your security in your environment.
You can give a user a role, and that role user can apply for (depending on your setup) and that role will last X hours after that will go away and you will need to apply for it again. A good way to avoid someone is a Global administrator 24/7 for example.


So how can you apply for a role?
First, you need to go into porta.azure.com and then go to Privileged Identity Management, after that you can look to left in the menu bar, you will find like the image, there you can see all roles that have been given too you.

PIM – My roles


Back to menu Privileged Identity Management, now you might want to know how to give Roles to someone, go Manage, then Azure AD roles.
After having done that you can go to Roles like the image below.
Page after that you will search for the role and pick it and add a user.
– To do this you need to be a Global Administrator.

PIM – Roles


Maybe you want to change for how long a role should last?
Back to menu Privileged Identity Management, now you might want to know how to give Roles to someone, go Manage, then Azure AD roles.
Go into Settings as Image below

PIM – Settings


Search for a specific role, and go into settings
Here you can edit for how long-duration specific access role can be applied for, like Image below, change it and save it.

PIM – Duration hours


Thank you for your time.

Get a list of Exchange mailbox with forwarding

Are you looking for a way to find out how to get hold of all mailbox that has forward in their mailbox and where it’s going?

Get-Mailbox | Where {($_.ForwardingSMTPAddress -ne $null) -or ($_.ForwardingAddress -ne $null)} | Select Name, ForwardingSMTPAddress, ForwardingAddress, DeliverToMailboxAndForward | format-Table -AutoSize

| format-Table -AutoSize, in the end, might not be needed, but for me I feel so much easier to read the information I get back when I can read the entire email address.

Default Domin Password Policy

Do you want to find out the default policy set up on your company?

You can use this PowerShell command you will get the Default Domin Password Policy

Get-ADDefaultDomainPasswordPolicy

The variable you will get back should look something like this, plus a value in the end of course

ComplexityEnabled :
DistinguishedName :
LockoutDuration :
LockoutObservationWindow :
LockoutThreshold :
MaxPasswordAge :
MinPasswordAge :
MinPasswordLength :
objectClass :
objectGuid :
PasswordHistoryCount :
ReversibleEncryptionEnabled :

Remove Azure Role Assignment

How to remove users Access Management from Top level

First, make user you have full access in azure,
Then go to Azure AD, then to Properties

Change from No to Yes
When this is done, you can run this PowerShell command

Remove-AzRoleAssignment -SignInName first.lastname@company.com -RoleDefinitionName "User Access Administrator" -Scope "/"

This will remove the user’s access from the top level.
Make sure your user account change back your access right.

fsck Ubuntu

Do you have trouble with the filesystem is corrupt?
Do you get a message with something like the image below?
Remember this can differ from every situation so, one problem might be very different from any others, in my case I did not have any backup so I did not have so much as a choice just go for it and cross my fingers.

You will need to run fsck on the entire link that the system is complaining about.

It might be that you need to make a choice I picked Yes

I had to do this two or three times, but every time the filesystem link changed.

The command I run look like this

fsck /folder/that/they/are/complaining-on


But after that I was lucky and the system was working again.

Cant edit SAML Basic configuration

Do you have trouble edit SAML basic configuration?

It would not happen you are running dark mode in Azure?

Basic SAML Configuration white

As you see the “edit pen” is black so you cant see it.
If the background is black

Basic SAML Configuration black

I hope this information could help you if you run into this problem with cant edit SAML basic configuration.

Azure AD Threshold sync

Have you encountered the problem that you want to make more change than allowed or that you just wonder changes how to change Azure AD Sync Threshold?
This needs to be done on the server that has an Azure Sync client.


First to find out if there is one and what is the setup?
Get-ADSyncExportDeletionThreshold

If you want to disable this rule for some reason,
we strongly advise against it.
Disable-ADSyncExportDeletionThreshold

Then there nothing stopping if someone accidentally deleted to many accounts between two syncs.

If you want to change the Threshold to 10
Enable-ADSyncExportDeletionThreshold -DeletionThreshold 10

Read more about it