PS SQLSERVER:\sqlregistration> Get-ChildItem 'SQLSERVER:\SQLREGISTRATION' -Recurse | export-csv reorder.csv
Export-Csv : Cannot open file because the current provider (SqlServer) cannot open a file
.
At line:1 char:65
+ Get-ChildItem 'SQLSERVER:\SQLREGISTRATION' -Recurse | export-csv <<<< reorder.csv
+ CategoryInfo : InvalidArgument: (:) [Export-Csv], PSInvalidOperationExcep
tion
+ FullyQualifiedErrorId : ReadWriteFileNotFileSystemProvider,Microsoft.PowerShell.Co
mmands.ExportCsvCommand
答案 0 :(得分:4)
您在sqlserver提供程序上,不允许您创建文件。致电
Get-ChildItem 'SQLSERVER:\SQLREGISTRATION' -Recurse | export-csv C:\reorder.csv