Powershell Error connecting to SharePoint Online using CSOM Assemblies

April 27, 2018

When using a Powershell Script to connect to SharePoint Online I got this error…

msoidcliL.dll : System.IO.FileNotFoundException – SharePointOnlineCredentials

image

Solution :

Update your SP client side Assemblies, which does not rely anymore on Msoidclil.dll

image

image

Once updated the error was gone Smile

Enjoy !

Advertisements

SharePoint – Growing USAGE files

April 9, 2018

Your SharePoint Server might run out of disk space, because of growing .USAGE files.

These files capture the visitor analytics of your SharePoint farm.

Every X minutes it will create a new .USAGE file in the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS folder

image

Which can take up several GB’s after a month…

SOLUTION :

1. Delete these files

Stop the SharePoint Timer Service

image

Delete all the .USAGE files

2. Reduce the number of retention days

Second option is to set the DaysRetained to a lower value

image

image

CLS

if((Get-PSSnapin | Where {$_.Name -eq "Microsoft.SharePoint.PowerShell"}) -eq $null)
{
    Add-PSSnapin Microsoft.SharePoint.PowerShell;
}

Set-SPUsageDefinition -Identity "Page Requests" -DaysRetained 5

Get-SPUsageDefinition -Identity "Page Requests"

image

If this does not work, you should schedule a Timer Job see solution 1. To restart the SharePoint Timer Service after x number of days

Enjoy !


SSRS – SharePoint Lists Default VIEW

March 22, 2018

Once you connect to a SharePoint List you will always get connected to the list using the DEFAULT VIEW.

Which might not be what you want because it can be a FILTERED View. And therefore not showing you all the records you want.

SOLUTION :

1. Go to DataSet –> Query

image

2. Apply a Filter

image

Strangely enough if you DO NOT Apply a filter in the Query Designer. It will fetch the data using the DEFAULT VIEW set in SharePoint ???

So basically in order to get ALL the DATA, you need to SET a FILTER that covers the whole range in your data set.

Very contradictory approach Confused smile

Enjoy !


SSRS – SharePoint Lists HTML Tags

March 22, 2018

If you are working a lot using SSRS against SharePoint Lists.

You will see that some lists that contain Text are not displayed properly… Sad smile

See Example :

image

The first column shows the raw output with all the HTML Tags.

While the second column shows you the proper output you need for the report.

SOLUTION :

1. You first need to add a PLACEHOLDER in the column

image

Two times a LEFT click in the field and next a RIGHT click.

2. Secondly put in the field that has the HTML text, and choose HTML as MARKUP TYPE

image

 

Enjoy !


SharePoint – Online ActiveX in Chrome Browser

January 8, 2018

Since I migrated my Hard and Software Inventory Scripts to SharePoint Online.

https://audministrator.wordpress.com/2018/01/08/sharepoint-online-computer-inventory/

I felt the need to check if I could run it in the Chrome Browser as well … ?

Solution :

Step 1. Is to configure Chrome to accept ActiveX Scripts

Open Chrome and go to Settings –> Advanced Options –> Proxy Settings

image

Go to the Security Tab –> Add you SharePoint Online site to the TRUSTED Sites

Next go to Custom Level –> Change the following ActiveX settings

image

Safe and restart Chrome

Step 2. Is to download IETab Extension for Chrome

image

Once installed is will ask you to run a local exe called ietabhelper.exe

And it will show you the Extension Icon here :

image

Step3. Run it and test the Result

Go to the Hardware Inventory Tool in SharePoint Online and click Get Info

image

As you can see it retrieved all the details, to be saved in the SharePoint Online Cloud using the Chrome Browser

How cool is that Smile Smile


SharePoint – Online Computer Inventory

January 8, 2018

Nearly 5 years ago I converted the Outlook forms to an on premise SharePoint 2010 Foundation version

https://audministrator.wordpress.com/2013/05/14/sharepoint-computer-hw-sw-inventory/

But now it’s time to migrate to Office365 – SharePoint Online !

Basically all of the scripting done in SP 2010 can be reused in the Online version.

Solution :

Step 1. I created a new Custom List in SP Online

With the exact same fields and field names as in SP 2010.

Step 2. I created the new SP Online Custom Forms

These where created from scratch again

Step 3. I migrated the JavaScript / JQuery Scripts

I adjusted the scripts where needed (very little efforts neededs)

Step 4. Tested the results

New Form :

image

When pressing Get Info, it will check if it can find the PC or Server in your network.

If the field is blank it will present an error message and the button will go RED.

In the other occasion the button will show GREEN.

image

Extra logic in the script will check disk Capacity and show RED if below 10 % free space.

Edit Form :

image

Using the EDIT form you can just refresh the data at all times, even if you make a remote VPN to your network.

GREEN means all data has been updated.

Display Form :

image

Once all Hardware is loaded you can have the bonus effect to have this info available using the SharePoint Mobile App.

So all the data is at your fingertips wherever you are.

Migrating and reusing this logic from MS Exchange Forms to SharePoint Online over more then 15 years, is very rewarding.

Isn’t that cool Smile


SharePoint–Online Publish a Power BI report (Personal Ed.)

January 5, 2018

Ever wanted to publish a Power BI report to SharePoint Online ?

Which is not out of the box functionality (It is for the PRO version of Power BI)

 

Solution :

Step 1. Get the link of the report

In your Power BI environment go to the report to publish –> File –> Publish to Web

image

Next copy the link code ….

image

Step 2. Create a Web Part Page

 

Add a Page Viewer Web Part

image

And add the Report link from Step 1.

 

Step 3. Save the page and see the result

 

image

 

Of course this does not give you all the full features of the Power BI Pro version.

But can be good enough to do some prototyping or publishing BI information.

image

Bonus is the fact that it will update automatically based on the Power BI Schedule frequency Smile

 

PS : Keep in Mind that your Tenant Admin needs to give you permission to Publish to the Web

 

image

 

Enjoy!