Monthly Archives: March 2013
Very underused feature of Windows 7 (NTFS).
MKLINK [[/D] | [/H] | [/J]] LinkName Target
/D Creates symbolic link (symlink) to a folder. Default is a symlink to a file.
/H Creates hardlink instead of a symlink.
/J Creates junction.
LinkName Defines name of the new symlink.
Target Defines path (relative or absolute) the new symlink points to.
There’s at least one circumstance where you can’t replace a junction point with a symlink: if the content might need to be accessed remotely. If you access a file share on a Windows machine, junction points are interpreted by the server and work as expected. Symbolic links are interpreted by the client (i.e., a symlink to c:\foo\bar would be interpreted as pointing to the client’s C drive) and are disabled by default anyway.
Link a folder to a server share
D:\DATA\FOLDER1\FOLDER2>mklink /d LINKNAME \\server\share
Have you got skydrive installed in your profile? Then folder C:\Users\UserName\SkyDrive is synchronized to SkyDrive. If you want another folder on D: drive (ie D:\Tools) also synchronized to SkyDrive just make a symbolic link to it and you’re done.
C:\Users\UserName\SkyDrive\Programs>mklink /d tools d:\tools
(Get-Counter '\Procesor(*)\% času procesoru' -SampleInterval 10).CounterSamples.CookedValue
Dump names of all counters
Get-Counter -ListSet * | Select-Object -ExpandProperty Counter