This file contains hidden or 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
-- Detect | |
sp_change_users_login 'report' | |
-- Repair | |
SELECT 'EXEC sp_change_users_login ''Update_One'', '''+[name]+''', '''+[name]+'''' | |
FROM sys.database_principals WHERE | |
type_desc='SQL_USER' | |
and NAME NOT IN ('dbo','guest','INFORMATION_SCHEMA','sys') |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<UsingTask TaskName="TransformXml" AssemblyFile="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Web\Microsoft.Web.Publishing.Tasks.dll" /> | |
<!-- This will allow the config file to be copied to any project referencing the project that need the config transformation --> | |
<PropertyGroup> | |
<AllowedReferenceRelatedFileExtensions> | |
$(AllowedReferenceRelatedFileExtensions); | |
.dll.config | |
</AllowedReferenceRelatedFileExtensions> |
This file contains hidden or 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
[CmdletBinding()] | |
param() | |
Function Get-RegistryKeyPropertiesAndValues | |
{ | |
Param( | |
[Parameter(Mandatory=$true)] | |
[string]$path | |
) |
This file contains hidden or 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 Spy-Cmdlet { | |
param( | |
[Management.Automation.CommandInfo]$command | |
) | |
if ($input) { | |
trap { $_; break } | |
$command = $input | select -first 1 | |
} | |
This file contains hidden or 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
param( | |
[Parameter(Mandatory=$true)] | |
$filePath | |
) | |
$accountsFilter= "" | |
Get-Content -Path $filePath | ForEach-Object { | |
if($_.Trim()){ | |
$accountsFilter += "(sAMAccountName=$_)" |
This file contains hidden or 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
[CmdletBinding()] | |
Param ( | |
[Parameter(Mandatory)] | |
[ValidateScript({Test-Path $_ -PathType Leaf})] | |
[string]$ConfigurationDataFile | |
) | |
Set-StrictMode -Version Latest | |
$ErrorActionPreference = "SilentlyContinue" |
This file contains hidden or 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
"terminal.external.windowsExec": "C:\\dev\\utils\\cmder\\Cmder.exe", | |
"terminal.integrated.shell.windows": "C:\\WINDOWS\\sysnative\\cmd.exe", | |
"terminal.integrated.shellArgs.windows" : ["/K","C:\\dev\\utils\\cmder\\vendor\\init.bat"], |
This file contains hidden or 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
docker run --rm --volume ${pwd}:/ourtput jmelosegui/ffmpeg -i output/video.mp4 /output/video.gif |
This file contains hidden or 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 Get-InstalledSoftware | |
{ | |
<# | |
.SYNOPSIS | |
Retrieves a list of all software installed | |
.EXAMPLE | |
Get-InstalledSoftware | |
This example retrieves all software installed on the local computer | |
.PARAMETER Name |
This file contains hidden or 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
rundll32 dfshim CleanOnlineAppCache |