Scripts

Look up AD user properties using powershell

I realize that this is a bit of a lengthy script for something that you can use a one liner in the power shell:

Example:

Get-ADUser

But I needed to highlight certain properties of given user and take certain actions based on the values. And the result is this power shell script.

2019-07-15 (first published: )

1,057 reads

Generate views to correct the column collation on a target DB's tables automatically

You find you are querying a vendor supported database where you're not allowed to make any collation changes, and which has a weird collation setup: default DB collation that matches your server and other databases all character related columns are explicitly a different collation that does not match your DB or server collation Rather than […]

2019-07-05 (first published: )

433 reads

Audit Users logging in using "sa" or service accounts

Security is probably one of a production DBA's most important tasks and if developers use application or service accounts to run queries in your production environment you need to identify then and prohibit it. I notice some unwanted activity after staring a new job and decided to create a script that notifies me via email when […]

2019-07-04 (first published: )

902 reads

Blogs

Daily Coping 29 May 2020

By

I’ve started to add a daily coping tip to the SQLServerCentral newsletter and to...

Custom Quarantine PoSh Prompt

By

Since I’ve been quarantined at home and working in my office, every day is...

TIL: Get-DbaErrorLog

By

Ed: SQLDork is a Junior DBA on the team here, learning the DBATools in...

Read the latest Blogs

Forums

Week Ending Thursday, can some one tweek my code?

By bark01

What I have missed from this code? I'm trying to show the DateTimeRaised field...

The Matchbox Database

By Phil Factor

Comments posted to this topic are about the item The Matchbox Database, which is...

Filtering out based Start Date and End Date

By koti.raavi

Hello, I have query contains both start and end date, i would like to...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers