错误说不允许空管道 [英] Error saying Empty pipeline is not allowed
问题描述
需要小帮助,当我尝试使用导出cmdlet导出结果时,它会给我一个错误,说明
不允许空管道,所以有人可以帮我要获得CSV格式的结果请。
Foreach($ user用户){Get-MsolUser -UserPrincipalName $ user.Emailaddress.trim()| ft UserPrincipalName,DisplayName,isLicensed,UsageLocation,Licenses} |
Export-Csv'C:\output.csv'NoType
Need small help , when i am trying to export the results with the export cmdlet its giving me an error saying
empty pipeline is not allowed , so can someone help me to get the results in CSV format please.
Foreach ($user in $users){ Get-MsolUser –UserPrincipalName $user.Emailaddress.trim()| ft UserPrincipalName, DisplayName, isLicensed, UsageLocation, Licenses} |
Export-Csv 'C:\output.csv' -NoType
谢谢
推荐答案
在关闭花括号后删除管道并尝试export-csv。
You remove the pipeline after the closing flower bracket and try export-csv.
Foreach(
Foreach (
用户在
users){Get-MsolUser -UserPrincipalName
users){ Get-MsolUser –UserPrincipalName
这篇关于错误说不允许空管道的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!