Jesper M. Christensen

SharePoint and Security

Category Archives: Uncategorized

Lookup the SharePoint 2013 app-web url


The SharePoint 2013 apps are easy to install, update and uninstall and our team has a lot of experience in developing and using apps at customers.

Sometimes, though, we need some more information about the app itself. I was troubleshooting a customer environment as an app did not work. It could install, update and uninstall but an error occurred when accessing the app. I detected that no DNS entry was made for the app (usually with the prefix app-<guid>), but I could not see from the error URL or other information what the <guid> was. In the ULS I could detect this, but wanted to check other apps – without using the ULSViewer.

Here is the method I used for looking up the app-web URL with Windows PowerShell:

(SharePoint snap-in already loaded in the Windows PowerShell)

 

Get the installed apps:

     $instances = Get-SPAppInstance -Web http://intranet.domain.com

List apps installed:

     $instances

Get a single app, here “RePoint Infoscreen”

     $instance = $instances | where {$_.Title -eq ‘RePoint Infoscreen’}

See properties of the app instance:

     $instance

With PowerShell you can also do other things to apps, and here is the command for uninstalling the app above.

To uninstall the app:

     Uninstall-SPAppInstance -Identity $instance

I hope this can help you also as I could not find the scripts easily on the internet. If you are interested in trying our apps, please visit the Microsoft Office Store

Changing the colors of your SharePoint 2013 or Office 365 My Site


This is a re-post from my blog-entry in the SharePoint-Community.net (http://sharepoint-community.net/profiles/blogs/changing-the-colors-of-your-sharepoint-2013-or-office-365-my-site). Please join us 🙂

-o-

As you may have noticed the link to change the look of the SharePoint 2013 and Office 365 My Sites has been removed. This is most certain for a reason and one of these is that choosing one of the other looks (masterpages) removes the image in the top left corner of the page.

Please be aware that this is most likely not supported by Microsoft.

I will demonstrate how you can make a new “Composed Look” that points to the correct MySite15.master masterpage and let you choose the colors. This method can also be used to restore the MySite to it’s default – if you have changed it by “Accident”… like me

Okay, let’s start.

  • Go to the Site Settings and click the “Composed Looks”

Capture1

Here you will see all the default combinations, and all of these refers to the default masterpages that is NOT made for My Sites. You can also see the other default settings for these looks. You need to add a new look that is pointing to the mysite15.master page and a spcolor-file as a minimum.

  • Click “New Item” and fill out the following:

Capture2

Now you need to create a preview file for your My Site masterpage, as the element will not show up in the design gallery.

  • Go back to “Site Settings” and choose “Masterpages”

Capture3

  • Click on the arrow next to the seatle.master and choose “Download a Copy”

Capture4

  • Rename your downloaded file to: mysite15.preview

Note: The name must be identical of the masterpage you are going to show in the gallery – in this case the masterpage filename is mysite15.master

  • Upload your renamed file to the masterpages. Please make sure the file is checked in and published as a major version, or non-admins cannot use it.
  • Go to the hidden design gallery by adding the following to your mysite root-URL: /_layouts/15/designgallery.aspx

Capture5

Choose your new composed look and change the colorscheme and background if you want. Don’t mind the “incorrect” preview here, as it was a copy of the seatle preview file.

Click “Try it out” and afterwards “Yes, keep it”.

Now you should have your My Site “back” and with the new colors.

SharePoint 2013 limits


During some reading up on the SharePoint 2013 exams I created a little remember-diagram for myself to help me memorize the limits/boundaries and recommendations of the different SharePoint elements.

SharePoint 2013 limits

SP Conference for Business users


If you are interested in my summary for the conference days on the SharePoint Conference for Business Users arranged by T. A. Cook, then please read this at the SharePoint Community net:

SP Conference for Business users – Workshop day


If you are interested in my summary for the workshop day on the SharePoint Conference for Business Users arranged by T. A. Cook, then please read this at the SharePoint Community net:

http://sharepoint-community.net/profiles/blogs/sp-conference-for-business-users-workshop-day

SP2013 problem: Office 2010 and an Office 2013 product on same client PC


This is a duplicate post from my SharePoint Community blog: http://sharepoint-community.net/profiles/blogs/sp2013-problem-office-2010-and-an-office-2013-product-on-same

– | –

I ran into an issue at a client that we are testing the migration to SharePoint 2013. Everything has been a smooth transition – thanks to the SharePoint 2010 support in SharePoint 2013!

The testing started and we discovered that some clients had no problem in opening documents, whereas other clients got strange error messages such as:

“Page cannot be displayed” – with a reference URLs starting with ms-word:ofv|u|

We narrowed the problem to the installation of SharePoint Designer 2013 on the client that also had Office 2010 installed. The installation af SharePoint Designer 2013 updated the OpenDocumentClass (OWSSUPP.DLL) in Internet Explorer – and the Office 2010 programs do not recognize these links.

The problem, which also is described in the Technet forum post http://social.technet.microsoft.com/Forums/en-US/sharepointitpropreview/thread/163114c0-ff7b-4726-a319-05d828eecbb3/, also appears if you install the Microsoft Lync 2013 client on a computer with Office 2010.

The solution seems to be (at least for the moment):

  • Uninstall the Office 2013 product (SharePoint Designer/Lync) and run a repair on Office 2010 on the client computer
  • installing a full Office 2013 program suite on the client computer

So testing is a really good idea (as always) – especially when installing new versions of products with older versions already installed.

Please respond to this post if you have any other solution 🙂

Checking SQL database db and log file sizes and growth with PowerShell – from your Windows 7/8


When you are working with products that are using SQL Server databases it is important that the performance is good. By default the SQL Server sets a very bad default-value for size and Growth, and should always be changed! What to put in really depends on the usage of each database.

When I configure Microsoft SharePoint farms I performance optimize the SQL databases and wants to check the size and Growth of the database and log files, as this is essential for good performance. I want to do this from a client computer using Windows Powershell, and put this script together from various internet articles. If this can be done more efficieltly then please write me 🙂

You need to have the SQL Server Management Tools/SDK installed on the client running this script. The free SQL Server 2012 Management Tools can be downloaded from http://www.microsoft.com/en-us/download/details.aspx?id=29062

##############################################################
 #
 # Powershell script by Jesper M. Christensen
 # Blog: http://JesperMChristensen.wordpress.com
 #
 # Check SQL Server for all databases matching a query
 #
 # Display database name, db+log file size and growth
 #
 # GetSQLDBInfo.ps1 Version 1.0
 #
 ##############################################################

CLS
Set-StrictMode -Version 2
[Void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.ConnectionInfo")
[Void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO")
[Void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SmoExtended")
$Conn = new-object Microsoft.SqlServer.Management.Common.ServerConnection
$Conn.applicationName = "PowerShell GetSQLDBInfo (using SMO)"

#Set the parameters for the environment
$Conn.ServerInstance="SQLServer\Instance"
$Conn.LoginSecure = $false                  #Set to true connect using Windows Authentication
$Conn.Login = "sa"                          #Do not apply if you use Windows Authentication
$Conn.Password = "SAPassword"               #Do not apply if you use Windows Authentication

#Connect to the SQL Server and get the databases
$srv = New-Object Microsoft.SqlServer.Management.Smo.Server $conn
$dbs = $srv.Databases

#Process all found databases
foreach ($db in $dbs)
 {

 #Process databases if the starts with the database pattern
 if ($db.name -like "SP2013_*") {
  write-host $db.Name

  #Process all database files used by the database 
  foreach ($dbfile in $db.FileGroups.files) {
   $dbfilesize=[math]::floor($dbfile.Size/1024)           #Convert to MB
   if ($dbfile.growthtype -eq "KB") {$dbfilegrowth=[math]::floor($dbfile.growth/1024)} else {$dbfilegrowth=$dbfile.growth}                    #Convert to MB if the type is KB and not Percent
    write-host $dbfile.filename, "Size:"$dbfilesize"MB", "Growth:"$dbfilegrowth, $dbfile.growthtype
   }

  #Process all log files used by the database 
  foreach ($dblogfile in $db.logfiles) {
   $dblogfilesize = [math]::floor($dblogfile.size/1024)   #Convert to MB
   if ($dblogfile.growthtype -eq "KB") {$dblogfilegrowth=[math]::floor($dblogfile.growth/1024)} else {$dblogfilegrowth=$dblogfile.growth}     #Convert to MB if the type is KB and not Percent
    write-host $dblogfile.filename, "Size:"$dblogfilesize"MB", "Growth:"$dblogfilegrowth, $dblogfile.growthtype
   }
   write-host "-"
  }
 }
 #Disconnect from the SQL Server database
 $srv.ConnectionContext.Disconnect()

A screenshot of the output that can be analyzed and should be changed:

sqldbsize

I hope this will help you get an overview of your databases.

Windows Surface cannot find many apps


I just got my first Windows Surface, and already now I am happy about it – to use as a working-device.

I had some problems finding a lot of apps that I knew existed. This included Microsoft Lync client and the MetroTwit apps. Using the Windows Store through the Internet Explorer it was possible to find and install the apps.

The reason was that the Surface “helped” me in finding applications in my own language, which is Danish, but apparently just filtered English applications even if no Danish applications where found.

Simply by going into the Microsoft Store app, swiping from the right, going into settings, preferences and disable the “Make it easier to find apps in my preferred language” did the trick.

Now I got many more apps to try out

WP7 – How I changed my country location on LiveID


I have had my Microsoft Windows Phone 7 for some time now and when I got this the Marketplace in Denmark was not launched. Because of that my Microsoft XBOX Live account (that was attached to my Microsoft LiveID) was created to the location of United Kingdom.

Microsoft went live with their Danish marketplace, but I soon figured out that it wasn’t easy to change my country on the XBOX Live account that was used on the Windows Phone 7. It was a permanent link to the wrong country. I tried to change this on the XBOX Live account management pages with no success. Afterwards I called the XBOX Live support and got the message to create a new LiveID with the location of Denmark because you cannot change this. Even google didn’t help me out…. Sigh…

Okay, but my LiveID has been around for a long time and it is attached to many services in the Microsoft MSDN, Partner and other networks – so I wasn’t going to create a new one.

Then one came to me with a suggestion:

Use an XBOX 360 to change the XBOX Live accounts between Microsoft LiveID accounts!

AND —- IT WORKS !

Just remember that if you use this account for XBOX Gaming you need to use the new Microsoft LiveID if you saved games, credits etc. on the account.

Here is how I change my LiveID to Denmark:

  1. Power off your Windows Phone 7
  2. Create a new Microsoft LiveID account but do NOT log on to XBOX Live with this yet
  3. On the XBOX 360 download your profile from the LiveID that is bound to the wrong country
  4. Under Account Management, slide to the menu that contains the “Microsoft LiveID” menu and use this to change to a new LiveID. (This will un-link the old XBOX Live account from the Microsoft LiveID)
  5. Power on your Windows Phone 7
  6. Enter the Marketplace and this should create a new XBOX Live account for your Microsoft LiveID – and you can choose your country

If by any change the “Microsoft LiveID “menu isn’t there try to change your XBOX system location to United States and set it back when you are finished.

I hope this helps anyone else that was linked to the wrong country in the first place.

WindowsSecurity.com – Considering remote access for IT professionals


I got an article published about remote access for IT professionals – in the past and now.

It contains information that you need to consider before choosing your solution.

Considering remote access for IT professionals