Get Windows 7, 8 of Windows 10 (bootcamp) to Recognize a Thunderbolt-to-Ethernet Adapter

Note: This is a bit off-topic from my usual SharePoint ramblings, but I just needed to archive this information and most likely I’m not the only one with this issue.
I use a Mac, but have Windows 10 installed via bootcamp. That is not always without issues and don’t even get me started with battery life. Somehow I suspecting Apple to have written a faulty driver on purpose, so Windows will burn through the battery faster than OS X will. Another issue with using windows on a Mac via Bootcamp, is the Ethernet adapter is not installer as part of the Bootcamp drivers install. At least not, when you are using Windows 10. A little research revealed that there is a simple solution to this issue.

The problem:

Using a Thunderbolt-to-Ethernet adapter to connect to the Ethernet doesn’t work when you are on a Windows 10 (Windows 7 or 8 seems to have the same problem). There is no driver for the adapter installed in the Bootcamp driver-install on Windows 10.

The solution:

  1. Download “NetLink®/NetXtreme® I Desktop/Mobile/Server (x64)” from
  2. Unpack the zip file
  3. right-click on the “b57nd60a.inf” information file and select “Install”
  4. Leave the cable and adapter plugged into your mac
  5. Reboot
  6. Windows should recognize the adapter and use the driver you’ve just installed

Every time you wish to use the Thunderbolt-to-Ethernet adapter to get access to the network, you have to plug the cable and the reboot.

Update SharePoint groups in all webs in a SiteCollection using PowerShell

Say you have a ton of subwebs in a sitecollection. Each web have unique permissions and unique groups.

You would like to update alle membergroups to have Contribute permissions, instead of Edit permissions. If you need to update all ownergroups or visitorgroups, just change the script accordingly.

You do it like this:

# Get the URL of your SiteCollection
$site = Get-SPSite

#Go through each site
foreach ($web in $site.AllWebs)
 # Get the Member group of the current site
 $group = $web.Groups | Where {$_.Name -Like 'Member*'}
 echo $group.Name
 $ra = $group.ParentWeb.RoleAssignments.GetAssignmentByPrincipal($group)

 # Define the permissionlevel you wish to remove
 $rd = $group.ParentWeb.RoleDefinitions["Contribute"]

 # Define the permissionlevel you wish to add
 $rd = $group.ParentWeb.RoleDefinitions["Edit"]



Enable versioning on all SharePoint Document Libraries in a Site Collection

Enabling versioning on all document libraries in a site collection or disabling versioning is often quite useful.

Write-Host Loading the SharePoint Powershell Snapin

# Load Snapins
 if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null)
 Add-PSSnapin "Microsoft.SharePoint.PowerShell"

Write-Host "Starting to update lists and Libraries"

$webs = get-spsite | get-spweb -Limit All
foreach ($web in $webs)
Write-Host "Updating Site" $web -foregroundcolor Black -backgroundcolor Yellow
foreach ($list in $web.lists)
Write-Host "Looking at list $list"

if ($list.BaseType -eq "DocumentLibrary" -and $list.BaseTemplate -eq "DocumentLibrary")
Write-Host "Updating list $list" -foregroundcolor Black -backgroundcolor Green
$list.EnableVersioning = $true;
$list.EnableMinorVersions = $false;
$list.EnableModeration = $false;
$list.MajorVersionLimit = 0;
$list.ForceCheckout = $false;
Write-Host "Done updating lists!" -foregroundcolor Black -backgroundcolor Green


Formatting dates in Itemstyle.xsl

Insert this line at the top

That will give you a header looking like this:

  exclude-result-prefixes="x d xsl msxsl cmswrt"
  xmlns:xsl="" xmlns:msxsl="urn:schemas-microsoft-com:xslt">

Then use the “ddwrt:FormatDate” to show the date i various ways:

<xsl:value-of select="ddwrt:FormatDate(@dato, 1030, 3)"/>
<xsl:value-of select="ddwrt:FormatDateTime(string(@Publiceret), 1030, 'dd. MMM. yyyy')"/>
<xsl:value-of select="ddwrt:FormatDate(string(@Dato), 1033, 7) "/>

List of all LCID’s :
Custom date and time formats:


Pop-up modal window SP2010

Code for adding pop-up links to list items and to Library items.

Full Code For a List Item: 

<a onclick="javascript:NewItem2(event, &quot;http://SiteName/_layouts/listform.aspx?PageType=8&amp;ListId={83747BB4-49C6-4181-B4A3-F8C6B611846D}&amp;RootFolder=&quot;);  javascript:return false;" href="/_layouts/listform.aspx?PageType=8&amp;ListId={83747BB4-49C6-4181-B4A3-F8C6B611846D}&amp;RootFolder=" target="_self"> Submit Feedback</a>

Full Code for a Library Item: 

<a href="http://SiteName/_layouts/Upload.aspx?List={94AC86A8-6774-4822-A197-A98542251678}&amp; RootFolder=" onclick="javascript:NewItem2(event, &quot;http://SiteName/_layouts/Upload.aspx?List={94AC86A8-6774-4822-A197-A98542251678}&amp;RootFolder=&quot;); javascript:return false;" target="_self"> Upload a Document</a>


Create link to new folder and item actions in modal window in SharePoint 2013

Create link to “New Item”

<a href=”javascript:OpenPopUpPageWithTitle(‘</site/library>/_layouts/15/Upload.aspx?List={<List-GUID>}&RootFolder=&IsDlg=1′,RefreshOnDialogClose,null,null,'<Title>’);”>Add item</a>

Create link to “New Folder”

<a href=”javascript:OpenPopUpPageWithTitle(‘</site/library>/Forms/Upload.aspx?RootFolder=&Type=1&IsDlg=1′,RefreshOnDialogClose,null,null,'<Title>’);” >New Folder</a>