Stop-Service cannot stop services remotely. One easy way of doing so is Set-Service: Set-Service -Name Spooler -Status "Stopped"...
Month: June 2012
Easier ForEach/Where-Object in PSv3
In the upcoming PowerShell v3 which you can already download as a Beta version, using Where-Object and ForEach-Object becomes a lot simpler. No...
MONyog MySQL Monitor 5.3 beta 1 Has Been Released
Please note that users upgrading from a version before 5.2 will need a new registration code. Registered customers will get the new code from our...
Lunch Time Alert
Here's a fun prompt function that turns your input prompt into a short prompt and displays the current path in your PowerShell window title bar....
Custom FireMonkey "TSimpleTriangle" component
Have you ever written a component in Delphi? Reusable components are the corner-stone of rapid application development and important part of Delphi...
Finding Files Owned by a User
Here's a simple filter that will show only those files and folders that a specific user is owner of: filter Get-Owner...
Am I Privileged?
There are numerous ways to find out if a script runs elevated. Here's a pretty simple approach: PS> (whoami /all | Select-String...
Checking User Privileges
whoami.exe is a useful little tool that ships with Windows 7/Server 2008 R2, and it becomes even more useful when you instruct it to output its...
Resolving Paths
Paths can be relative, such as ". \file.txt". To resolve such a path and display its full path, you could use Resolve-Path: PS>...
Synchronizing Current Folder
PowerShell allows its own current path to differ from what Windows thinks is the current path: [IO.Path]::GetFullPath('.') cd $env:windir...
Check PowerShell Speed
To find out how much time a particular cmdlet or command takes, here's a handy little stopwatch that you can use: function Test { $codetext =...
Running a Script Block with Parameters
Maybe you want to design a script that takes code as user input. How would you run that submitted piece of code and pass parameters to it? To run a...
Pinning PowerShell ISE
The integrated PowerShell ISE editor has its own icon and can be pinned to the Windows 7 taskbar, just like PowerShell. Try this: Open PowerShell,...
Keyboard Tricks for Launching PowerShell
If you have pinned PowerShell to your taskbar (on Windows 7: launch PowerShell, right-click its icon in the task bar, choose "Pin this program...
Consider Your Collations Carefully, Or Pay Later
When first installing SQL Server, many developers and DBAs new to SQL Server may have the temptation to click Next, Next, Next on the installation...
No Reboots After Updates
If you have set Windows Update to automatic mode, it takes care of detecting, downloading, and installing all necessary updates - fine. However, it...
Locking Drive Content
In a previous tip we showed how you can hide drive letters in Windows Explorer. You may have discovered, though, that a user can still open files...
MONyog MySQL Monitor 5.21 Has Been Released
Please note that users upgrading from a version before 5.2 will need a new registration code. Registered customers will get the new code from our...
Ensure Proper SQL Server Connection Pooling
Coming to SQL Server from both a database developer and DBA background, I maintain that while tuning SQL Server’s ability to handle your application...
Using PowerShell ISE with Full Privileges
Sometimes you need full administrator privileges to debug or test a script in the ISE script editor. By default, ISE starts with restricted...
Implicit Foreach in PSv3
PowerShell v3 Beta is available for quite some time now, so every now and then we start tossing in some PowerShell v3 tips. We'll clearly mark...
Hiding Drive Letters
Sometimes you may want to hide drive letters in Windows Explorer from users. There's a Registry key that can do this for you. It takes a bit...
Converting Letters to Numbers and Bit Masks
Sometimes, you may need to turn characters such as drive letters into numbers or even bit masks. With a little bit of math, this is easily doable....
Checking Size of Downloads-Folder
Whenever you download something with IE, by default the files get stored in your personal download folder. Often, over time a lot of garbage can...