Nathan_K

Forum Replies Created

Viewing 10 posts - 1 through 10 (of 79 total)
  • Author
    Posts
  • in reply to: WiFi Status #5913
    Nathan_KNathan_K
    Participant

      Try adding double-quotes to the output in the PowerShell script like shown in the attachment.

      in reply to: WiFi Status #5878
      Nathan_KNathan_K
      Participant

        See the attached for my current code, in case you have any variances you are wondering about.

        in reply to: WiFi Status #5875
        Nathan_KNathan_K
        Participant

          Hey Dirk,

          I wrote this for the newer versions of DesktopInfo that include embedded PS1 support and do not require external .ps1 files in a scripts folder. The [wifi-status.ps1] block should just be at the bottom of your .ini file and does not need to be in a separate .ps1 file.

          Also, all of the “'” need to be a single-quote. The code block in Glenn’s forums likes to convert them to html code instead.

          Hope that helps.
          -Nathan

          in reply to: WiFi Status #5859
          Nathan_KNathan_K
          Participant

            Was doing a little extra looking. The Band (2.4 GHz vs 5 GHz) is displayed in Windows 11, but does not appear to be reported in Windows 10, so that explains why it was blank. It’ll just show as “n/a” with the block above. Could also use the triple-brackets to make it not show up I guess.

            in reply to: WiFi Status #5858
            Nathan_KNathan_K
            Participant

              Insert the following block in between the If and where it starts defining variables.

              in reply to: PS1 section not working #5835
              Nathan_KNathan_K
              Participant

                Thanks Glenn.. I had made several revisions to the original PS1 since posting, so here’s the updated version as a block that works inside the .ini file.

                in reply to: Embedded PowerShell Scripts #5441
                Nathan_KNathan_K
                Participant

                  I think most of my issues were the single vs double quotes. I did figure out how to set the query inline as well.

                  parameters:-Command "& {$query='Local Fixed'; %bitlocker-status%}"

                  That seems to work correctly.

                  in reply to: Embedded PowerShell Scripts #5433
                  Nathan_KNathan_K
                  Participant

                    Here is my “SET-SECTION” block.

                    and

                    in reply to: Embedded PowerShell Scripts #5431
                    Nathan_KNathan_K
                    Participant

                      Here is my code block from the config. You can see the result in the attached screenshot.

                      CMD=interval:10,text:Local Fixed Disks,read-as-csv:1,csv-header:1,file:powershell.exe,parameters:.\scripts\BitLocker-Status.ps1 -query "Local Fixed",trim:1,show-window:0,color:ffbb77,chart:bar2 scale:linear max:100 series1:{{((%Size%-%FreeSpace%)/%Size%)*100}} threshold:90 0000FF,hide-no-result:1,display:%Name% {{%Size%-%FreeSpace%}}[1.0b]B / {{%Size%}}[1.0b]B ({{((%Size%-%FreeSpace%)/%Size%)*100}}[1.0d]% used) %chart%| BitLocker Status: %BitLocker%

                      That calls the external PS1. If I use the same line and replace the PS1 with my SET-SECTION variable, I get no output data. If I hard code “Local Fixed” into the PS block, I get all bad data.

                      in reply to: OSBUILD2 – Items Not Hidden #4724
                      Nathan_KNathan_K
                      Participant

                        Windows 2012 R2 doesn’t have that key. It wasn’t introduced until Windows 10 and even then not until 20H2. Before then, the ReleaseID key was used, which works fine in 2016 and 2019, but 2012 R2 doesn’t have that key either. I expected that since both keys are absent it would just mark it as “null” (or whatever value triggers the triple braces to work).

                      Viewing 10 posts - 1 through 10 (of 79 total)
                      Glenn's Page