Mirror your iPhone on Windows via USB

In a couple of days I’ll be presenting at the Microsoft TechDays 2016 in the Netherlands. While preparing my sessions on PowerApps, I wanted to mirrow/project my iPhone to my Windows PC for demo purpose. Since the wireless networks at conferences can be flaky I did not want to use that connect. To ensure my demo would work I wanted a solid connection by using the USB cable.

LonelyScreenMirrorIphone

LonelyScreen open source to the rescue

I managed to hook up my iPhone (or iPad) to my Windows PC via USB by using the open source tool LonelyScreen. The most common scenario for mirroring your iPhone is via AirPlay over wireless. Which works fine for LonelyScreen, but does not fit my need!

How mirror your iPhone over USB?

There are a couple of additional steps you need to mirror over USB. You need to setup a network connecting between your iPhone and Windows. This can be done by enabling the Personal Hotspot. This will create a network connection allowing to interact with LonelyScreen.

  1. Plug in the USB cable into your iPhone and Windows PC
  2. Open Settings
    LonelyScreenMirrorIphone-1
  3. Tap on Personal Hotspot
    LonelyScreenMirrorIphone-2
  4. Enable Personal Hotspot
    LonelyScreenMirrorIphone-3
  5. Start LonelyScreen on your Windows PC
    LonelyScreenMirrorIphoneStartScreen
  6. Mirror your iPhone via AirPlay to your PC
    LonelyScreenMirrorIphone-4
  7. Now your iPhone should be shown on LonelyScreen
    LonelyScreenMirrorIphone

SharePoint Client Browser v1.2, get it while it’s hot!

The release is out since January 13th, but didn’t got the time to write about it. I have released a new version of the SharePoint Client Browser 2013 (#SPCB). It supports new nodes like associated Visitor, Member and Owner groups of a web object and showing the User Custom Actions for site, web and list object.

But the biggest investment is around User Profiles! Check out this post below.

Enjoy this new version of the SharePoint Client Browser and show your gratitude by adding a review on this page. Download can be found here.

SharePoint Client Browser - Main Screen - v1.2

User Profiles support improved!

The biggest update is within the User Profile area. Version 1.1 was limited to only showing the current user’s properties and peers.

SharePoint Client Browser v1.1 support for User Profiles

The new version shows not only the current user, but retrieves other users via the Search CSOM and retrieves their data as well.

SharePoint Client Browser v1.2 extended support for User Profiles

As shown above not only the User Profile properties and Peers are loaded, but lots of new properties is loaded as well allowing to create rich applications who use the User Profile data. Support is based on the Microsoft.SharePoint.Client.UserProfiles namespace and contains per user profile the following information:

  • User Profile properties
  • Peers
  • Direct Reports
  • Extended Managers
  • Extended Reports
  • Followed Tags (only current user)
  • Followers
  • Suggestions (only current user)
  • People Followed by User

Download SharePoint Client Browser

 Download the SharePoint 2013 Client Browser v1.2 here!

Enjoy this new version of the SharePoint Client Browser and show your gratitude by adding a review on this page.

SharePoint 2013 Client Browser: Now support for Taxonomy and User Profiles

It’s been around 2 months since the last release of the SharePoint 2o13 Client Browser but work has progressed! Today I updated the tool with two new features.

  • Taxonomy support by showing the hierarchy of Term Store, Groups, Term Sets and Terms.
  • Limited support for User Profiles by showing the User Profile of the current user with the related properties and peers.

Download the SharePoint 2013 Client Browser here!

Taxonomy

By using the Microsoft.SharePoint.Client.Taxonomy namespace it’s possible to get the complete hierarchy of the Term Store and even manipulate it.

SharePoint 2013 Client Browser showing the Taxonomy

User Profiles

Next to the Taxonomy SharePoint 2013 client object model is extended with the Microsoft.SharePoint.Client.UserProfiles namespace for interaction with the User Profiles. For now I only included the current user profile. Future releases will be extended with other properties and showing more user profiles of other users within the environment.

SharePoint 2013 Client Browser showing the User Profile of the current user

SharePoint Client Browser 1.0 released, bye bye preview!

Finally after 2 months I decided to build the 1.0 version of SharePoint Client Browser and released it to the community! Although the preview (beta) status did not prevent people from downloading it. The counter is currently set at 555 downloads since start of the project on the 2nd of July (only 2 months ago).

CodePlex project and download at https://spcb.codeplex.com/.

So what got changed? I guess almost everything changed from authentication support for default (username and password), SharePoint Online, anonymous and forms based all the way to almost complete coverage of the Client Side Object Model (CSOM). That’s a bit over the top, but the basics for Foundation are in the tool. New capabilities for future releases will focus on Server components like taxonomy.

Remote PowerShell for SharePoint Online and on-premise

A hidden gem is the PowerShell support. It’s very easy to start a PowerShell session and use CSOM within PowerShell. Meaning remote PowerShell for SharePoint Online (and on-premise of course).

How to?
  • Open SharePoint Client Browser
  • Add a new site collection
  • Select the site collection in the tree view
  • Click the PowerShell-button in the menu bar (or use the context menu)
  • Enter your password (if needed)
  • Start using CSOM in PowerShell

PowerShell support for CSOM PowerShell console with CSOM and SharePoint Online (Office 365)

Some highlights of the tool

Why do you want to use this tool? One reason should be enough, it allows you to speed up your development by providing insights into the CSOM. And much more…

  • Get insight in your site collection structure
  • Find hidden lists, items or documents
  • Discover artifact properties
  • Easily start PowerShell, via context menu, and run (scripted) queries against your remote site collection
  • Support for both SharePoint 2010 and SharePoint 2013
  • Connect to on-premise or SharePoint Online (Office 365) site collections
  • No installer
  • Remote access from your desktop to site collection via Client Side Object Model (CSOM)
    • Can run remote, no need to run on the SharePoint server itself

SharePoint Client Browser for SharePoint 2013

Using CSOM and PowerShell to query SharePoint Online or on-premise

Recently I released the SharePoint Client Browser (preview) that provides inside in a remote SharePoint site by using the Client Side Object Model (CSOM). The tool only reads data and shows it in a rich interface. When you want to make changes you have options: 1) build a custom tool and use the CSOM to interact with SharePoint or 2) use PowerShell and CSOM to interact with SharePoint.

This post shows how to use PowerShell and CSOM together to interact and automate configuration changes to your SharePoint. The example script can be used for both SharePoint Online and on-premise deployments.

This PowerShell script will be a new feature in the SharePoint Client Browser. This allows the user to start PowerShell directly from the SharePoint Client Browser and eliminates the need to do the scripting discussed in this post by yourself!

Prerequisites

Besides having a SharePoint site collection somewhere, you need to create a folder on your local machine. This folder needs to have the SharePoint Client Runtime assemblies. These can be downloaded here. Next to the SharePoint Client Runtime you need to place your scripts here (for example: OpenSite.ps1).

Folder (on local machine) with prerequisites

The PowerShell script

The easiest way to get started is creating a new TXT-file in the local folder and rename it to “OpenSite.ps1” (or choose a more appropriate name). Next right click with your mouse on the file and choose Edit. This will open up the Windows PowerShell ISE and you can start editing your script.

Authentication

The script is pretty easy and almost reusable for both SharePoint Online and on-premise, but it has a difference between them. Guest what it is?! The authentication is done differently. Below 3 different authentication examples.

Current user credentials

By not providing any credentials automatically the current user credentials are used.

SharePoint Online

When connecting to SharePoint Online you can use the new SharePointOnlineCredentials class. This makes it a lot easier then with SharePoint 2010.

$ctx = New-Object Microsoft.SharePoint.Client.ClientContext($siteUrl) $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($loginname, $pwd)

SharePoint (on-premise) and credentials

Setting the credentials is done via the NetworkCredential class. That looks like this:

$ctx = New-Object Microsoft.SharePoint.Client.ClientContext($siteUrl) $ctx.Credentials = New-Object System.Net.NetworkCredential($loginname, $pwd)

The full example script

Below you can find the PowerShell script to use with SharePoint Online. Make sure when using the script you choose the right authentication model (see above). After running this script you can use the CSOM the same way as you would use CSOM in your C# application.

$loc = "C:\Users\Bram\Downloads\SharePoint" # Location of DLL's $siteUrl = "https://contoso.sharepoint.com" $loginname = "bram@contoso.onmicrosoft.com" Set-Location $loc Add-Type -Path (Resolve-Path "Microsoft.SharePoint.Client.dll") Add-Type -Path (Resolve-Path "Microsoft.SharePoint.Client.Runtime.dll") Write-Host "Please enter password for $($siteUrl):" $pwd = Read-Host -AsSecureString $ctx = New-Object Microsoft.SharePoint.Client.ClientContext($siteUrl) # Remove or replace line below to change authentication method $ctx.Credentials = New-Object System.Net.NetworkCredential($loginname, $pwd) $web = $ctx.Web $ctx.Load($web) $ctx.ExecuteQuery() Write-Host " Current web title is '$($web.Title)', $($web.Url)"

SharePoint Client Browser (preview) released

Last Saturday I introduced the SharePoint 2013 Client Browser (preview) tool during my session on SharePoint Saturday Holland 2013. I’ve got some enthusiastic feedback and now it’s time to finally release the preview version!

Remote SharePoint development is getting more important. Especially with SharePoint Apps. To speed up development, find hidden lists/items/documents, discover the structure or specific artifact properties use the SharePoint Client Browser which supports both SharePoint 2010 and SharePoint 2013.
This WinForm tool does not need installation but simply unzip the download and start the EXE file. Next step, connect to your on-premise or Office 365 site collection.

More information and download: https://spcb.codeplex.com/

SharePoint 2013 Client Browser

Integrate Beyond Compare with Visual Studio Source Control

Like everyone else, I have my own preferences to configure my development environment. One of the tools I’m using is Beyond Compare. Besides the main features of the tool, I like the integration with Visual Studio and Visual Studio Team Foundation (TFS) the best and it’s really simple! But I always forget the command and arguments to use. This is why I’m writing this post.

Configure Beyond Compare as version history compare tool for Visual Studio 2010:

  1. Open Visual Studio
  2. Open Tools » Options…
  3. In the tree on the left go to Source Control » Visual Studio Team Foundation
  4. Click Configure User Tools…
  5. Click Add…
  6. Set the following fields
    1. Extention: *
    2. Operation: Compare
    3. Command: C:\Program Files (x86)\Beyond Compare 3\BComp.exe
    4. Arguments: %1 %2 /readonly /lefttitle=%6 /righttitle=%7

The arguments allow you to control the behavior of Beyond Compare. Labels to use:

  • %1: Original file
  • %2: Modified file
  • %5: Diff command-line options
  • %6: Original file label
  • %7: Modified file label