I'm trying to get an output from a powershell command. However The output is truncated.
我正在尝试从powershell命令获取输出。但是输出被截断。
[PS] >Get-QADGroup "admins"
Name Type DN
---- ---- --
Admins group CN=Admins,OU=Profiles,OU=Groups,OU=Sw...
How do I tell this shell wannabe not to truncate its data?
我怎么告诉这个shell想要截断它的数据呢?
3 个解决方案
#1
24
Get-QADGroup "admins" | Ft -autosize -wrap
If space console is to small try:
如果太空控制台是小尝试:
Get-QADGroup "admins" | Fl name,type,dn
edit:
编辑:
Get-QADGroup "admins" | Ft -autosize | out-string -width 4096
#2
1
This will prevent all output result truncating -
这将阻止所有输出结果截断 -
-
Run this and first to view the default enumeration limit.
$FormatEnumerationLimit
运行此命令并首先查看默认的枚举限制。中将$ FormatEnumerationLimit
-
Set the above to -1 to avoid truncating
$FormatEnumerationLimit=-1
将上面的值设置为-1以避免截断$ FormatEnumerationLimit = -1
#3
0
I had the same issue - I increased the buffer size and window size of the powershell window I was running the commands in. It did not truncate in the powershell window nor the output file.
我有同样的问题 - 我增加了运行命令的powershell窗口的缓冲区大小和窗口大小。它没有在powershell窗口中截断,也没有在输出文件中截断。
#1
24
Get-QADGroup "admins" | Ft -autosize -wrap
If space console is to small try:
如果太空控制台是小尝试:
Get-QADGroup "admins" | Fl name,type,dn
edit:
编辑:
Get-QADGroup "admins" | Ft -autosize | out-string -width 4096
#2
1
This will prevent all output result truncating -
这将阻止所有输出结果截断 -
-
Run this and first to view the default enumeration limit.
$FormatEnumerationLimit
运行此命令并首先查看默认的枚举限制。中将$ FormatEnumerationLimit
-
Set the above to -1 to avoid truncating
$FormatEnumerationLimit=-1
将上面的值设置为-1以避免截断$ FormatEnumerationLimit = -1
#3
0
I had the same issue - I increased the buffer size and window size of the powershell window I was running the commands in. It did not truncate in the powershell window nor the output file.
我有同样的问题 - 我增加了运行命令的powershell窗口的缓冲区大小和窗口大小。它没有在powershell窗口中截断,也没有在输出文件中截断。