Hi,
i tried to export in csv format all sessions.
I want to try your script,
$s = Get-RDM-Session |
where {$_.Session.Kind -eq "RDPConfigured"} |
foreach { New-Object PSObject -Property @{
Name = $_.Session.ToString()
Domain = ($_.Session.GetProperty("MetaInformation", "Domain"))
Architecture = ($_.Session.GetProperty("MetaInformation", "Architecture"))
OS = ($_.Session.GetProperty("MetaInformation", "OS"))
Description = ($_.Session.GetProperty("", "Description"))
}};
## save to csv, the field names are used as column headers.
$s | export-csv c:\temp\sessions.csv -notypeinformation;
but i have an issue:
PS C:\Travail\RDM\script_ps> .\export-csv.ps1
Get-RDM-Session : Le terme «Get-RDM-Session» n'est pas reconnu comme nom d'applet de commande, fonction, fichier de script ou programme exécutable. Vérifiez l'orthographe du nom, ou si un
chemin d'accès existe, vérifiez que le chemin d'accès est correct et réessayez.
Au caractère C:\Travail\RDM\script_ps\export-csv.ps1:1 : 6
+ $s = Get-RDM-Session | where {$_.Session.Kind -eq "RDPConfigured"} |
+ ~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-RDM-Session:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Export-Csv : Impossible de lier l'argument au paramètre « InputObject », car il a la valeur Null.
Au caractère C:\Travail\RDM\script_ps\export-csv.ps1:10 : 6
+ $s | export-csv c:\temp\sessions.csv -notypeinformation;
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData : (
[Export-Csv], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.ExportCsvCommand
PS C:\Travail\RDM\script_ps>
i use rdm in 12.0.8.0 version with windows 7
can you help me ?
regads
Vincent