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
### Author: Darren Gosbell (https://darren.gosbell.com) | |
### Date : 22 Jan 2021 | |
### Usage : To use this script just update the following 4 variables for you environment | |
$server = "localhost\tab17" | |
$database = "adventure works" | |
$query = “evaluate 'Date'” | |
$filename = “c:\temp\tofile.csv” |
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 * | |
FROM SYSTEMRESTRICTSCHEMA ($SYSTEM.DISCOVER_CSDL_METADATA | |
, [CATALOG_NAME] = '<databaseid>' | |
, [VERSION]='2.0') |
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
### | |
### Script : AMO_GetTraceEventCategories.ps1 | |
### Author : Darren Gosbell (https://darren.gosbell.com) | |
### Date : 14 August 2020 | |
### Description: Outputs a list of the Trace Event Category and Subcategories for Analysis Services | |
### | |
$server = "Localhost\tab17" | |
$null = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.AnalysisServices.adomdclient") |
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
#load the type from the Microsoft.AnalysisServices.AdomdClient nuget package | |
Install-Package Microsoft.AnalysisServices.AdomdClient.retail.amd64 -Source "https://www.nuget.org/api/v2" | |
$p = get-package Microsoft.AnalysisServices.AdomdClient.retail.amd64 | |
$nugetFile = get-childitem $p.source | |
$adomdFile = join-path $nugetFile.DirectoryName "lib\net45\Microsoft.AnalysisServices.AdomdClient.dll" | |
add-type -path $adomdFile |
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
$SaltByteLength = 64 | |
$rncCsp = new-object System.Security.Cryptography.RNGCryptoServiceProvider | |
$salt = new-object byte[] $SaltByteLength | |
$rncCsp.GetBytes($salt); | |
[System.Convert]::ToBase64String($salt) |
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
<# | |
.Synopsis | |
This script checks a local Power BI Report Server instance against the version | |
currently available for download and reports if the two versions are no the same. | |
.Notes | |
Author: Darren Gosbell | |
Date: 8 April 2019 | |
.Example |
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
# Generates a <machineKey> element that can be copied + pasted into a rsReportServer.config file for PowerBI Report Server | |
function Generate-MachineKey { | |
[CmdletBinding()] | |
param ( | |
[ValidateSet("AES", "DES", "3DES")] | |
[string]$decryptionAlgorithm = 'AES', | |
[ValidateSet("MD5", "SHA1", "HMACSHA256", "HMACSHA384", "HMACSHA512","AES")] | |
[string]$validationAlgorithm = 'AES' #'HMACSHA256' | |
) | |
process { |
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
$process = "MSMDSRV" | |
get-process -name $process | % {get-nettcpconnection -OwningProcess $_.id} | select-object @{Name="Process"; Expression = {$Process}},LocalPort, RemotePort, OwningProcess | |
$process = "PBIDesktop" | |
get-process -name $process | % {get-nettcpconnection -OwningProcess $_.id} | select-object @{Name="Process"; Expression = {$Process}},LocalPort, RemotePort, OwningProcess |
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 Get-NetworkStatistics | |
{ | |
$properties = ‘Protocol’,’LocalAddress’,’LocalPort’ | |
$properties += ‘RemoteAddress’,’RemotePort’,’State’,’ProcessName’,’PID’ | |
netstat -ano | Select-String -Pattern ‘\s+(TCP|UDP)’ | ForEach-Object { | |
$item = $_.line.split(” “,[System.StringSplitOptions]::RemoveEmptyEntries) | |
if($item[1] -notmatch ‘^\[::’) |
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 3.0 | |
param( | |
[Parameter(Mandatory=$true)] | |
[string]$serverName, | |
[Parameter(Mandatory=$true)] | |
[string]$databaseName, | |
[Parameter(Mandatory=$true)] | |
[string]$pathToBimFile | |
) |