Powershell IS for the desktop tech as well
Every day some one tends to ask me if there is a simpler way to do task A or B, and the minute I mention PowerShell the response is almost always the same, “yea i have been meaning to learn that but. This really saddens me for 2 reasons,
- Because PowerShell can and does make your life simpler
- i am already seeing peoples jobs get replaced when they fall behind in the skill and as more and more companies move closer to automation it will only get worse.
It saddens me even more so when I see co-workers who i have taken the time to write the scripts to improve the speed of resolution not use them either. then wounder why i am able to fix the same issue in a fraction of the time they have.
As you probably guessed from the title i am talking about people in the world of desktop technicians. the , in my opinion, unsung heroes of IT support.
Powershell is not just for system admins, the local desktop guy can make his life much simpler by scripting out the simple stuff to save you time and money.
here is an example,
one of our clients has an issue with network printers getting jammed up if they do not print PDF documents as an image, once I had to do 3 or 4 of these i decided this took to long to fix, since we have to stop the print spooler, delete all the Print jobs and then restart then spooler again, and when you have 20-30 PCs to do this on i am sue you can guess this takes up a lot of our time. so I wrote a script to solve the issue, and it is really simple as well
`/**
- function Start-Error49FixV3
{
[CmdletBinding()]
[OutputType([int])]
Param
(
# Enter the Hostname of the Target PC(s)
[Parameter(Mandatory=$true,
ValueFromPipelineByPropertyName=$true,
Position=0)]
[string[]]$Computername
)
Begin
{
}
Process
{
foreach ($Computer in $Computername)
{
Invoke-Command -computername $Computer -ScriptBlock {Stop-Service -Displayname “Citrix Print Manager Service”}
Invoke-Command -computername $Computer -ScriptBlock {Stop-Service -Name spooler -force}
Remove-Item -Path \$Computer\c$\Windows\System32\spool\PRINTERS* -recurse
Invoke-Command -computername $Computer -ScriptBlock {Start-Service -Displayname “Citrix Print Manager Service”}
Invoke-Command -computername $Computer -ScriptBlock {Start-Service -Name spooler}
Get-Service -Computername $Computer -name Spooler | Select name,status,$Computer | sort $Computer |format-table -AutoSize
Get-Service -Computername $Computer -Displayname “Citrix Print Manager Service” | Select name,status,$Computer | sort $Computer |format-table -AutoSize
}
}
End
{
}
}
*/
`This simple line of Code was able to turn this process from being done after hours to a normall 20 minute fix for most of the clients locations, not only allowing us to get back to other issues faster but also helpinn to make the client happy since they no longer ad to wait a day for the printer to get backup and running.
This is just one example, i could fill up your PC with other even simpler examples but instead i would rather show you. so over the course of the blog I am going to introduce you to a verity of topics from how to right clean code, how to test it safely, and lastly how to get a devops platform discussion into your work place for this so your code can get properly validated and confirmed safe in the environment.
also if you have any questions on anything to do with PowerHhell feel free to drop it in the comments below or e-mail me @ Brian.Bourque@live.com
until next time guys happy scripting
Related Articles
PowerShell Escape Room
PowerShell Escape Room by Michiel Hamers
by Michiel Hamers
https://about.me/michielhamers/
Why on earth you want to create an Escape Room with PowerShell as backend?
I’ve always been a fan of escape rooms, so I decided to create my own for my kids. I wanted to make it something that would be challenging and fun for them, but also educational. I decided to use PowerShell as the backend for the escape room, as I’m a PowerShell developer and I thought it would be a great way to learn more about the language.
The first step was to design the rooms. I wanted to make sure that there were a variety of puzzles and challenges that my kids would have to solve. I also wanted to make sure that the rooms were visually appealing and engaging. Once I had the rooms designed, I started building them.
I used a variety of materials to build the rooms, including wood, cardboard, and fabric. I also used a few electronic components, such as a USB extension cable with a switch and a 3-button keyboard. The USB extension cable with a switch was used to create a physical button that my kids could press to solve one of the puzzles. The 3-button keyboard was used to enter the code that my kids had to find to solve another puzzle.
I also used a few websites to create rebus puzzles that my kids had to solve. I printed out the rebus puzzles and placed them around the rooms. Once my kids had solved all of the puzzles, they were able to enter the code on a single screen to escape the room.
In this blog post, we’ll delve into the process of creating an engaging PowerShell escape room for the global PowerShell community. We’ll emphasize the significance of storytelling and provide a detailed breakdown of the PowerShell structure used for the escape room.
Microsoft Graph PowerShell Module: Getting Started Guide
Microsoft Graph PowerShell Module: Getting Started Guide
by Jeff Brown
Microsoft is retiring the Azure AD Graph API sometime after June 30, 2023 (announcement). This retirement includes the Azure AD PowerShell module. In its place, Microsoft has released the Microsoft Graph PowerShell module. The Microsoft Graph PowerShell module is the next-generation way of managing Microsoft cloud services using PowerShell. If you have used MSOnline or Azure AD PowerShell in the past, you’ll need to read on to learn about this new module.
ICYMI: PowerShell Week of 08-October-2021
Topics include VMWare, Windows 11, Web Reports and more…
Special thanks to Robin Dadswell, Prasoon Karunan V, Kiran Patnayakuni and Kevin Laux
How to gather your vCenter inventory data with this VMware PowerShell script
by Scott Matteson on 7th October
Inventory reports are a common request when administering a VMware vCenter environment. Learn how this VMware PowerShell script can make such requests quick and easy
Building a Web Report in PowerShell, use the -Force Luke
by Chris Noring on 8th October
