Bulk-Remove Protection for Accidental Deletion in AD

Bulk-Remove Protection for Accidental Deletion in AD

Removing Accidental Deletion Protection By default, AD objects are protected from accidental deletion. To remove this protection for all objects in a given scope (i.e. all objects in an organizational unit and below), try this code: #requires -Version 1 -Modules...

Part 1: Monitoring Analysis Services(SSAS) Performance

Part 1: Monitoring Analysis Services(SSAS) Performance

So you’re a DBA and your manager comes in and says that the BI team wants to install and configure an instance of Analysis Service. Oh and by the way, you are going to be responsible for monitoring the availability and performance of the instance as well as making...

Bulk-Remove Protection for Accidental Deletion in AD

DBA Triage Using Heatmaps

The word “triage” for me brings up images from MASH re-runs; or memories of emergency room visits with nurses quickly deciding whether you are healthyenough to sit and suffer in the lobby for a few hours. For years, triage in the database performance world meant a...

Bulk-Remove Protection for Accidental Deletion in AD

Using Green Checkmarks in Console Output

In a previous tip you have seen that the PowerShell console supports all characters available in a TrueType font. You just need to convert the character code to the type "Char". Advanced Example: Using Splatting for Console Output Here is a more advanced example that...

Bulk-Remove Protection for Accidental Deletion in AD

Using Symbols in Console Output

Did you know that console output can contain special icons like checkmarks? All you need to do is set the console to a TrueType font like "Consolas". To display special characters, use the decimal or hexadecimal character code, for example: [Char]8730 [Char]0x25BA...

Bulk-Remove Protection for Accidental Deletion in AD

Removing Whitespace (and Line Breaks)

You may know that each string object has a method called Trim() that trims away whitespace both from the beginning and end of a string: $text = ' Hello ' $text.Trim() Trim() and Line Breaks A lesser known fact is that Trim() will also eat away leading and trailing...

Bulk-Remove Protection for Accidental Deletion in AD

Understanding break, continue, return, and exit

Understanding Control Flow: break, continue, return, and exit Do you know off-hand what "break", "continue", "return", and "exit" do? These are powerful language constructs, and here is a test function to illustrate how different their effects are: 'Starting' function...

Bulk-Remove Protection for Accidental Deletion in AD

Getting Registry Values and Value Types

Get-ItemProperty can easily read registry values, but you do not get back any information about the registry value type. Get-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion' Alternative Approach Using .NET Here is an alternate approach that uses...

Bulk-Remove Protection for Accidental Deletion in AD

Tinker, Tailor, Developer, DBA

Tinker, Tailor, Developer, DBA is not intended as a pitch on a slightly less harrowing book or movie than the John Le Carre classic.   Rather, it is a consideration of the career progressions of those working in and around SQL Server and how that progression...

Bulk-Remove Protection for Accidental Deletion in AD

Using “more” in the PowerShell ISE

PowerShell ISE In the PowerShell console, you can pipe commands to the old-fashioned “more.com”, or better yet, to Out-Host –Paging. This will display data page by page, asking for a key press to continue: PS> Get-Process | more PS> Get-Process | Out-Host...

Bulk-Remove Protection for Accidental Deletion in AD

Measuring Website Response (and Execution Times)

PowerShell 3.0 and later Sometimes it is important to know just how long a command takes. For example, to monitor web site response times, you could use Invoke-WebRequest. Measure-Command measures execution time. $url = 'http://www.powershell.com' # track execution...

Team DBA and Collaboration

Team DBA and Collaboration

In previous blog posts I have explored the relevance of the DBA position itself in business  and the unique ways that SQL Server DBAs tend to fall into their positions.   After mulling over those topics I found myself considering the varying...

Bulk-Remove Protection for Accidental Deletion in AD

Exporting Out-GridView Content

PowerShell 3.0 and later Out-GridView is a very useful cmdlet to output results to an extra window. Unlike outputting to the console, Out-GridView will not cut off anything. And it has a not-so-obvious way of easily copying the information to other applications. Try...

Bulk-Remove Protection for Accidental Deletion in AD

Top 3 Development Environments for PostgreSQL

PostgreSQL is an object-relational database management system (ORDBMS) supporting extensibility and standards-compliance. Just like any other advanced RDBMS, PostgreSQL does more than retrieving or updating data. PostgreSQL is a very popular database...

Bulk-Remove Protection for Accidental Deletion in AD

Finding Explicit Permissions

All PowerShell versions Typically, NTFS permissions in the file system are inherited. You can, however, add explicit permissions to files and folders. To find out where inheritance was changed and direct security settings have been added, you can use this code sample:...

Bulk-Remove Protection for Accidental Deletion in AD

Accessing COM Objects without ProgID

All Versions Typically, to access COM objects, these objects need to register themselves in the Windows Registry, and PowerShell needs the registered ProgID string to load the object. Here is an example: $object = New-Object -ComObject Scripting.FileSystemObject...

Bulk-Remove Protection for Accidental Deletion in AD

Changing GPO Description/Comment

GroupPolicy Module When you create a new Group Policy, you can set a comment (or description). There is no apparent way, however, to change the description later. Here is code that allows you to retrieve a group policy, then read and/or change the description. Make...

Bulk-Remove Protection for Accidental Deletion in AD

Top 3 Sample Databases for PostgreSQL

If a developer is attempting to learn a new process or test some code, it’s best to utilize a test environment such as a sandbox rather than the production server. A sandbox environment is the place where there are scenarios like the real world but no real world data....