Skip to main content

Powershell Quickee

As this title rolled off my fingers it made me laugh a little.

But hey, isn't everything in PowerShell a little quicker?  At least that is the intent.  Over the past few years I keep dabbling in PowerShell from time to time.  I have just enough experience to know what can reasonably be done in the tool - without over extending it.  <soapbox> It looks like there are some people who take this tool and use it to bang every nail they have.  But that is another blog entry. </soapbox>

Here is the script I crufted up today for showing me all the services that are on a server set to run at startup (aka Automatic) and yet are NOT running now.

I was using the get-service cmdlet but it did not seem to be return the StartMode and State properties from a remote server (works locally fine).  So I Googled up an alternative that uses WMI.


Comments

Popular posts from this blog

Suddenly I Need to Think About My Safety

Personal safety has changed for me.  I have not posted much, if anything, about my experience as a transgender person. Mostly because I am a private person. If you want to know why I don't like condiments, no problem. But at work or on social media, I tend to separate my private life from my public life . I think it's no different than people not bringing up topics like their marriage or conceiving a child; it's about having boundaries. Boundaries are about safety. At work, boundaries support myself and those I interact with. Who knows what is going on in someone's life that will trigger them and make them feel unsafe. That doesn't mean I suppress my private life or who I am, but I will not push it onto others. Like in a previous post, I don't know what is happening in anyone else's life, and I respect that they may want to keep it that way. Building on boundaries...some folks no longer have boundaries; they are willing to say almost anything, especially on ...

Who I Work With is a Choice

Since leaving Amazon, I have been recharging and considering what I want to take on next and with whom. I followed a similar process in 2013 when I last looked for my next opportunity. Then, I gathered a list of the top 10 companies I respected and focused my search on those. I needed to align my principles with the companies that aligned with them. This led me to also form a list of companies that didn't align with my principles and exclude them from my search. As a result, I passed up some well-paying opportunities. For instance, Amazon was on the list in 2013 because of my experience with no-hassle returns and Amazon Prime. Secondarily, it was the technology, tools, and innovation. A lot has changed since 2013, including my prioritization of principles. For instance, after the 2016 election, I am paying more attention to politics. It's not a party affiliation but rather a candidate and their policies. It is a contradiction to say you support me as a transgender person and th...

Trying out AI - Rebalancing my Investments

I keep looking for ways to leverage AI both at work and in my personal life. Recently, I asked for help rebalancing my portfolio. The following is a series of prompts that I used to get there. The first step was to document my holdings. I have accounts across several management companies and about 100 different assets. I tried to export them from each company, but none had an export feature. This is where I started using ChatGPT to parse my statements and export them as a table.  Using the attached investment account statement, extract the current holdings from the document and give them back to me as a CSV file.  I worked with ChatGPT to correct this, as it would only read a page of the data. We went back and forth several times before I got the results I needed, including looking up the expense ratio for every mutual fund and EFT. Next, I described how I wanted my portfolio to be rebalanced.     Balance my portfolio rooted in Nobel Prize-winning economic theor...