More powershell

Discussion in 'Training & Development' started by zxspectrum, Jan 6, 2018.

  1. zxspectrum

    zxspectrum Terabyte Poster Forum Leader Gold Member

    2,094
    219
    244
    Has anyone ever created a powershell command/script and analysed it in real time, then looked at what actually took place? Kind of like the way you would use Wireshark to analyse data packets over the network?
     
    Certifications: BSc computing and information systems
    WIP: 70-680
  2. FlashDangerpants

    FlashDangerpants Byte Poster

    187
    57
    64
    Only as far as write-verbose, or write-debug with a debug preference of continue.
    Write-verbose, and have that output the current value of a variable at that point of the script, is usually good enough for me.
     
    Certifications: MCITP Exchange 2010, MCSA Svr 2012
    WIP: Exchange 2013
  3. Nyx

    Nyx Byte Poster

    192
    27
    25
    It's worth getting familiar with breakpoints in ISE - then you can check what every variable is at a given point. Can save you hours of troubleshooting, especially with more complicated scripts. Write-verbose is good as well - it just needs typing stuff and I'm too lazy for that.
    Both need some practice to use efficiently but worth the effort.
     
  4. dmarsh
    Honorary Member 500 Likes Award

    dmarsh Petabyte Poster

    4,306
    503
    259
    Last edited: Jan 9, 2018

Share This Page

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.