PowerShell – Convert a text document to a PDF.

Looong time, no posts.

Just wrote a PowerShell function that can convert text documents into PDF format. You need Microsoft Office Word installed.

Use free of charge:

 

Event 15021 – An error occurred while using SSL configuration for endpoint 0.0.0.0:443

Lately I had the issue that SolarWinds Orion was detecting an expiring certificate on one of our servers. I have replaced every certificate on the server and double checked (of thought!) that the old certificate was deleted. But it was still complaining about an expiring date on a certificate I couldn’t find. I checked the event logs and found the event 15021, which told me something was still wrong.

I found out that a certificate was on a binding with “netsh show http certssl” in a command prompt.

It was resolved by doing the following.

Read More

SharePoint – User Profile Image Cross-Site with ADFS

If you have spread the MySite and a web application into separated SharePoint Web Application and both of these is using ADFS for authentication. You maybe noticed that you are not able to load user profile thumbnails from the MySite. This is because a token is not issued from the MySite webapplication and Cross-Origin Resource Sharing (CORS) that is a security measure.

But luckily Microsoft have acknowledged this an added a PowerShell command that allows to load pictures/resources from other SharePoint web applications on the same farm.

Read More

SharePoint – Reduce the search system impact

It’s possible to set the performance for a SharePoint search crawl with PowerShell. This becomes handy if you are on a developing environment where performance isn’t crucial.

There are 3 valid modes:

  • Reduced
    • Total number of threads = number of processors, Max Threads/host = number of processor.
  • PartlyReduced (default)
    • Total number of threads = 4 times the number of processors , Max Threads/host = 16 times the number of processors
  • Maximum
    • Total number of threads = 4 times the number of processors , Max Threads/host = 16 times the number of processors (threads are created at HIGH priority)

Use the following PowerShell commands in a SharePoint Management Shell.

Read More

SharePoint – Enable BLOB Cache with PowerShell

Disk-based caching controls caching for binary large objects (BLOBs) such as image, sound, and video files, as well as code fragments. Disk-based caching is extremely fast and eliminates the need for database round trips. BLOBs are retrieved from the database once and stored on the Web client. Further requests are served from the cache and trimmed based on security.

Disk-based caching is disabled by default. To enable and customize the disk-based cache, you can run the following script.

Read More

Group Policy – Found unlinked (disabled) GPO and delete it

If you have a lot of unused (not linked) group policy object, you can delete it with the following PowerShell script.

Read More

OneDrive – Replace ownership with PowerShell

If you need take ownership of an employees OneDrive, run the following PowerShell code.
Some requirements before running the script.

  • Azure Active Directory PowerShell Module: https://msdn.microsoft.com/en-us/library/azure/jj151815(v=azure.98).aspx
  • SharePoint Online Management Shell: https://www.microsoft.com/en-us/download/details.aspx?id=35588

Read More

SharePoint – Disable throttling on a list

If you ever need to disable SharePoint throttling on a specific list instead of the whole web-application.

Read More

SCCM – Image Capture – Error 0x00004005

I had to capture a Windows 7 image in SCCM. When I tried to capture the image, i was getting the following error.

Task Sequence: Image Capture Wizard has failed with the error code (0x00004005)

The solution was pretty easy. It turned out that it was the product key that couldn’t be activated.

Read More

SCCM – Task Sequence – Error: 0x80070490

Recently I have been doing a lot of SCCM work and deploying tests.
Some of the clients I tried to run a task sequence to, gave me the following error 0x80070490.

Read More