Skip to content

Instantly share code, notes, and snippets.

🎉
powershell and chill

Chrissy LeMaire potatoqualitee

Block or report user

Report or block potatoqualitee

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gallery.ps1
@potatoqualitee
potatoqualitee / sql2014.AdventureWorks2014.tables.json
Last active Dec 21, 2018
Modified New-DbaDbMaskingConfig output
View sql2014.AdventureWorks2014.tables.json
{
"Name": "AdventureWorks2014",
"Tables": [
{
"Name": "Employee",
"Schema": "HumanResources",
"Columns": [
{
"Name": "NationalIDNumber",
"ColumnType": "nvarchar",
View sql2014.AdventureWorks2014.tables.json
{
"Name": "AdventureWorks2014",
"Tables": [
{
"Name": "AWBuildVersion",
"Schema": "dbo",
"Columns": [
{
"Name": "Database Version",
"ColumnType": "nvarchar",
View publish.ps1
Set-Content -Encoding UTF8 -Path C:\github\dbatools\allcommands.ps1 -Value "### DO NOT EDIT THIS FILE DIRECTLY ###"
Get-ChildItem -Path "C:\github\dbatools\functions\*.ps1" -Recurse | Get-Content | Add-Content C:\github\dbatools\allcommands.ps1
Get-ChildItem -Path "C:\github\dbatools\internal\functions\*.ps1" -Recurse | Get-Content | Add-Content C:\github\dbatools\allcommands.ps1
Remove-Item -Path C:\github\dbatools\allcommands.zip -ErrorAction Ignore
Compress-Archive -Path C:\github\dbatools\allcommands.ps1 -DestinationPath C:\github\dbatools\allcommands.zip
Remove-Item -Recurse C:\github\dbatools\allcommands.ps1 -ErrorAction Ignore
Remove-Item -Recurse C:\gallery -Force
mkdir C:\gallery\dbatools
View package.json
{
"name": "search",
"displayName": "dbatools simple search",
"description": "search right from your code: dbatools, microsoft docs and google",
"version": "1.0.0",
"icon": "resources/search.png",
"publisher": "dbatools",
"engines": {
"vscode": "^1.11.0"
},
View filestream_enable.vbs
'
' USAGE:
'
' cscript filestream_enable.vbs [/Machine:<MachineName>] [/Instance:<InstanceName>] [/Level:<0|1|2|3>] [/Share:<ShareName>]
' from the codeplex site https://archive.codeplex.com/?p=sqlsrvengine
'
InstanceName = "MSSQLSERVER"
MachineName = "."
TargetLevel = 3
View sql-enums.xml
# from https://hic.dundee.ac.uk/Installers/RDMP/2.7.3.1/RDMPAutomationService/Microsoft.SqlServer.SqlEnum.xml
<doc>
<assembly>
<name>Microsoft.SqlServer.SqlEnum</name>
</assembly>
<members>
<member name="P:Microsoft.SqlServer.Management.Smo.AvailableSQLServers.ResultTypes">
<summary>
return what types of results does this object support
</summary>
@potatoqualitee
potatoqualitee / format-cbh.ps1
Last active Oct 7, 2018
reformat and standardize comment based help in powershell
View format-cbh.ps1
function Get-Header ($text) {
$start = $text.IndexOf('<#')
$text.SubString(0, $start - 2)
}
function Format-Help ($text) {
$start = $text.IndexOf('<#')
$end = $text.IndexOf('#>')
$help = $text.SubString($start + 2, $end - $start - 2)
View slack.css
body { background: #222; color: #e6e6e6; }
a { color: #949494; }
a:link, a:visited { color: #949494; }
a:hover, a:active, a:focus { color: #c7c7c7; }
hr { border-bottom: 1px solid #424242; border-top: 1px solid #222; }
@potatoqualitee
potatoqualitee / mi.txt
Created Jul 14, 2018
managed instance properties
View mi.txt
AuditLevel : Failure
BackupDirectory : https://xyz.blob.core.windows.net/managedserverbac-GUID/
backup
BrowserServiceAccount :
BrowserStartMode : Disabled
BuildClrVersionString : v4.0.30319
BuildNumber : 700
ClusterName :
ClusterQuorumState : NotApplicable
ClusterQuorumType : NotApplicable
You can’t perform that action at this time.