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 | |
Updates a LastProcessed table in an SSAS Tabular database | |
.DESCRIPTION | |
This script uses AMO to loop through each table in the specified | |
database and pushed the table name and the LastProcessed Date/time | |
value into the specified table. Requires | |
.NOTES | |
File Name : update-ssaslastupdated.ps1 | |
Author : Darren Gosbell |
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
$serverName="localhost" | |
$databaseName = "AdventureWorks" | |
$cubeName = "Model" | |
$outputFolder = "d:\data" | |
# load the AMO into the current runspace | |
[System.Reflection.Assembly]::LoadwithpartialName("Microsoft.AnalysisServices") > $null | |
# connect to the server | |
$svr = new-Object Microsoft.analysisservices.Server |
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
$serverList = @("localhost","localhost\MD12") #an array of SSAS instances | |
$roleName = "Metadata Role" | |
$roleMembers = @("Everyone") # an array of user/group names | |
# load the AMO assemblies into the current runspace | |
$assembly = [System.Reflection.Assembly] | |
$assembly::LoadWithPartialName("Microsoft.AnalysisServices") > $null |
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
## This is an example script showing how to detect the compatibility level | |
## and execute the DBCC command against multiple databases | |
## note: to execute DBCC from powershell you need to wrap it in <Execute> and <Command> wrappers | |
## or it won't work | |
## Author: Darren Gosbell | |
## Date : 19 July 2016 | |
$serverName = 'localhost\tab16' | |
[Reflection.Assembly]::LoadWithPartialName("Microsoft.AnalysisServices") > $null |
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
// working examples to replace ones from https://msdn.microsoft.com/en-us/library/mt697588.aspx?f=255&MSPPError=-2147217396 | |
{ | |
"refresh" : { | |
"type" : "dataOnly", | |
"objects" : [{ | |
"database" : "AdventureWorks2016", | |
"table" : "Customer" | |
} | |
], | |
"overrides" : [{ |
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 | |
Turns remote errors on or off for an instance of Power BI Report Server | |
.PARAMETER $enabled | |
a boolean that controls whether remote errors are enabled or not | |
.INPUTS | |
None - you cannot pipe into this function | |
.OUTPUTS | |
None | |
.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
param ( | |
[string] $dllFile = $(throw "-dllFile parameter required"), | |
[string] $xmlaFile | |
) | |
if ($xmlaFile -eq $null) { $xmlaFile = $dllFile.Replace(".dll", ".xmla") } | |
write-host "Started Creating Xmla script: $xmlaFile" | |
<# | |
$dllfile = "C:\Users\c950497\Downloads\SQLQuery v1.3.5\SQLQuery.dll" | |
$xmlafile = "C:\Users\c950497\Downloads\SQLQuery v1.3.5\SQLQuery.xmla" |
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
<# | |
.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 |
OlderNewer