This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
mt.TypeName, | |
mtp.ManagedTypePropertyName, | |
gs.SettingValue | |
from GlobalSettings gs | |
join ManagedTypeProperty mtp | |
on gs.ManagedTypePropertyId = mtp.ManagedTypePropertyId | |
join ManagedType mt | |
on mtp.ManagedTypeId = mt.ManagedTypeId | |
where mt.TypeName = 'Microsoft.SystemCenter.DataWarehouse' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Log-Start{ | |
<# | |
.SYNOPSIS | |
Creates log file | |
.DESCRIPTION | |
Creates log file with path and name that is passed. Checks if log file exists, and if it does deletes it and creates a new one. | |
Once created, writes initial logging data | |
.PARAMETER LogPath |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$oADObject = Get-ADComputer <ComputerName> -Properties * | |
$oAceObj = Get-Acl -Path (“ActiveDirectory:://RootDSE/” + $oADObject.DistinguishedName); | |
$oAceObj.Owner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import os | |
import sys | |
import csv | |
import datetime | |
import time | |
import twitter | |
def test(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE StackOverflow; | |
GO | |
IF OBJECT_ID('dbo.usp_Q7521') IS NULL | |
EXEC ('CREATE PROCEDURE dbo.usp_Q7521 AS RETURN 0;') | |
GO | |
ALTER PROC dbo.usp_Q7521 @UserId INT AS | |
BEGIN | |
/* Source: http://data.stackexchange.com/stackoverflow/query/7521/how-unsung-am-i */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#requires -version 4 | |
<# | |
.SYNOPSIS | |
<Overview of script> | |
.DESCRIPTION | |
<Brief description of script> | |
.PARAMETER <Parameter_Name> | |
<Brief description of parameter input required. Repeat this attribute if required> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
id AS [Table ID] | |
, OBJECT_NAME(id) AS [Table Name] | |
, name AS [Index Name] | |
, STATS_DATE(id, indid) AS [LastUpdated] | |
, rowcnt AS [Row Count] | |
, rowmodctr AS [Rows Modified] | |
, FLOOR(500 + (rowcnt * 0.2)) AS [Threshold To AutoUpdate] | |
, CASE | |
WHEN rowcnt = 0 THEN 'Not Ready to Update' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
ar.replica_server_name, | |
adc.database_name, | |
ag.name AS ag_name, | |
drs.is_local, | |
drs.is_primary_replica, | |
drs.synchronization_state_desc, | |
drs.is_commit_participant, | |
drs.synchronization_health_desc, | |
drs.recovery_lsn, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function w-h() { | |
write-host -ForegroundColor Yellow ">>>" (get-date).ToString("yyyMMdd HH:mm:ss") $args | |
} | |
function w-e() { | |
write-host -ForegroundColor Red ">>>" (get-date).ToString("yyyMMdd HH:mm:ss") $args | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$adGroupName = "Domain Users" | |
(get-adgroup $adGroupName -Server (Get-ADDomainController -Discover -Service ADWS -DomainName $env:USERDNSDOMAIN) -properties members).members |
OlderNewer