Skip to content

Instantly share code, notes, and snippets.

@dgosbell
Created March 11, 2020 06:15
Show Gist options
  • Save dgosbell/683ed77f4a46543acf348b57c20e3d25 to your computer and use it in GitHub Desktop.
Save dgosbell/683ed77f4a46543acf348b57c20e3d25 to your computer and use it in GitHub Desktop.
Load AnalysisServices nuget packages into a Powershell session
#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
#load the type from the Microsoft.AnalysisServices nuget package
Install-Package Microsoft.AnalysisServices.retail.amd64 -Source "https://www.nuget.org/api/v2"
$p = get-package Microsoft.AnalysisServices.retail.amd64
$nugetFile = get-childitem $p.source
$amoFile = join-path $nugetFile.DirectoryName "lib\net45\Microsoft.AnalysisServices.dll"
add-type -path $amoFile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment