[EN] How To Do IT? Open cmd/PoSh windows on right position.

In this series I occasionally (yes, too occasionally) writing about small useful advices, which are answers for my colleagues, students and sometimes customers. It does no matter if you as administrator like work with command line or PowerShell tools or not. Sometimes it’s absolutely necessary to work with one or both of those tools. When I create new machine for my new experimental stuff just few days ago, one of necessary personalization things which I always do, is changing standard colours (especially for command line) for my favourite.

First part of this post will be about classic command line. So by default cmd window looks that:


It’s annoying for me, especially with appearence (i meant colours and font). Everything what I need for change how cmd look is under: right click cmd icon > properties > colours (for colors) and/or fonts (for size and type of fonts):


With chancging colurs we can change background and text colours ans same for pop-ups. For fonts we can change default settings for Consolas or Lucida Console and of course size. After changes my cmd look like I want:


The only problem is with posision and windows size especially if I expect more information (like after ipconfig /all command). So one more plece for configuration is right click cmd icon > properties > layout where I can change size and position for my cmd window:


After some experiments which position and size is ideal for me, and after unchecking let system position window I have my final result:



First part of this post will be about PowerShell. So by default PowerShell windows looks that:


More and more annoying than cmd, especially that upper bar for PowerShell window is hidden under Windows Taskbar (yes I use Windows Task Bar on upper screen position and it’s not standard choice). Because colours of PowerShell are like they should be, I just made small change with the fonts and PowerShell window size and position. Final result look like I want:


And finally when I use both tools together (or just both windows are open) I can easly switch (by mice instead of Alt+TAB) between windows.


[EN] How To Do It? Enable Versioning on Site Collections

In this series I occasionally (yes, too occasionally) writing about small useful advices, which are answers for my colleagues, students and sometimes customers. I know that many of this kind advices are well known for many of technical blog readers, but from my perspective it’s very helpful for me. Why? Sometimes I need solution on demand and sometimes I don’t remember how something simple do. But I remember: “Wait, bastard! You wrote about it on blog!” Now I’m writing about Site Collection Versioning in SharePoint 2013.

One of my client asked me about enabling versioning for brand new SharePoint 2013 farm with few separate site collections, and sites, lists, libraries inside. First point for solve this request is going to Central Administration… where I spend half an hour to find simple answer: how to enable versioning on ALL site collections. And the answer is simple – this feature is not working on Farm Level, just on Site Collection level. That means: If I have four, five, ten Site Collections – I need to enable versioning on all site collection manually separately. Does not make sense and it’s really boring.

But… I have Power! I can use PowerShell with one simple script for enabling versioning on all my site collections and libraries and list if I need. The original post has been written by Keith Tuomi (Canadian SharePoint MVP) here, but is worth to be partially quoted and re-discover.


Pict.1 Whole script for enabling versioning on all site collections.

If I need I can enabling versioning with Major and Minor levels fon all Document Libraries on my SharePoint Farm (in this example 5 major and 10 Minor versions). Script have two parameters:
1. Required: Site collection URL e.g. http://intranet.company.com (specifies the site collection to operate on)
Example 1 – run the script in report mode only (no changes effected):
   c:sharepointadminaccount.Enable-Versioning.ps1 http://intranet.company.com

2. Optional: execute Script runs in report mode only unless you add the word execute
Example 2 – run the script in execute mode:
    c:sharepointadminaccount.Enable-Versioning.ps1 http://intranet.company.com execute

Easy? Yes! And it works. As additional advice – it’s possible to add this script for Windows Task manager for run on regular basis to be shure that all new site collection, site, library, list are versioning. Script you can downolad from resources page.

[EN] How to DO IT? My Maintenance SUB-Plans doesn’t work.

Last night I discovered on one of my customers systems, that Maintenance Plan doesn’t work. After few hours I received request form customer with printscreen:


Pict. 01 | Error with execution of Maintenance Plans.

When we look into message error we get more details:


Pict. 02 | Weekly Batch contains multiple plans…

But what is wrong with that? Customer’s idea was: to executing one batch (in this case weekly) with four subplans such: DBCC CHECKDB, REORGANIZE INDEXES, UPDATE STATISTICS and BACKUP (type FULL) for All Systems Databases. All together looks like this:


Pict. 03 | One batch, four subplans and errors

The administrator creates exactly the same weekly batch for Users Databases, but it’s one small and important difference:


Pict. 04 | Executing “exactly” the same batch for All User Databases.


The difference is very clear: they are four plans in first example and one in second. Let’s comparing differences:


Pict. 05 | I’ve got You! Right side: System Databases and Leftt side: User Databases.

As we see our maintenance plans are different, and they cannot work the same. Now we have two options: we can change first batch in SSIS or creat the new one (simple and fast option). But be sure that we will not repeat the design error:


Pict. 06 | We must remember about second option: Single schedule for ENTIRE PLAN or no schedule

At the end we have two Maintenance Plans, designed and scheduler very similar (only schedule od execution and types od databases are different):


Pict. 07 | Comparing the batches.

Think twice (what you need), design (how it shoud work), think one more (how it looks) time and execute (to check).