Saving PowerShell Results to the Clipboard–#SQLNewBlogger

Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers.

Working with results and manipulating them is always something I struggle with a bit in PowerShell. I’ve slowly been learning how to limit results to what I want and then save those out.

Recently, I was reading Learn dbatools in a Month of Lunches, and I learned something new. I can save results to the clipboard easily. Here’s an example:

Let’s say I want to get backups status. I’d run something like this, using the Get-DbaDbBackupHistory cmdlet:

2021-12-07 09_44_04-C__Users_Steve

I see results, but I might want to put this into a report or email that I send to others. I can certainly highlight this in the cmdline and copy it, but there’s an easier way.

I can pipe this to clip, and then I don’t see the results.

2021-12-07 09_44_08-C__Users_Steve

Then I can CTRL+V and paste this into notepad (or anywhere).

2021-12-07 09_44_12-_Untitled - Notepad

Super handy way to take information from the PoSh cmdline and ensure I get everything. Miss-highlighting when not paying attention has caused me problems before, especially when the results scroll off the screen. Highlighting a lot of information is hard, so using clip is a good trick.

SQLNewBlogger

This was a quick trick I learned while doing something else, so I decided to write a quick post. This took me about 5 minutes to put together.

You could do the same thing, showing how you’d use this in your job.

Posted in Blog | Tagged , , | 7 Comments

Daily Coping 20 Dec 2021

I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here. All my coping tips are under this tag.

Today’s tip is to look for something positive to say to everyone you speak to.

In general, I’m a fairly positive person and I think most others are as well. I smile at people, wave, greet them, and get positive responses overall.

I’m writing this a few days in advance, and while I didn’t see a lot, I did interact with a few people.

  • I stopped for coffee in the morning and made it a point to greet the person, ask how they were, smile, and wish them well.
  • I went to coach and greeted parents, thanking them for coming and supporting their kids. You’d think they’d all be there, but often I have only 1 of 2, or sometimes none there.
  • I did have to be hard on kids, but I did make a point of cheering things they did well and telling them where I liked their action or effort before asking for changes.
  • I made it a point to thank the staff at the venue, as well as ensure my team cleaned up their space.
  • Stopping for dinner, positive comments before and after the meal to staff, thanking them for their work and wishing them happy holidays.
  • Letting my son and wife know it was good to spend some time with them in the evening.

Often I find myself thanking others for things they would do, or are responsible for, regardless of what I do. I know I’ve worked in the service industry, and it is nice to have some recognize you, even when it’s your job.

Posted in Blog | Tagged , , | Comments Off on Daily Coping 20 Dec 2021

Tesla Accessories

This is part of a series that covers my experience with a Tesla Model Y.

The car is amazing, but like most cars I’ve purchased, I wanted to add a few things to it. This post looks at the things I purchased.

License Plate

I wanted to be legal in Colorado. I don’t need the hassle or reasons to get stopped, especially being a brown man in a very rural county. I ordered the Slipstream Bracket for 2022-2020 Tesla Model Y by ThatGrin LLC. It clips onto the front air dam bracket, and then has screws that prevent it from coming loose. I think it’s quite a neat design, made of metal, and seems very secure.

I made a specific installation video for this one.

Sunglasses

I usually want sunglasses around in the strong Colorado sun, and I like to keep a spare pair or two in the car. In my X5, I had no good place to keep them, but did buy a cheap visor clip that worked OK. Actually, it didn’t and broke. I think I bought 4 or 5 of them across the last 8 years.

For the Model Y, I went on Etsy and tried a couple of clips. I don’t know exactly who I got them from, but they are like this one, a 3D printed item. I used a trim tool to get them above the visor, and I ordered 3. I keep two pairs of my glasses in here and then an open holder for the passenger.

So far they work great, though only for sunglasses with thick arms.

Organization

Inside the car are some big spaces for things. Two large console buckets. The front one also has the USB-C plugs, so I did two things here.

First, a USB adapter that plugs into the 2 “C” plugs and gives me two Cs and two A (3.0) plugs. It works well, and so far it’s just holding a short A->microB cord for my headphones to charge. Once in awhile, like two times in three months, I get a notice on the car to unplug and replug it back in. Not sure why, but it hasn’t been a big issue.

I also got a console organizer for the front space. It slides on brackets and is hidden most of the time, but I have the registration, some change, and a few pens in there. It’s handy, and nice to have.

I got cupholder inserts as well. I often have water, soda, or coffee, and these are easier to clean than anything else. They work OK, but larger cups slip them out, so I have to remember to twist and pull out the cup. I had a couple coffee leaks, so I’m glad I have these. I should have something like this for the BMW.

I got a trunk organizer, which is something I’ve needed in other cars for years. Works great and keeps groceries from falling into the deep rear wells.

Interior Protection

I got a large sunshade, barely used. Too cool in the fall in CO, but it fits nice and folds up. So far, no complaints. The front window is huge, so you need a large screen.

I got some floor mats that are supposedly cut for the Model Y. I think this is a generic process now, and these were a lot less expensive than WeatherTechs. It shows. They work fine, they’ve protected from some water spills, but they don’t fit great, at least not on the driver’s side. Wouldn’t recommend.

I did get a Spigen screen protector for the display. It’s matte, and it definitely darkens things. It works fine with my sunglasses, and not sure it’s worse in direct sun. Might be better. Really, in bright sun, nothing works well.

I also got the lifting pads, though the Tesla service guy said these weren’t needed for most mechanics. I likely want them if I change tires or need to lift the car.

I also got the Basenor Mud Flaps. Two months in, they work great.

We got a pet cover for the backseat, since we like our dogs with us. It’s ok. Covers the seat, keeps dog hair off things. We somewhat wish we had the hammock style, but not sure as we use it more and 3 of us are in the car.

That’s about it. Right now we’re still thrilled with the car, nothing I’d worry about adding, so no purchases coming anytime soon.

A video of the accessories if you want to see what the items look like.

Posted in Blog | Tagged , | Comments Off on Tesla Accessories

The Tech of My Youth

I saw a note recently that Panasonic had a data breach.  There was a time I had a number of Panasonic products, from music players to telephones. My wife had them as a client and got a few swag items in the early 2000s. However, I don’t often buy electronic appliances, and I haven’t seen the Panasonic brand name in some time.

As I approach the end of one year and the beginning of another, I find myself nostalgic for brands that I used to seek out. I read a biography of Akio Morita, founder of Sony a long time ago and I admired their products. At some point, I had a rack of Sony gear in high school, including the double cassette deck. I bought my first TV, a Sony, in college. I can’t remember the last time I picked up or used something from them, having moved on to Apple for most of my music needs and Samsung for TVs.

Nokia and Motorola used to be the phones to buy, and they aren’t really in today’s conversations. Palm Pilot and Blackberry devices were on belts in purses everywhere. Today I know none in use.

Radio Shack was where I shopped regularly for all sorts of parts to fix things. I grew up with an Atari for games, a Commodore 64 for programming, and lots of floppy disks. I remember learning I could punch a hole in a disk case to make it double-sided. I used to drive to Blockbuster when I wanted to see a movie. I wish they had somehow found a way to transition and compete with Netflix.

I used to covet Sun Workstations, a huge company that no longer exists. I bought and assembled quite a few Compaq servers. One of my early jobs had me helping the boss use Alta Vista to search the burgeoning web on Netscape Navigator. For that matter, ESDI, IDE, and SCSI, and even spinning disks are no longer a part of my world.

As I walk down memory lane, I think about this thing that used to sit on my bedside table. From middle school until about 4 or five years ago, I had an “alarm clock” that woke me up in the morning. First no-name analog ones, then Sharp, Sony, and other digital brands. First for paper routes, then school, then work. Now I use a smart watch with a vibrating alarm. That alarm clock device is one piece of technology my wife is glad doesn’t exist anymore.

Steve Jones

Listen to the podcast at Libsyn, Stitcher, Spotify, or iTunes.

Posted in Editorial | Tagged | Comments Off on The Tech of My Youth