Tag Archives: powershell

Finding out what service created a SharePoint site

SharePoint is the underpinning data storage for many Microsoft 365 services. Sites are are therefore created under the hood by many services. Sometimes it it useful to know from where a site was created. We can actually find this in … Continue reading

Posted in Development | Tagged , , , , | Leave a comment

Read & Write MS Office custom properties with PowerShell

While working on automating Microsoft Word I needed to read and write custom properties in documents. I found several resources out there. Reading worked fine, but when writing custom properties they all crashed. I finally managed to fix it though, … Continue reading

Posted in Development, Tutorials | Tagged , , , , , , | 2 Comments

If Word randomly crashes when opening SharePoint documents

I’ve been working on a PowerShell script that automates Microsoft Word to open all files in a SharePoint library, modify the header and other properties and then save it again. I ran the script against 4000 documents and everything went … Continue reading

Posted in Development, Tips | Tagged , , , , , , , , | Leave a comment

Hacking DocX files to fix Quick Parts in Word Online

Microsoft Word documents can have Quick Parts connected to SharePoint fields, so that the value of the field is displayed inside the document. But Word Online (still) does not fully support this. It will display Quick Parts with a a … Continue reading

Posted in Development, Tips | Tagged , , , , , , | Leave a comment

Migrating data from Access to SQL Server

Suppose that you have a simple Microsoft Access database that you need to migrate to another database such as MS SQL Server. You model the tables and relationships in the new database, and now you need to export the actual … Continue reading

Posted in Development, Tutorials | Tagged , , , , , , | 1 Comment

How to backup and restore tables in Azure storage

There is currently no built in solution for backing up tables in Azure Storage, but we can easily do it with the help of a tool called AzCopy which is provided by Microsoft. Below is a PowerShell script I built … Continue reading

Posted in Development, Tutorials | Tagged , , , , , | 1 Comment

Solution to Azure AD App not able to use given permissions

A client I’m working with had trouble adding permissions to their Azure Active Directory Application (AAD App). We added application permissions to allow the app to read all users’ full profiles, read directory data and read O365 unified groups, but … Continue reading

Posted in Development | Tagged , , , | Leave a comment

Downloading OneDrive documents as PDF

As part of automating a build process I needed a way to download the product documentation from OneDrive and save as PDF files for shipping with product. The result is this PowerShell script with two cmdlets, one that takes an … Continue reading

Posted in Development, Tutorials | Tagged , , , , , | Leave a comment

A drag-and-drop GUI made with PowerShell

The script below shows how to create a simple WinForms GUI in PowerShell, where you can drag and drop files and folders and then process these with PowerShell commands when you click the button. I’ve pieced this together using various … Continue reading

Posted in Development, Tutorials | Tagged , , , | 2 Comments

Converting a CSV file to RegX with PowerShell

If you need to convert a CSV file with terms to a RegX file for use in your .Net project, you can use this simple PowerShell script:

The script assumes your CSV file contains two columns, “Name” and “Value”, … Continue reading

Posted in Development, Tips | Tagged , , , | Leave a comment