Archive for March, 2015

While working at a client on a Windows Server 2012R2 environment to create some PowerShell scripts, I had to change the Execution Policy, however running the “Set-ExecutionPolicy Unrestricted” command gave me the following error.

the setting is overridden by a policy defined at a more specific scope

Set-ExecutionPolicy : Windows PowerShell updated your execution policy successfully, but the setting is overridden by a policy defined at a more specific scope. Due to the override, your shell will retain its current effective execution policy of RemoteSigned. Type “Get-ExecutionPolicy -List” to view your execution policy settings. For more information please see “Get-Help Set-ExecutionPolicy”.

 

The error can be quite confusing, what I did see first see what are the possible “more specific scopes” I can give to my command. By running the following command:

Get-ExecutionPolicy –List

I was able to see my available scopes.

So now that I have them all, usually to run PowerShell scripts you need to work with the MachinePolicy. So, the command in order to change the MachinePolicy ExecutionPolicy is

Set-ExecutionPolicy -Scope MachinePolicy Unrestricted

However, you might have an error saying it can only be done via Group Policy.

“Set-ExecutionPolicy : Cannot set execution policy. Execution policies at the MachinePolicy or UserPolicy scopes mustbe set through Group Policy.

If you get that error, read the resolution in my blog post: Change the PowerShell MachinePolicy Execution Policy in Windows Server 2012R2.

 

Leave a comment and don’t forget to like the Absolute SharePoint Blog Page  on Facebook and to follow me on Twitter here  for the latest news and technical articles on SharePoint.  Also, don’t forget to check out SharePoint Community.Net for more great SharePoint Content.

No ratings yet.

Please rate this

At a client recently, I was tasked to create an inventory of all the Active Directory Groups that give access to a SharePoint site! I built it mostly from scratch, so here it is as well as some explanations to help you use it:

The Script:

function WriteLogs ($message) {
    $message | Out-File $logfile -append
}

$logfile = "C:\ADGroupInventory\grouplist.txt"
Write-Host "Starting Group Script inventory"
$was = Get-SPWebApplication

foreach ($wa in $was)
 {        
  $webappUrl = $wa.url
  Write-Host "Starting to look in $webappUrl"
  $spWebApp = Get-SPWebApplication $wa.url        
  foreach($site in $spWebApp.Sites)
  {
    $siteurl = $site.url
    Write-Host "Going into SiteCollection $siteurl"
    $group = $site.RootWeb.SiteUsers
    foreach ($grp in $group)
    {
     # Ensure the item is a domain group
     if($grp.IsDomainGroup -eq "True")
     {
      $groupname = $grp.name
      WriteLogs "$groupname"
     }
    }
  }    
 }

 

How to use it.

First of all, change the $logfile variable to a folder that exists to make sure the logs work. Second, in the Central Administration, give yourself "Full Control" in the Web Application User Policy. This will make sure that you won't have any access denied when you go through each and every site collection in your farm. Afterwards, open SharePoint Management Shell as an Administrator, and run the script. Depending of the size of you farm, it shouldn't take too long, and you should see progress of every site being scanned on the screen. At the end, you will have a text file looking like this:

Get all the Active Directory groups in your SharePoint Farm

You will notice in the screenshot that some group names are repeated, as well as some of them are in capital and some of them are lowercase. So, I used NotePad++ to get all the unique group names! First of all, go in Edit > Convert Case to > Upercase!

To get unique lines, you will need the TextFX plugin. This used to be included in older versions of Notepad++, but if you have a newer version, you can add it from the menu by going to Plugins -> Plugin Manager -> Show Plugin Manager -> Available tab -> TextFX -> Install. In some cases it may also be called TextFX Characters, but this is the same thing.

After the plugin is installed, go in TestFX Tools and check the "sort ascending" and "sort outputs only UNIQUE" lines. Afterwards, click the "Sort lines case insensitive at column". (make sure that you do Ctrl+a in the file to select all the lines before clicking).

 

Now, your Notepad++ will only show the unique group names in your SharePoint Farm!

 

 

Drop a comment if this helped!

Leave a comment and don't forget to like the Absolute SharePoint Blog Page  on Facebook and to follow me on Twitter here  for the latest news and technical articles on SharePoint.  Also, don't forget to check out SharePoint Community.Net for more great SharePoint Content.

4/5 (1)

Please rate this

Easily Compare Office 365 Plans

Categories: SharePoint 2013
Comments: 4

Last week I attended and spoke at an amazing new conference in Toronto called CollabCon. The organizing was great, speakers were amazing and attendees were really fun and engaging & I highly recommend that if you’re from Canada, you should attend the 2016 event. However, this is not what this blog post is aboutJ. While at the conference, Microsoft had a booth and they gave away a small pamphlet in which you could easily compare Office 365 plans. I found the pamphlet a lot easier to read and view the differences between plans than the web version which you can find here.

Here is what the pamphlet contains:

What is Office 365?

Compare Office 365 Plans

Office 365 for Small & Midsize Business

Compare Office 365 Plans

Enterprises & Non Profits

Compare Office 365 Plans

Government and Education

Compare Office 365 Plans

What do you think about this pamphlet? Do you find it more useful than the web version? Do you have a site where it’s easier to compare? Let me know in the comments!

To visit CollabCon click the logo below

To visit the web version of the O365 Plan Compare click the logo below

No ratings yet.

Please rate this

I was at a client recently and was trying to add a new SharePoint Server to the farm, and everything went well until I tried to run the SharePoint Products Configuration Wizard. The error was:

Task configdb has failed with an unknown exception Exception: Microsoft.SharePoint.Upgrade.SPUpgradeException: Failed to call GetTypes on assembly Microsoft.AnalysisServices.SPAddin, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91. Could not load file or assembly ‘Microsoft.AnalysisServices.SPClient, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91’ or one of its dependencies. The system cannot find the file specified.

 123014_0212_Configurati1

The problem is that the rest of the farm had the PowerPivot enabled, and therefore the PowerPivot Addin is required. Unfortunately, This Add-in is not verified at the begging of the SharePoint Products Configuration Wizard standard check, so that is why you get to this error. A recommended best practice is to install spPowerPivot.msi on all servers in the SharePoint farm for configuration consistency, including application servers and web-front end servers. The installer package includes the Analysis Services data providers as well as the PowerPivot for SharePoint 2013 configuration tool. To fix the problem, simply download the installer file from Microsoft Download Center: Microsoft® SQL Server® 2014 PowerPivot for Microsoft SharePoint®, run it on your server and then re-run the SharePoint Products Configuration Wizard. Everything should work perfectly!

Drop a comment if this helped!

Leave a comment and don’t forget to like the Absolute SharePoint Blog Page  on Facebook and to follow me on Twitter here  for the latest news and technical articles on SharePoint.  Also, don’t forget to check out SharePoint Community.Net for more great SharePoint Content.

No ratings yet.

Please rate this

While (trying) to install SharePoint Server Reporting Services at one of my clients, I got into some pretty nice errors (SSRS Errors, Gotta catch ’em all!). This one was the one that made me crazy for a few weeks because I never found out why I was having it, however I found out a way to fix it that worked, so I will share it with you in order to not lose hair over it like me. The error is basically getting a The remote server returned an error: (500) Internal Server Error whenever you click on either “System Settings” or “Manage Jobs”

The error:

The remote server returned an error: (500) Internal Server Error

This doesn’t tell us much, however when we go into Event Viewer we find two event IDs that are related to this and they both have similar messages.

Event ID 1310.

Event ID 6398

The thing we find in common in both those errors is “Could not find permission set named ‘ASP.Net'”. After countless hours spent on google, bing and even yahoo and after even some of the best SharePoint people I know couldn’t find the issue, I discovered a way to make it work. Is this the best way? Probably not. I hope that it will help people that were in the same situation at me and want to get SSRS Working. Here are the steps.

What you probably already done to get to the error:

  • Install Reporting Servers + Addin
  • Run the PowerShell commands (Install-SPRSService & Install-SPRSServiceProxy & get-spserviceinstance -all |where {$_.TypeName -like “SQL Server Reporting*”} | Start-SPServiceInstance)
  • Create the SSRS Service Application.

What I did to fix it:

  • Delete the SSRS Service Application as well as Databases.
  • Run the following PowerShell command: “get-spserviceinstance -all |where {$_.TypeName -like “SQL Server Reporting*”} | Stop-SPServiceInstance”
  • Run the following PowerShell command: “Install-SPRSService –Uninstall’
  • Run the following PowerShell command: “Install-SPRSServiceProxy –Uninstall’
  • Go to Control Panel, Select SQL Server and then click REPAIR. Do a full repair of the SSRS + Addin feature (you shouldn’t have anything else installed on the server anyway, so just select all)
  • Run the PowerShell commands (Install-SPRSService & Install-SPRSServiceProxy & get-spserviceinstance -all |where {$_.TypeName -like “SQL Server Reporting*”} | Start-SPServiceInstance)
  • Create the SSRS Service Application.

Now everything should work! Drop a comment if this helped!

Leave a comment and don’t forget to like the Absolute SharePoint Blog Page  on Facebook and to follow me on Twitter here  for the latest news and technical articles on SharePoint.  Also, don’t forget to check out SharePoint Community.Net for more great SharePoint Content.

No ratings yet.

Please rate this