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
## the following lists all the constrained delegation settings for a given AD user | |
## adapted from http://www.harbar.net/archive/2015/06/02/Configuring-Kerberos-Constrained-Delegation-with-Protocol-Transition-and-the-Claims.aspx | |
## to get ActiveDirectory Powershell module on Win 10 use the following | |
## https://gallery.technet.microsoft.com/Install-the-Active-fd32e541 | |
Param( | |
[Parameter(Mandatory=$true, Position=0, HelpMessage="AD Account Name")] | |
[string]$account | |
) | |
import-module ActiveDirectory | |
$u = get-aduser $account -properties "msDS-AllowedToDelegateTo", ServicePrincipalNames |
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
<# | |
.SYNOPSIS | |
Warms the SSAS permissions when using a dynamic security role | |
.NOTES | |
Author: Darren Gosbell | |
Date: 6 Jul 2016 | |
.DESCRIPTION | |
Warms the Global Scope cache for a list of users. This is useful when | |
the first connection on a cold cache per user is slow due to evaluation | |
of a dynamic security role. For production usage it would make sense |
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" |
OlderNewer