select CHARINDEX(<char>,<columnname>,[<startpoint>]) from <tablename>;
PowerShell
Powershell information and commands
Find a column in a SQL Server Database
use [XYZ] -- your database name go select name, type_desc from sys.all_objects where object_id in (select object_id from sys.all_columns where upper(name)='<your column name>') go
Get Size of all tables in a SQL Server Database
use [<dbname>] go SELECT t.NAME AS TableName, s.Name AS SchemaName, p.rows AS RowCounts, SUM(a.total_pages) * 8 AS TotalSpaceKB, SUM(a.used_pages) * 8 AS UsedSpaceKB, (SUM(a.total_pages) - SUM(a.used_pages)) * 8 AS UnusedSpaceKB FROM sys.tables t INNER JOIN sys.indexes i ON t.OBJECT_ID = i.object_id INNER JOIN sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_id INNER JOIN sys.allocation_units a ON p.partition_id = a.container_id LEFT OUTER JOIN sys.schemas s ON t.schema_id = s.schema_id WHERE t.NAME NOT LIKE 'dt%' AND t.is_ms_shipped = 0 AND i.OBJECT_ID > 255 GROUP BY t.Name, s.Name, p.Rows ORDER BY t.Name
Launch Admin Tools from Windows Command Line
Many of the Windows admin tools can be quickly accessed by launching them from an administrator command prompt.
AD Domains and Trusts
domain.msc
Active Directory Management
admgmt.msc
AD Sites and Serrvices
dssite.msc
AD Users and Computers
dsa.msc
ADSI Edit
adsiedit.msc
Authorization Manager
azman.msc
Certification Authority Management
certsrv.msc
Certificate Templates
certtmpl.msc
Cluster Administrator
cluadmin.exe
Computer Management
compmgmt.msc
Component Services
comexp.msc
Configure Your Server
cys.exe
Device Manager
devmgmt.msc
DHCP Managment
dhcpmgmt.msc
Disk Defragmenter
dfrg.msc
Disk Manager
diskmgmt.msc
Distributed File System
dfsgui.msc
DNS Managment
dnsmgmt.msc
Event Viewer
eventvwr.msc
Indexing Service Management
ciadv.msc
IP Address Manage
ipaddrmgmt.msc
Licensing Manager
llsmgr.exe
Local Certificates Management
certmgr.msc
Local Group Policy Editor
gpedit.msc
Local Security Settings Manager
secpol.msc
Local Users and Groups Manager
lusrmgr.msc
Network Load balancing
nlbmgr.exe
Performance Montior
perfmon.msc
PKI Viewer
pkiview.msc
Public Key Managment
pkmgmt.msc
QoS Control Management
acssnap.msc
Remote Desktops
tsmmc.msc
Remote Storage Administration
rsadmin.msc
Removable Storage
ntmsmgr.msc
Removalbe Storage Operator Requests
ntmsoprq.msc
Routing and Remote Access Manager
rrasmgmt.msc
Resultant Set of Policy
rsop.msc
Schema management
schmmgmt.msc
Services Management
services.msc
Shared Folders
fsmgmt.msc
SID Security Migration
sidwalk.msc
Telephony Management
tapimgmt.msc
Terminal Server Configuration
tscc.msc
Terminal Server Licensing
licmgr.exe
Terminal Server Manager
tsadmin.exe
UDDI Services Managment
uddi.msc
Windows Mangement Instumentation
wmimgmt.msc
WINS Server manager
winsmgmt.msc
Windows Firewall with Advanced Security on Local Computer
wf.msc