Databases Reference
In-Depth Information
PowerShell and Native mode Reporting
Services 2010
For the Native mode installation of Reporting Services in 2012, Windows
Management Instrumentation ( WMI ) provides the API. Programming languages
can be used to manage Windows programs through the API.
The Reporting Services WMI provider exposes two WMI classes for developers to
administer the Native mode Report Server. They are as follows:
MSReportServer_Instance : Namespace:root\Microsoft\SqlServer\
ReportServer\RS_<EncodedInstanceName>\v11
MSReportServer_ConfigurationSetting : Namespace:root\Microsoft\
SqlServer\ReportServer\RS_<EncodedInstanceName>\v11\Admin
These can be used by both Microsoft and third-party programs to administer
Reporting Services. The latter needs administrator privileges.
Hands-on exercise 8.8 - exploring Native
mode Reporting Services
We will look at the Report Server properties in this section by using PowerShell.
The Native mode Report Server
The PowerShell code can be used to get at the properties of the RS instance(s) and
the configuration(s) by performing the following steps:
1.
Type the following code in a notepad, and save it as RS1.ps1 in the C:\
drive, where you can run PowerShell:
$computer = "LocalHost"
$namespace = "root\Microsoft\SqlServer\ReportServer\RS_HI\V11"
Get-WmiObject -class MSReportServer_Instance -computername
$computer -namespace $namespace
2. Open the command prompt and start PowerShell.
 
Search WWH ::




Custom Search