Total Pageviews

20 Feb 2017

Hide .js and files when using TypeScript in Visual Studio Code

TypeScript is awesome, but what if I don’t want to see extra .js and files everywhere that are polluting your file explorer in Visual Studio Code?

Here is an easy solution:

- Open user settings:


- Add "files.exclude" property to the user settings or to the workspace settings:
    "**/*.js*": {"when": "$(basename).ts"},
    "**/*": true    




AngularJs + TypeScript with SharePoint


Getting intellisense in Visual Studio Code for AngularJs in TypeScript is not as straightforward as one would expect. Follow these steps below to get it working


Open Visual Studio Code

Press CTRL+` and run these commands:

tsc –init
npm install typings –global
typings install dt~jquery --global --save


typings install dt~angular --global


Now, if you run tsc compiler, your will get errors like so:


in order to fix it:

- create a global.d.ts file inside typings folder. It will be a new entry point for your TypeScript

- add import * as angular from "angular" as a first line

- add /// <reference path="index.d.ts" /> following that:


Modify tsconfig.json include "files" property to reference the new global.d.ts file: :

    "compilerOptions": {
        "target": "es5",
        "sourceMap": true

    "files": [


Let TypeScript compiler know which folder contains your .ts code by adding “include” property to the tsconfig.json file:

"include": ["src/*"]
where src/ is your source code folder
Run TypeScript compiler and start watching the files:
tsc --watch


Now you get angular and jQuery intellisense in TypeScript:


Well. it’s not really SharePoint specific, but it’s nice to know SharePoint developers can use the same steps.

If you are searching for a quick start with SharePoint and modern tools have a look at these articles by Andrew Koltyakov.

2 Nov 2016

Find Configuration Database Connection string in the Registry

SharePoint 2010:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0\Secure\ConfigDb

SharePoint 2013:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\15.0\Secure\ConfigDb


22 Oct 2016

The Best Way to Develop SharePoint Client Side Applications


Please, read these articles by Andrew Koltyakov.

He explains in great detail how to properly develop client side solutions using tools like node, gulp, Visual Studio Code with SharePoint

21 Oct 2016

Add jQuery to any page in a console

var script = document.createElement("script"); 

11 Oct 2016


Nice article: Why I prefer PSCONFIGUI.EXE over PSCONFIG.EXE by Stefan Goßner

In case you need to use PSCONFIG.EXE to automate some tasks you should use the following command:

PSConfig.exe -cmd upgrade -inplace b2b -wait -cmd applicationcontent -install -cmd installfeatures -cmd secureresources -cmd services -install

7 Oct 2016

PowerShell script for monitoring SharePoint WFE's and SQL Server back-ends​​​​

#counters.txt contains a list of performance counters
$fileName = "test{0:yyyyMMdd-HHmmss}.xml" -f (Get-Date) 
​get-counter -content (get-content counters.txt) -MaxSamples 2 -sampleinterval 5 |  Export-clixml $fileName

#save the results to the blg format. This will allow opening it with Performance Monitor
$fileName = "test{0:yyyyMMdd-HHmmss}.blg" -f (Get-Date) 
​get-counter -content (get-content counters.txt) -MaxSamples 2 -sampleinterval 5 |  Export-Counter $fileName
counters.txt contents:
\.NET CLR Memory(*)\% Time in GC 
\ASP.NET\Application Restarts 
\ASP.NET\Request Execution Time 
\ASP.NET\Requests Rejected 
\ASP.NET\Requests Queued 
\ASP.NET\Worker Process Restarts 
\ASP.NET\Request Wait Time 
\ASP.NET Applications(*)\Requests/Sec 
\LogicalDisk(*)\% Idle Time 
\Memory\Available MBytes 
\Memory\% Committed Bytes In Use 
\Memory\Page Faults/sec 
\Memory\Pages Input/sec 
\Memory\Page Reads/sec 
\Memory\Pool Nonpaged Bytes 
\Network Interface(*)\Bytes Total/sec 
\Network Interface(*)\Packets/sec 
\Paging File(*)\% Usage 
\PhysicalDisk(*)\Current Disk Queue Length 
\PhysicalDisk(*)\% Disk Time 
\PhysicalDisk(*)\Disk Transfers/sec 
\PhysicalDisk(*)\Avg. Disk sec/Transfer 
\Process(*)\% Processor Time 
\Process(*)\Page Faults/sec 
\Process(*)\Page File Bytes Peak 
\Process(*)\Page File Bytes 
\Process(*)\Private Bytes 
\Process(*)\Virtual Bytes Peak 
\Process(*)\Virtual Bytes 
\Process(*)\Working Set Peak 
\Process(*)\Working Set 
\Processor(*)\% Processor Time 
\Redirector\Server Sessions Hung 
\Server\Work Item Shortages 
\System\Context Switches/sec 
\System\Processor Queue Length 
\Web Service(*)\Bytes Received/sec 
\Web Service(*)\Bytes Sent/sec 
\Web Service(*)\Total Connection Attempts (all instances) 
\Web Service(*)\Current Connections 
\Web Service(*)\Get Requests/sec