PowerShell – Automated Remote Desktop Services (RDS) web feed.

Recently I wanted to make it easy for users to add a Remote Desktop Service web feed through group policies. I created a script that needs to be run in the user context.

You need to specify a URL in the script as a variable.

Read More

PowerShell – Find nested Active Directory members of a group

Lately I found out that the following doesn’t always work, I had problem with returning all users in a group.

So I have created a small PowerShell function that basically does the same thing. Use it free of charge!

 

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 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