#PSTip Finding all databases to which a login is mapped
Note: This tip requires PowerShell 2.0 or above. One of the projects on which I work requires a validation step after each deployment.
Read MoreNote: This tip requires PowerShell 2.0 or above. One of the projects on which I work requires a validation step after each deployment.
Read MoreThere are many ways to get the path of the system directory (e.g system32). Here’ one that I find very useful that involves the .
Read MoreNote: This tip requires PowerShell 3.0 or above. [adsisearcher] is a PowerShell type adapter for DirectorySearcher .NET class. We can use this type adapter to perform queries against Active Directory Domain Services.
Read MoreNote: This tip requires PowerShell 3.0 or above. Before performing tasks like adding roles to a SQL login, it is desired to validate the existence of SQL login.
Read MoreNote: This tip requires PowerShell 2.0 or above. We can use SQL Server SMO object to add a SQL login to the database roles.
Read MoreHere’s another cool variables tip. Say you want to initialize a few variables to a specific value. Instead of doing:
Read More