Writing scripts and functions we sometimes just want something to do or be one way with one purpose.
I have mulled over things and re-coded tools to work with different things. The one thing I find to be the best in every situation is always script or code with objects in mind so that the rescuing of old code is easier.
Yeah it takes more time to do this and ensure that you aren’t reinventing the wheel.
The reality of even using PowerShell is to make your life easier. You want to ensure the process you use is refined enough to keep management at bay on your decisions and feeling confident about your solutions by reassuring them with facts and successes.
So instead of making a paper air plane that only flys in circles. Create a small engine that can fly a tiny drone and can be controlled with a strict protocol.
You may think to your self drones are cumbersome and you don’t always need to fly things but, hang on! That tiny engine can go in to a tiny car and use the same controller and so on.
I don’t want you to only be a pilot but an engineer that can reuse useful creations. Explore your horizons during down time, explore modules and other scripts to become inspired.
Take what you see and make it your foresight for newer projects. Have you taken the time to create something lately and really make it reusable?
I was looking into google cloud to explore some options for a client to leverage some automation elements and was very interested until I learned of the lack of PowerShell support.
For the life of me I cannot understand Google’s purpose to neglect populations of individual platforms and still want professionals to take their platform seriously as their competitors. Okay I’m done complaining.
It is something I sincerely hope Google notices and rectifies so that it supports PowerShell as it installs on all OS genres. To leave out automation potential is saying I’m just doing this cloud thing to be like everyone else.
So in my humble opinion there is simply no Power in google cloud shell.
How many others are fine learning python and writing shorthand and okay with not embracing a world where we take any OS as a catalyst that connects your tools to all the cloud providers.
I have always wanted to get my mittens on a mobile iteration of the prized management tool.
I made sure I got a mobile sized tablet that would allow for me to use this on the go. Remote Desktop, Team viewer, Screen connect, VNC just dont respond like a native client. Wouldn’t it be something to truly take your scripting on the road with you?!
I believe this is possible now with todays mboile phones and tablets.
What are your thoughts and your ideal access to management and automation tools?
There is a push to go to Visual Studio Code, which is a plug-in rather than the PowerShell.exe having its own dedicated ISE application. It can be seen as smart, others see this as allowing for distractions.
I do not like the syntax in the responses of commands, I don’t like the lack of the warm tab complete I am used to, and app stability. I complain about ISE lacking UI updates, but I hate the clumsy attempts to cram PowerShell into VS Code. It’s great if you want to do things across OS platforms.
I do however love VS Code for web coding and even do other one off projects.
I find the built in ISE to be the reliable of the two. It doesn’t ask me to update every time I launch it to do work.
I will say you lose some of the cool features if you are managing an updated landscape. For companies living in the past, PowerShell ISE is still relevant for interactions of windows 10 and server 2016 and you save space and can relax knowing you aren’t breaking unwritten standards as far as automation or script development.
What’s your favorite ISE? Let me know in the comments below.
There is a special place in my heart for tab-completion. Just invoking it brings peace of mind.
There are a lot of people that feel like they are retired school spelling-bee champs. I tend to like the command line validation. It sounds crazy but even when I spell it out all the way it feel like magic to watch camel case completely reshape the letters and when it doesn’t I feel this shame of losing my mojo!
I think having this as a fail-safe or a second way to verifying your typing prowess. It looks awesome when your boss is visiting your desk and you’re showing him the latest update to your project in a quick query or a possession to test connectivity to a server and it’s services and processes. It is massive when you install, update a role or feature.
Take some time and consider if you are using all the tools PowerShell can do and you can do this faster with tab-complete as it works with your own custom built functions and that adds to your highly stacked brownie points lol.
Thanks for reading and let the shell enlightened you.
It’s strange how often we talk about history and how many of us actually get it.
Today 42 years ago my brother was born on this day as mother’s first child, she celebrated her Mother’s Day two days in a row.
Although he passed away before his time. I will never forget how he affected my history. Without him or my mother I’m not sure we would be sharing or relating on this technical blog. I am thankful. So saying that I know you have to be thankful for the ups and downs and even mistakes that sort out where we end up or the solutions we find in life.
Get-history something that you have to go back and explore and see your mistakes. Your typos and your solutions that may be a reusable philosophy to include in your next project or script. I think using a PowerShell command box is just as important as using an ISE wether it is the OS built in one, visual studio code, notepad++, or even Sapian power Script.
As a challenge I want you to get-history and share your third from last command in the comments. Don’t include sensitive data. Just the command. Sounds silly but it could be fun.
Mine is Restart-Computer -Force
Looking back I think my computer wasn’t performing well after a long zoom meeting. I think it makes me want to see if there is anything in the system log. Had I not challenged myself to do this first. I may not have looked back at an opportunity to learn.
First start with an additional module known as “importExcel” (the link to the psgallery details is there)
Truth be told you can also Export to excel as well even though the name doesn’t give that away.
Script Time!!!! (I actually had to type this because I say this in real life in response to real challenges and tasks.
Here is a script that takes the performance counters from a machine, note this is different depending on the OS and the hardware. you can explore performance counters inside of the performance monitor tool searchable inside the start menu.
Recently I was Reading a write-up on API and transforming data with Python.
I know this is a blog about PowerShell right? However I want to point out that python is a scripting environment and actually more involved to get started so the restraints of that for a beginner is constricting (Pun intended).
PowerShell is on every windows computer since windows XP and PowerShell version 7.0 is now available for install on all Major OS including Mac, Linux and even IoT and its backwards compatible to windows 7.
If you are interested in a python project go here, because it will satisfy your needs and also take hours!
Here is a quick post about setting the max memory in SQL Server so that you got no worries if you forgot to set this at installation.
I get it we all been there before. This was a step I over looked when starting out with SharePoint many years ago. However I did recently have this come up in a discussion and I remembered and thought I should do this in PowerShell to exercise my scripting technique. It seems to be best used as an expression.
Test this in a dev environment first and not production to ensure compatibility with versions and the .net framework: