AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / computer / Perguntas / 1562048
Accepted
political science
political science
Asked: 2020-06-19 22:40:24 +0800 CST2020-06-19 22:40:24 +0800 CST 2020-06-19 22:40:24 +0800 CST

registro de saída do powershell em um arquivo

  • 772

Estou tentando usar um comando deixe https://docs.microsoft.com/en-us/powershell/scripting/samples/redirecting-data-with-out---cmdlets?view=powershell-7 conforme abaixo

    PS C:\WINDOWS\system32> Get-Process | Format-List | Out-Host -Paging | OutFile -FilePath C:\Users\didja\koera dutata\forum questions\out.txt
    OutFile : The term 'OutFile' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that
    the path is correct and try again.
    At line:1 char:48
    + Get-Process | Format-List | Out-Host -Paging | OutFile -FilePath C:\U ...
    +                                                ~~~~~~~
        + CategoryInfo          : ObjectNotFound: (OutFile:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException

PS C:\WINDOWS\system32> Get-Process | Format-List | Out-Host -Paging | OutFile -FilePath C:\Users\didja\koera dutata\forum questions\out.txt
OutFile : The term 'OutFile' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that
the path is correct and try again.
At line:1 char:48
+ Get-Process | Format-List | Out-Host -Paging | OutFile -FilePath C:\U ...
+                                                ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (OutFile:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

    PS C:\WINDOWS\system32> Get-Process | Format-List | Out-Host -Paging | OutFile -FilePath "C:\Users\didja\koera dutata\forum questions\out.txt"
    OutFile : The term 'OutFile' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that
    the path is correct and try again.
    At line:1 char:48
    + Get-Process | Format-List | Out-Host -Paging | OutFile -FilePath "C:\ ...
    +                                                ~~~~~~~
        + CategoryInfo          : ObjectNotFound: (OutFile:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException

PS C:\WINDOWS\system32> Get-Process |  Out-Host -Paging | OutFile -FilePath "C:\Users\didja\koera dutata\forum questions\out.txt"
OutFile : The term 'OutFile' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that
the path is correct and try again.
At line:1 char:35
+ Get-Process |  Out-Host -Paging | OutFile -FilePath "C:\Users\Danda K ...
+                                   ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (OutFile:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\WINDOWS\system32> Get-Process |  OutFile -FilePath "C:\Users\didja\koera dutata\forum questions\out.txt"
OutFile : The term 'OutFile' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that
the path is correct and try again.
At line:1 char:16
+ Get-Process |  OutFile -FilePath "C:\Users\didja\koera duta ...
+                ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (OutFile:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Qual é o erro no uso acima?

windows-10 powershell
  • 2 2 respostas
  • 108 Views

2 respostas

  • Voted
  1. Wasif
    2020-06-19T23:03:07+08:002020-06-19T23:03:07+08:00

    Acho que você está tentando fazer um Tee. Aqui está o que você precisa:

    Get-Process | Tee-Object "FilePath" | more
    
    • 1
  2. Best Answer
    spikey_richie
    2020-06-19T23:13:16+08:002020-06-19T23:13:16+08:00

    out-hoste out-filesão mutuamente exclusivos. Você precisa usar um ou outro.

    • 1

relate perguntas

  • O serviço de arbitragem USB da estação de trabalho VMware não inicia automaticamente

  • Como ativar o sensor de impressão digital no domínio e no diretório ativo do Linux

  • atalho do shell da área de trabalho no painel lateral do explorer

  • Por que não consigo enviar arquivos do Android para o Windows 10?

  • Abrir com em vários arquivos?

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Como posso reduzir o consumo do processo `vmmem`?

    • 11 respostas
  • Marko Smith

    Baixar vídeo do Microsoft Stream

    • 4 respostas
  • Marko Smith

    O Google Chrome DevTools falhou ao analisar o SourceMap: chrome-extension

    • 6 respostas
  • Marko Smith

    O visualizador de fotos do Windows não pode ser executado porque não há memória suficiente?

    • 5 respostas
  • Marko Smith

    Como faço para ativar o WindowsXP agora que o suporte acabou?

    • 6 respostas
  • Marko Smith

    Área de trabalho remota congelando intermitentemente

    • 7 respostas
  • Marko Smith

    O que significa ter uma máscara de sub-rede /32?

    • 6 respostas
  • Marko Smith

    Ponteiro do mouse movendo-se nas teclas de seta pressionadas no Windows?

    • 1 respostas
  • Marko Smith

    O VirtualBox falha ao iniciar com VERR_NEM_VM_CREATE_FAILED

    • 8 respostas
  • Marko Smith

    Os aplicativos não aparecem nas configurações de privacidade da câmera e do microfone no MacBook

    • 5 respostas
  • Martin Hope
    CiaranWelsh Como posso reduzir o consumo do processo `vmmem`? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Pesquisa do Windows 10 não está carregando, mostrando janela em branco 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    v15 Por que uma conexão de Internet gigabit/s via cabo (coaxial) não oferece velocidades simétricas como fibra? 2020-01-25 08:53:31 +0800 CST
  • Martin Hope
    fixer1234 O "HTTPS Everywhere" ainda é relevante? 2019-10-27 18:06:25 +0800 CST
  • Martin Hope
    andre_ss6 Área de trabalho remota congelando intermitentemente 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney Por que colocar um ponto após o URL remove as informações de login? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension Ponteiro do mouse movendo-se nas teclas de seta pressionadas no Windows? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca Todos os meus complementos do Firefox foram desativados repentinamente, como posso reativá-los? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK É possível criar um código QR usando texto? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 Altere o nome da ramificação padrão do git init 2019-04-01 06:16:56 +0800 CST

Hot tag

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve