none
Как при выборе из объекта, отобразить все значения массива

    Вопрос

  • Доброго времени суток профи. Скажите, как мне, при выборе из объекта, отобразить все значения массива. Вот пример ниже, RemoteIpRanges в нем - это массив элементов. массив естественно отображается не полностью, а  мне надо как то отобразить полностью вместе с Identity, MaxInboundConnection и т.д.). 

    Get-ReceiveConnector | select Identity, MaxInboundConnection, MaxInboundConnectionPerSource, Bindings, RemoteIpRanges 


    8 февраля 2019 г. 7:54

Все ответы

  • -ExpandProperty , не?

    Get-ReceiveConnector | select  -ExpandProperty RemoteIpRanges 



    • Изменено Svolotch 8 февраля 2019 г. 8:50
    8 февраля 2019 г. 8:42
  • -не, мне надо другие поля так же видеть :)
    8 февраля 2019 г. 8:56
  • блин нет под рукой эксчи
    8 февраля 2019 г. 8:57
  • попробуйте так:

    Get-ReceiveConnector | select Identity, MaxInboundConnection, MaxInboundConnectionPerSource, Bindings, @{name='RemoteIpRanges';  Expression = {($_.RemoteIpRanges -join ";")}}

    я же правильно понял что "массив естественно отображается не полностью" это просто хрень с многоточием?

    Я не уверен что у вас там именно массив стрингов, но вот пример который делал у себя:

    тестировал на аутпуте get-module

    12:12:35 PS C:\temp> Get-Module
    
    ModuleType Version    Name                                ExportedCommands
    ---------- -------    ----                                ----------------
    Manifest   1.0.0.0    ActiveDirectory                     {Add-ADCentralAccessPolicyMember, Add-ADComputerServiceAccount, Add-ADDomainControllerPasswordReplicationPolicy, Add-ADFineGrainedPasswordPolicySubject...}
    Manifest   3.1.0.0    Microsoft.PowerShell.Management     {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Content...}
    Manifest   3.0.0.0    Microsoft.PowerShell.Security       {ConvertFrom-SecureString, ConvertTo-SecureString, Get-Acl, Get-AuthenticodeSignature...}
    Manifest   3.1.0.0    Microsoft.PowerShell.Utility        {Add-Member, Add-Type, Clear-Variable, Compare-Object...}
    Manifest   3.0.0.0    Microsoft.WSMan.Management          {Connect-WSMan, Disable-WSManCredSSP, Disconnect-WSMan, Enable-WSManCredSSP...}
    Script     1.2        PSReadline                          {Get-PSReadlineKeyHandler, Get-PSReadlineOption, Remove-PSReadlineKeyHandler, Set-PSReadlineKeyHandler...}
    
    
    12:17:50 PS C:\temp> get-module|select moduletype,@{name='ExportedCommands'; Expression = {(($_.ExportedCommands.values.name) -join ";")}}
    
    ModuleType ExportedCommands
    ---------- ----------------
      Manifest Add-ADCentralAccessPolicyMember;Add-ADComputerServiceAccount;Add-ADDomainControllerPasswordReplicationPolicy;Add-ADFineGrainedPasswordPolicySubject;Add-ADGroupMember;Add-ADPrincipalGroupMembership;Add-ADResourcePropertyListMember;Clear-ADAccountExpiration;Clear-ADClaimTransformLink;Disable-ADAccount;Disable-ADOptionalFeature;Enable-ADAccount;Enable-ADOptionalFeature;Get-ADAccountAuthorizationGroup;Get-ADAccountResultantPasswordReplicationPolicy;Get-ADAuthenticationPolicy;Get-ADAuthenticationPolicySilo;Get-ADCentralAccessPolicy;Get-ADCentralAccessRule;Get-ADClaimTransformPolicy;Get-ADClaimType;Get-ADComputer;Get-ADComputerServiceAccount;Get-ADDCCloningExcludedApplicationList;Get-ADDefaultDomainPasswordPolicy;Get-ADDomain;Get-ADDomainController;Get-ADDomainControllerPasswordReplicationPolicy;Get-ADDomainControllerPasswordReplicationPolicyUsage;Get-ADFineGrainedPasswordPolicy;Get-ADFineGrainedPasswordPolicySubject;Get-ADForest;Get-ADGroup;Get-ADGroupMember;Get-ADObject;Get-ADOptionalFeature;Get-ADOrganizationalUnit;Get-ADPrincipalGroupMembership;Get-ADReplicationAttributeMetadata;Get-ADReplicationConnection;Get-ADReplicationFailure;Get-ADReplicationPartnerMetadata;Get-ADReplicationQueueOperation;Get-ADReplicationSite;Get-ADReplicationSiteLink;Get-ADReplicationSiteLinkBridge;Get-ADReplicationSubnet;Get-ADReplicationUpToDatenessVectorTable;Get-ADResourceProperty;Get-ADResourcePropertyList;Get-ADResourcePropertyValueType;Get-ADRootDSE;Get-ADServiceAccount;Get-ADTrust;Get-ADUser;Get-ADUserResultantPasswordPolicy;Grant-ADAuthenticationPolicySiloAccess;Install-ADServiceAccount;Move-ADDirectoryServer;Move-ADDirectoryServerOperationMasterRole;Move-ADObject;New-ADAuthenticationPolicy;New-ADAuthenticationPolicySilo;New-ADCentralAccessPolicy;New-ADCentralAccessRule;New-ADClaimTransformPolicy;New-ADClaimType;New-ADComputer;New-ADDCCloneConfigFile;New-ADFineGrainedPasswordPolicy;New-ADGroup;New-ADObject;New-ADOrganizationalUnit;New-ADReplicationSite;New-ADReplicationSiteLink;New-ADReplicationSiteLinkBridge;New-ADReplicationSubnet;New-ADResourceProperty;New-ADResourcePropertyList;New-ADServiceAccount;New-ADUser;Remove-ADAuthenticationPolicy;Remove-ADAuthenticationPolicySilo;Remove-ADCentralAccessPolicy;Remove-ADCentralAccessPolicyMember;Remove-ADCentralAccessRule;Remove-ADClaimTransformPolicy;Remove-ADClaimType;Remove-ADComputer;Remove-ADComputerServiceAccount;Remove-ADDomainControllerPasswordReplicationPolicy;Remove-ADFineGrainedPasswordPolicy;Remove-ADFineGrainedPasswordPolicySubject;Remove-ADGroup;Remove-ADGroupMember;Remove-ADObject;Remove-ADOrganizationalUnit;Remove-ADPrincipalGroupMembership;Remove-ADReplicationSite;Remove-ADReplicationSiteLink;Remove-ADReplicationSiteLinkBridge;Remove-ADReplicationSubnet;Remove-ADResourceProperty;Remove-ADResourcePropertyList;Remove-ADResourcePropertyListMember;Remove-ADServiceAccount;Remove-ADUser;Rename-ADObject;Reset-ADServiceAccountPassword;Restore-ADObject;Revoke-ADAuthenticationPolicySiloAccess;Search-ADAccount;Set-ADAccountAuthenticationPolicySilo;Set-ADAccountControl;Set-ADAccountExpiration;Set-ADAccountPassword;Set-ADAuthenticationPolicy;Set-ADAuthenticationPolicySilo;Set-ADCentralAccessPolicy;Set-ADCentralAccessRule;Set-ADClaimTransformLink;Set-ADClaimTransformPolicy;Set-ADClaimType;Set-ADComputer;Set-ADDefaultDomainPasswordPolicy;Set-ADDomain;Set-ADDomainMode;Set-ADFineGrainedPasswordPolicy;Set-ADForest;Set-ADForestMode;Set-ADGroup;Set-ADObject;Set-ADOrganizationalUnit;Set-ADReplicationConnection;Set-ADReplicationSite;Set-ADReplicationSiteLink;Set-ADReplicationSiteLinkBridge;Set-ADReplicationSubnet;Set-ADResourceProperty;Set-ADResourcePropertyList;Set-ADServiceAccount;Set-ADUser;Show-ADAuthenticationPolicyExpression;Sync-ADObject;Test-ADServiceAccount;Uninstall-ADServiceAccount;Unlock-ADAccount
      Manifest Add-Computer;Add-Content;Checkpoint-Computer;Clear-Content;Clear-EventLog;Clear-Item;Clear-ItemProperty;Clear-RecycleBin;Complete-Transaction;Convert-Path;Copy-Item;Copy-ItemProperty;Debug-Process;Disable-ComputerRestore;Enable-ComputerRestore;Get-ChildItem;Get-Clipboard;Get-ComputerInfo;Get-ComputerRestorePoint;Get-Content;Get-ControlPanelItem;Get-EventLog;Get-HotFix;Get-Item;Get-ItemProperty;Get-ItemPropertyValue;Get-Location;Get-Process;Get-PSDrive;Get-PSProvider;Get-Service;Get-TimeZone;Get-Transaction;Get-WmiObject;Invoke-Item;Invoke-WmiMethod;Join-Path;Limit-EventLog;Move-Item;Move-ItemProperty;New-EventLog;New-Item;New-ItemProperty;New-PSDrive;New-Service;New-WebServiceProxy;Pop-Location;Push-Location;Register-WmiEvent;Remove-Computer;Remove-EventLog;Remove-Item;Remove-ItemProperty;Remove-PSDrive;Remove-WmiObject;Rename-Computer;Rename-Item;Rename-ItemProperty;Reset-ComputerMachinePassword;Resolve-Path;Restart-Computer;Restart-Service;Restore-Computer;Resume-Service;Set-Clipboard;Set-Content;Set-Item;Set-ItemProperty;Set-Location;Set-Service;Set-TimeZone;Set-WmiInstance;Show-ControlPanelItem;Show-EventLog;Split-Path;Start-Process;Start-Service;Start-Transaction;Stop-Computer;Stop-Process;Stop-Service;Suspend-Service;Test-ComputerSecureChannel;Test-Connection;Test-Path;Undo-Transaction;Use-Transaction;Wait-Process;Write-EventLog;gcb;gin;gtz;scb;stz
      Manifest ConvertFrom-SecureString;ConvertTo-SecureString;Get-Acl;Get-AuthenticodeSignature;Get-CmsMessage;Get-Credential;Get-ExecutionPolicy;Get-PfxCertificate;New-FileCatalog;Protect-CmsMessage;Set-Acl;Set-AuthenticodeSignature;Set-ExecutionPolicy;Test-FileCatalog;Unprotect-CmsMessage
      Manifest Add-Member;Add-Type;Clear-Variable;Compare-Object;Convert-String;ConvertFrom-Csv;ConvertFrom-Json;ConvertFrom-String;ConvertFrom-StringData;ConvertTo-Csv;ConvertTo-Html;ConvertTo-Json;ConvertTo-Xml;Debug-Runspace;Disable-PSBreakpoint;Disable-RunspaceDebug;Enable-PSBreakpoint;Enable-RunspaceDebug;Export-Alias;Export-Clixml;Export-Csv;Export-FormatData;Export-PSSession;Format-Custom;Format-List;Format-Table;Format-Wide;Get-Alias;Get-Culture;Get-Date;Get-Event;Get-EventSubscriber;Get-FormatData;Get-Host;Get-Member;Get-PSBreakpoint;Get-PSCallStack;Get-Random;Get-Runspace;Get-RunspaceDebug;Get-TraceSource;Get-TypeData;Get-UICulture;Get-Unique;Get-Variable;Group-Object;Import-Alias;Import-Clixml;Import-Csv;Import-LocalizedData;Import-PSSession;Invoke-Expression;Invoke-RestMethod;Invoke-WebRequest;Measure-Command;Measure-Object;New-Alias;New-Event;New-Object;New-TimeSpan;New-Variable;Out-File;Out-GridView;Out-Printer;Out-String;Read-Host;Register-EngineEvent;Register-ObjectEvent;Remove-Event;Remove-PSBreakpoint;Remove-TypeData;Remove-Variable;Select-Object;Select-String;Select-Xml;Send-MailMessage;Set-Alias;Set-Date;Set-PSBreakpoint;Set-TraceSource;Set-Variable;Show-Command;Sort-Object;Start-Sleep;Tee-Object;Trace-Command;Unblock-File;Unregister-Event;Update-FormatData;Update-List;Update-TypeData;Wait-Debugger;Wait-Event;Write-Debug;Write-Error;Write-Host;Write-Information;Write-Output;Write-Progress;Write-Verbose;Write-Warning;ConvertFrom-SddlString;Format-Hex;Get-FileHash;Import-PowerShellDataFile;New-Guid;New-TemporaryFile;CFS;fhx
      Manifest Connect-WSMan;Disable-WSManCredSSP;Disconnect-WSMan;Enable-WSManCredSSP;Get-WSManCredSSP;Get-WSManInstance;Invoke-WSManAction;New-WSManInstance;New-WSManSessionOption;Remove-WSManInstance;Set-WSManInstance;Set-WSManQuickConfig;Test-WSMan
        Script Get-PSReadlineKeyHandler;Get-PSReadlineOption;Remove-PSReadlineKeyHandler;Set-PSReadlineKeyHandler;Set-PSReadlineOption;PSConsoleHostReadline
    

    • Изменено Svolotch 8 февраля 2019 г. 9:21
    8 февраля 2019 г. 9:15