Bonjour je suis bloqué sur mon script qui me permet d'importer des rapports SSRS , j'ai du mal à régler le soucis pour mes sources de données !!
espérant que quelqu'un m'aide à régler ce soucis !!

Code powershell : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Get the (first) *design-time* name of the data sources that the 	   
	****# uploaded report references. Note that this might be different from 	   
	****# the name of the datasource as it is deployed on the report server!	   
	****$referencedDataSourceName = (@($rs.GetItemReferences($report.Path, "DataSource")))[0].Name	   
	*	   
	****# Change the datasource for the report to $targetDatasourceRef	   
	****# Note that we can access the types such as DataSource with the prefix 	   
	****# "SSRS" only because we specified that as our namespace when we 	   
	****# created the proxy with New-WebServiceProxy.
	    $proxyNamespace = $_.GetType().Namespace
	****$dataSource = New-Object ("$proxyNamespace.DataSource")  #SSRS.DataSource	   
	****$dataSource.Name = $referencedDataSourceName*** * # Name as used when designing the Report	   
	****$dataSource.Item = New-Object ("$proxyNamespace.DataSourceReference")	   
	****$dataSource.Item.Reference = $targetDatasourceRef # Path to the shared data source as it is deployed here.	
 
###
Impossible d’appeler une méthode dans une expression Null.
Au caractère H:\IMPORT.ps1:94 : 6
+         $proxyNamespace = $_.GetType().Namespace
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation : (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull
 
New-Object : Le type [.DataSource] est introuvable*: vérifiez que l'assembly dans lequel il se trouve est chargé.
Au caractère H:\IMPORT.ps1:95 : 20
+     ****$dataSource = New-Object ("$proxyNamespace.DataSource")  #SSRS.DataSource
+                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidType: (:) [New-Object], PSArgumentException
    + FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewObjectCommand
 
Propriété «*Name*» introuvable dans cet objet. Assurez-vous qu’elle existe et qu’elle peut être définie.
Au caractère H:\IMPORT.ps1:96 : 6
+     ****$dataSource.Name = $referencedDataSourceName*** * # Name as used when desig ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation : (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound
 
New-Object : Le type [.DataSourceReference] est introuvable*: vérifiez que l'assembly dans lequel il se trouve est chargé.
Au caractère H:\IMPORT.ps1:97 : 25
+     ****$dataSource.Item = New-Object ("$proxyNamespace.DataSourceReference")
+                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidType: (:) [New-Object], PSArgumentException
    + FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewObjectCommand
 
Propriété «*Reference*» introuvable dans cet objet. Assurez-vous qu’elle existe et qu’elle peut être définie.
Au caractère H:\IMPORT.ps1:98 : 6
+     ****$dataSource.Item.Reference = $targetDatasourceRef # Path to the shared data ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation : (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound