Skip to content

Instantly share code, notes, and snippets.

View SQLvariant's full-sized avatar

Aaron Nelson SQLvariant

View GitHub Profile
<# This is the code used to tell you
which databases are using up the RAM on
your SQL Server is great information to know
Queries are from https://www.mssqltips.com/sqlservertip/2393/determine-sql-server-memory-use-by-database-and-object/ #>
$SQLInstance = 'localhost\SQL2016'
Invoke-Sqlcmd -ServerInstance $SQLInstance -Database master -Query "
DECLARE @total_buffer INT;
SELECT @total_buffer = cntr_value
#------------------------------------------------------------------------
# Source File Information (DO NOT MODIFY)
# Source ID: 9ad32074-7adb-4822-a049-93600f966aa9
# Source File: ..\Documents\SAPIEN\Projects\Gui-SSRS-Deploy\Gui-SSRS-Deploy.psproj
#------------------------------------------------------------------------
#region Project Recovery Data (DO NOT MODIFY)
<#RecoveryData:
CAIAAB+LCAAAAAAABACNkV1rgzAUhu8L/Q/ifepHxU6IuVhdyy72QS27Had6HBkxkUTH/PeLU4dl
MHb5JO95XnJCT1ioD9R9Bi2w9cpx6LNW71i032DxBbXhSrJgE1BvhunuwAXeZyyBchv6u4jsoLyQ
6CYMCfhRQpJt7PtVEscACfWm8DQ6tZz7BplPvSXOciVKW+d4yzYzwYTOCSvUKAt8hBpT13VuOy7K
# SQLReporting.psm1 Version 0.9
# Written by Trond Hindenes
#http://hindenes.com/powershell/SQLReporting.psm1
#Import-Module Pester
#http://stackoverflow.com/questions/9178685/change-datasource-of-ssrs-report-with-powershell
<#
.SYNOPSIS
Gets SSRS instances on ComputerName
.DESCRIPTION
@potatoqualitee
potatoqualitee / scrape.ps1
Last active February 24, 2021 15:22
Scrape All Microsoft Connect Items marked Resolved or Closed
# IE has to be used because of a refresh that Invoke-WebRequest can't handle (think Clicks)
# Add required types
Add-Type -Path C:\Scripts\Scheduled\ClosedAsFixed\HtmlAgilityPack.dll
Add-Type -AssemblyName System.Web
Function Get-Total ($closedorresolved, $bugorsuggestion){
switch ($closedorresolved) {
"Closed" { $status = '3' }
"Resolved" { $status = '2' }
@AndyCross
AndyCross / BabylonjsVisual.ts
Last active December 6, 2020 02:24
Use BabylonJS in PowerBI
declare module BABYLON {
export class Engine {
constructor(canvas:HTMLElement, antialias:boolean);
runRenderLoop(it:any);
resize();
}
export class Scene {
constructor(engine:Engine);
render();
}
@NickCraver
NickCraver / Windows10-Setup.ps1
Last active April 1, 2024 10:52
(In Progress) PowerShell Script I use to customize my machines in the same way for privacy, search, UI, etc.
##################
# Privacy Settings
##################
# Privacy: Let apps use my advertising ID: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0
# To Restore:
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1
# Privacy: SmartScreen Filter for Store Apps: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0