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:

 

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 AD FS 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 web application and Cross-Origin Resource Sharing (CORS) that is a security measure.

But luckily Microsoft have acknowledged this and have 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

Exchange – Event ID 106 – Performance Counter Updating Error

Here’s just a quick post on removing the Event ID error 106 from your application logs on Exchange Servers.

You will properly at some point see the following in your event log:

This is caused because the performance counters cannot be loaded properly.

To correct this, do the following.

Read More

Disabled/Disconnected mailboxes with PowerShell

Have you ever wanted to get all disconnected mailboxes from Exchange?

Here is a “short” PowerShell syntax, for exactly that:

It checks only the mailbox servers in your Exchange farm, and finds the disconnected/disabled mailboxes.