1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

More powershell

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

  1. zxspectrum

    zxspectrum Gigabyte Poster Premium Member

    1,803
    107
    159
    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

    106
    11
    39
    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

    149
    10
    15
    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

    dmarsh Terabyte Poster

    3,952
    361
    184
    Last edited: Jan 9, 2018

Share This Page

Loading...