CHunky Universe of Vigourous Astonishing SHarepoint :)

Tag Archives: tips

Out-Gridview in PowerShell

Did you know that we can pipe the output from PowerShell into a graphical GridView? I have used PowerShell for one year and only now I discovered this nice feature. You can add filter criteria, you can filter by typing in a textbox:

Other useful output cmdlets
  • out-file
  • out-clip
  • out-null

Add Comments column to your sharepoint list

If you have used Issue tracking list template in SharePoint you must have marked that the comments are added and marked with author name and datetime. It is handy to have these micro “discussion boards” on items. The comment-formed communication can help to fine-tune task definitions. By the way, have you seen Trello?

So the question is how we can create this column in other lists? Here is a little tutorial how to create “append-only comments”, as they are called:

Go to your list and enable versioning

Add “Append-only comments” column from existing site columns

(In Swedish this Site Column is called: “Lägg endast till kommentarer”)

Go ahead and write comments


Add append-only comments in XML


Powershell scripts for AD

A tip for all who want to administer AD with powershell: Idera Powershell scripts. Just sign up and get the free scripts for AD, SQL, Exchange and Sharepoint.

I personally prefer to user modules, so I change the file extension from ps1 to psm1 and then I can use import functions as modules. Here is a simple example for creating for domain users:

import-module .\New-IADUser1.psm1
function Add-User($name) {
    New-IADUser -Name $name 
         -sAMAccountname $name 
         -ParentContainer 'CN=Users, DC=contoso, DC=com' 
         -Password 'SvenskaAkademien1786' 
         -EnableAccount -PasswordNeverExpires
Add-User "user01"
Add-User "user02"
Add-User "user03"
Add-User "user04"
update 2012-03-15: nice script from Ryan

Ryan Dennis has created a very handy script for creating random users.

In PowerShell v3.0 there is a cmdlet for creating users: New-ADUser. So the function above can be rewritten like that:

Import-Module ActiveDirectory -ErrorAction SilentlyContinue
function Add-User($name) {
    $password = ConvertTo-SecureString 'SvenskaAkademien1786' -AsPlainText -Force
    New-ADUser -Name $name 
         -sAMAccountname $name 
         -Path 'CN=Users, DC=contoso, DC=com' 
         -AccountPassword $password
         -Enabled $true
         -PasswordNeverExpires $true
Add-User "user01"
Add-User "user02"
Add-User "user03"
Add-User "user04"

Check if an html element is hidden using jQuery

Well, sometimes we need to calculate width and so on. In my next post I will write about how to fix auto-resize on fixed sized master pages. But now: a very nice stuff: how to check if an element is hidden or not:


It is a pure poetry. It reminds me of the beauty of symbols in Ruby.

Good pattern for javascript files

SP.js exists in two variants in debug mode and in modified. When you develop it is better to use debug mode. When it goes to production it is better to use minified files. The same you can do with your files. Wictor Wilen explains how to do minify your custom javascript files. I think it is a good pattern to create javascript files and call them something-something.debug.js. Then when you are done, run the custom tools to minify them.

Todolist in VS

A really nice feature is a task list. Just write //TODO something something in your code and it appears in the task list which can be shown through View – Task List in Visual Studio.

Increase performance while retrieving data with LINQ to SP

If you are just intrested in getting data, not writing to the source like SubmitChange, you can disable ObjectTracking and increase the performance.

context.ObjectTrackingEnabled = false;

I found this tip on page 248 in the book “Sharepoint 2010 as a development platform

Windows 8 preview

windows 8I have tested the Windows 8 developer preview. VMWare player 3 didn’t manage it, so I installed VirtualBox and it ran very well. One thing I did was to enable full screen on VirtualBox.

Here is the list of features you get if you install the developer preview:

  • Windows SDK for Metro style apps
  • Microsoft Visual Studio 11 Express for Windows Developer Preview
  • Microsoft Expression Blend 5 Developer Preview
  • 28 Metro style apps including the BUILD Conference app – the best time tracking

time trackingI discovered a great tool for time tracking: 1DayLater. So far I am very pleased. You can add activities, write hash tagged descriptions, get an overview over you consultant hours and much more

powershell.exe -Command

man kan skapa en .bat-fil med olika powershell-anrop:

powershell.exe -Command "& {.\Script1.ps1}"
Вула Чăвашла

VulaCV - Чăвашла вулаттаракан сайт

Discovering SharePoint

And going crazy doing it

Bram de Jager - Coder, Speaker, Author

Office 365, SharePoint and Azure

SharePoint Dragons

Nikander & Margriet on SharePoint

Paul J. Swider - RealActivity

RealActivity is a specialized Microsoft healthcare services and solution advisory firm.

Cameron Dwyer

Office 365, SharePoint, Azure, OnePlace Solutions & Life's Other Little Wonders


Me and My doings!

Share SharePoint Points !

By Mohit Vashishtha

Jimmy Janlén "Den Scrummande Konsulten"

Erfarenheter, synpunkter och raljerande om Scrum från Jimmy Janlén

Aryan Nava

DevOps, Cloud and Blockchain Consultant


SharePoint for everyone


Ryan Dennis is a SharePoint Solution Architect with a passion for SharePoint and PowerShell

SharePoint 2020

The Vision for a Future of Clarity

Aharoni in Unicode

Treacle tarts for great justice

... And All That JS

JavaScript, Web Apps and SharePoint


Mostly what I know about SharePoint - CommunicoCuspis