search
Categories
Sponsors
VirtualMetric Hyper-V Monitoring, Hyper-V Reporting
Archive
Blogroll

Badges
MCSE
Community

Cozumpark Bilisim Portali
Getting MSSQL Server Login Information via PowerShell
Posted in Windows Powershell | 2 Comments | 1,217 views | 02/03/2016 16:12

You can get detailed SQL Server properties via following code:

1
2
3
4
5
6
7
8
9
10
11
12
13
$MSSQLServerManager = New-Object 'Microsoft.SqlServer.Management.SMO.Server'
 
# Get SQL Logins
$MSSQLLogin = @($MSSQLServerManager.Logins)[0]
 
# Get SQL Logins Properties
$HostSQLLoginName = $MSSQLLogin.Name;
$HostSQLLoginType = $MSSQLLogin.LoginType;
$HostSQLLanguage = $MSSQLLogin.Language;
$HostSQLHasAccess = $MSSQLLogin.HasAccess;
$HostSQLDenyWindowsLogin = $MSSQLLogin.DenyWindowsLogin;
$HostSQLIsDisabled = $MSSQLLogin.IsDisabled;
$HostSQLIsLocked = $MSSQLLogin.IsLocked;

You can also check other properties by listing all properties of $MSSQLLogin.


Comments (2)

Wesley Libby

January 25th, 2020
23:33:46

Are you trying to find effective online marketing that doesn’t charge a fortune and gets amazing resuts? I apologize for sending you this message on your contact form but actually that was kinda the point. We can send your advertising message to sites through their contact pages just like you’re getting this ad right now. You can specify targets by keyword or just go with bulk blasts to sites in any country you choose. So let’s say you would like to blast a message to all the mortgage brokers in the US, we’ll grab websites for just those and post your promo to them. As long as you’re advertising some kind of offer that’s relevant to that niche then you’ll receive an awesome result!

Fire off a quick message to alfred3545will@gmail.com to find out how we do this


Lily Rawls

May 29th, 2020
20:41:51

Hi

DFY Suite is an established, high-quality social syndication system that allows you to get stunning content syndication
for your videos or niche sites WITHOUT having to do ANY of the work yourself.

+ There is NO software to download or install
+ There is NO account creation needed on your part
+ There is NO having to deal with proxies of captchas
+ There are NO complicated tutorials you have to watch

DFY Suite 2 with more advanced features will become your powerful tool to serve the online marketing industry
which gets more and more competitive. You will be able to skyrocket your business with very little effort.

MORE INFO HERE=> https://bit.ly/3dc4M7p



Leave a Reply