Adam Bertram avatar

Using PowerShell to cast objects

17 hours ago | Adam Bertram

Learn how you can use PowerShell to cast objects like strings to datetime and integers and even get a glimpse into how to use type accelerators!

Mateusz Czerniawski avatar

Filter AD users with exclusion list and split into chunks

yesterday | Mateusz Czerniawski

The Story Recently I got a simple task - add a bunch (600+) of users from a specific OU to a specific AD Group. BUT - I was meant to add only users not members of other groups AND do it in waves (let’s say of 40 people) at once. As we were rolling out a new feature we wanted to be sure that some users would be skipped at first run. It shouldn’t be hard. Let’s see… Small steps First I need to declare some variables like location ($OUs) where all my user accounts are located, group to be added to ($GroupName) and the exclusion groups ($ExcludeGroups) which members should be skipped.

Rob Sewell avatar

PowerShell in SQL Notebooks in Azure Data Studio

2 days ago | Rob Sewell

I have done a lot of writing in the last few months but you see no blog posts! My wonderful friend Chrissy and I are writing “dbatools in a Month of Lunches” to be published by Manning. That has taken up a lot of my writing mojo. We have hit a little break whilst we […]

Dan Franciscus avatar

How almost failing my first programming class helped me learn PowerShell

2 days ago | Dan Franciscus

Many years ago when I first started out in my IT career, I decided to go back and take online classes to obtain a Bachelor’s degree. At the time, I was trying to decide what aspect of IT to focus on and I had the feeling that developing software would be the best avenue. There+ Read More The post How almost failing my first programming class helped me learn PowerShell appeared first on WinSysBlog.

Adam Bertram avatar

AppVeyor API & PowerShell: Getting Started

2 days ago | Adam Bertram

AppVeyor is a popular CI platform to automatically build and release software. Learn how to use the AppVeyor API and PowerShell together in this article.

Jonathan Medd avatar

Issue Removing SMB1 from Windows with Ansible

2 days ago | Jonathan Medd

As part of a large configuration script for Windows, and executed via Ansible, one step was to remove SMB1. The official Microsoft Guidance on removing SMB1 states to use Disable-WindowsFeature – https://support.microsoft.com/en-gb/help/2696547/detect-enable-disable-smbv1-smbv2-smbv3-in-windows-and-windows-server I didn’t think too much more of this and simply added the step to the configuration script.

Josh King avatar

Crouton #11 - Updating Toast Notifications, Gracefully

2 days ago | Josh King

Following the release of BurntToast v0.7.0 there were a couple of headline features that needed to be written about. Shoulder Taps had their time in the spotlight and now it's the turn of Updatable Toasts.

Gabriel Talavera avatar

Hyper-V: Conectar una maquina virtual a otro VMSwitch con PowerShell

2 days ago | Gabriel Talavera

Para conectar una máquina virtual a un VMSwitch distinto al que tiene asignada o asignarle uno por primera vez en caso de que no este conectada, se puede seguir el siguiente ejemplo. En primer lugar, verificar a que switch virtual está conectada la VM (si es que tiene alguno asignado):PS C:\Users\Administrador> get-vm -Name vm1 | Get-VMNetworkAdapterName IsManagementOs VMName SwitchName MacAddress Status IPAddresses---- -------------- ------ ---------- ---------- ------ -----------Adaptador de red False vm1 00155D581500 {Ok} {}En este caso se ve que el adaptador de esta VM no está conectado a ningún switch virtual.

Matt Bobke avatar

My Essential PowerShell Discovery Cmdlets

2 days ago | Matt Bobke

When I’m doing daily work in the shell, there are a number of cmdlets and associated arguments that I find myself typing often to discover new things and re-discover things that I’ve previously encountered. Maybe getting these written out with explanations and examples will help some of you while you learn PowerShell, however I do believe that these are useful regardless of your level of experience.

Git bisect and PowerShell

2 days ago

Inevitably when writing code there will be bugs, it’s just part of being human and writing code and especially true when the code gets complex. So when it occurs we need to track it down and fix it, which can be easy, but we often want to track down where the bug was introduced so we can figure out what caused it (especially for the more difficult to pinpoint bugs). As we’re all using source control this becomes easier with git and it’s extremely powerful bisect tool.

Dan Franciscus avatar

Introducing the Chocolatey Remote Management PowerShell GUI

2 days ago | Dan Franciscus

One of the things I love doing with Chocolatey is pushing out packages to my Windows clients remotely. With PowerShell remoting, I can do this myself and it works well but for help desk staff who do not use PowerShell regularly, this is a challenge. To help with this, I created a very simple PowerShell+ Read More The post Introducing the Chocolatey Remote Management PowerShell GUI appeared first on WinSysBlog.

Adam Bertram avatar

How to connect to Office 365 with PowerShell

3 days ago | Adam Bertram

To connect to Office 365, PowerShell can be a real pain. You have to constantly remember different commands and modules. Learn how to make it easier.

Adam Bertram avatar

The PowerShell parameter demystified

3 days ago | Adam Bertram

Learn how to build a PowerShell parameter for your functions with so much functionality, your coworkers will envy you in this extensive blog post.

Roberth Strand avatar

Using PowerShell to gather information from XML

4 days ago | Roberth Strand

Making a long backstory short, I was checking one of our local weather sites during one of the few warm summer days here in Northern-Norway. For most people, it ends there but I obviously started thinking that it would be so much easier to write a function that could check the weather for me. I head off to check their...

Brandon Olin avatar

Using PoshBot Middleware for Rate-Limiting Notifications

4 days ago | Brandon Olin

Recently, someone in the #ChatOps channel of the PowerShell Slack workspace asked if it’s possible to use PoshBot to send a message recommending people to use Slack threads if they send over (x) amount of messages in (y) amount of time. I suppose he wanted to encourage threaded conversations to reduce the clutter in his Slack workspace. Here’s the solution I sent him that I adapted from a Stack Overflow question about rate-limiting.

Przemyslaw Klys avatar

Executing hidden or private functions from PowerShell Modules

4 days ago | Przemyslaw Klys

When you write PowerShell modules, there's a high chance you will have conflicts with either existing system commands (you should avoid that) or with someone else's modules. There are also times when someone wants to use a private function from a module that only exports essential functions. Here's a couple of ways how to deal with those scenarios. The post Executing hidden or private functions from PowerShell Modules appeared first on Evotec.

Przemyslaw Klys avatar

Using Lansweeper with PowerShell to your advantage

5 days ago | Przemyslaw Klys

I'm on a tight deadline for one of the chapters for PowerShell Conference Book vol. 2. That means my brain wants me to do a lot of different things but writing that chapter. I've decided to write this simple PowerShell command that allows me to use Lansweeper in PowerShell. If you never heard of Lansweeper, it's a great inventory tool that can scan Windows, Linux, Network, Printers, and other types of assets gathering it all in SQL Database.

Kieran Jacobsen avatar

[Updated Module] Posh-SYSLOG v4.1.5 has been released

5 days ago | Kieran Jacobsen

A new version of the [Posh-SYSLOG](https://github.com/poshsecurity/AzurePublicIPAddresses/) module has been released. The purpose of this update is to provide better support when running on PowerShell Core.

Prateek Singh avatar

3 Ways to Create Custom TypeNames on PowerShell Objects

7 days ago | Prateek Singh

Hello, Today in this blog post we are going to take a look into, “How to Create or Add Custom TypeNames to PowerShell objects”. Making custom type names become very... The post 3 Ways to Create Custom TypeNames on PowerShell Objects appeared first on Ridicurious.

Przemyslaw Klys avatar

Getting Bitlocker and LAPS summary report with PowerShell

7 days ago | Przemyslaw Klys

Having Bitlocker and LAPS in modern Active Directory is a must. But just because you enable GPO and have a process that should say Bitlocker and LAPS are enabled doesn't mean much. Now and then you should verify things yourself. One of the Facebook users on PowerShell group just had this idea of exporting Bitlocker keys and then giving that list to his colleagues for manual verification. He wanted to do it half PowerShell and half manually.

Jonathan Medd avatar

Issues Installing SCVMM via Ansible and PowerShell

7 days ago | Jonathan Medd

While working on a scenario where I needed to automate the installation of SCVMM 2019, firstly via PowerShell scripts and then those scripts plugged into an Ansible playbook, I encountered some failures during the Ansible execution of the PowerShell scripts. These same scripts had worked fine when run locally on the Windows 2016 Server designated … Continue reading Issues Installing SCVMM vi

Adam Bertram avatar

Managing the Ghost API with PowerShell: Oh the Possibilities!

8 days ago | Adam Bertram

Leverage the power of the Ghost API and PowerShell to build and automate some sweet content publishing tasks!

Mike Robbins avatar

Install PowerShell 7 with Jeff Hicks’ PSReleaseTools Module

8 days ago | Mike Robbins

PowerShell version 7 is currently in preview and while it can be installed on Windows, Linux, and macOS, the examples shown in this blog article focus on installing it on a Windows based system, specifically Windows 10 using Windows PowerShell version 5 or higher which ships by default with Windows 10. Your mileage may vary with other operating systems, other versions of Windows, and/or other versions of Windows PowerShell.

Przemyslaw Klys avatar

Sending HTML emails with PowerShell and zero HTML knowledge required

8 days ago | Przemyslaw Klys

I saw this article by Altaro tweeted Building PowerShell Tools for MSPs: HTML Tables for Reporting, and it describes how you can create HTML emails with just a few lines of code. Luke created that article in 2018 (tweets from the archive I guess), but I just saw it now so thought I would make a slight comparison. In 2018 I would probably go the same way as shown by Luke Orellana, who takes a simple example of querying WMI to get disk drive sizes and send them over, formatted via Email.

Gabriel Talavera avatar

PowerShell: Cambiar el tipo de perfil de red en Windows

8 days ago | Gabriel Talavera

En ocasiones, al tratar de configurar WinRM para conexiones remotas con PowerShell, recibimos un error debido a que PowerShell considera inseguro realizar conexiones sobre una red pública. Para resolver esto es necesario modificar el perfil de red que Windows asigna a los adaptadores de red, a continuación se muestra como hacer este cambio.1-) Identificar el adaptador de red cuyo perfil necesitamo

Mateusz Czerniawski avatar

PowerShell Conference Europe - 2019

8 days ago | Mateusz Czerniawski

Memories This years PSConf was my fourth! First two times I was there as an attendee. Last year I was invited as a speaker and it seems I haven’t failed :grin: as I was invited this year again! This two times tought me a lot. And I’m not talking only about PowerShell - as the level of expertise, knowledge and kindness I’ve experienced there is above any imagination. I’m talking about being one of many.

Mike Robbins avatar

Import a Hyper-V Virtual Machine with PowerShell

9 days ago | Mike Robbins

I recently ran into a problem where an exported VM from Windows Server 2016 running Hyper-V wasn’t able to be imported on Windows Server 2019 running Hyper-V. When attempting to perform the import, the GUI stated “No virtual machines files found” as shown in the following image. This problem may have been due to using Hyper-V manager on a remote system running Windows Server 2012 R2, although the same system was used for the export.

Kieran Jacobsen avatar

What’s Coming up with AzurePublicIPAddresses

9 days ago | Kieran Jacobsen

Just a brief post to discuss the future of the AzurePublicIPAddresses PowerShell module.

Adam Bertram avatar

Active Directory Scripts Galore: Come and Get It!

10 days ago | Adam Bertram

If you need to automate just about anything in Active Directory, check out this long list of Active Directory scripts.

Mateusz Czerniawski avatar

ALTools initial version

10 days ago | Mateusz Czerniawski

Intro My recent projects are build around using Azure Log Analytics for storing operational or final results. This includes WEFTools or pChecksAD as well as some internal projects. If you haven’t tried storing logs in always-on, always available, very affordable Azure Logs solution - I highly recommend you try it! Because of this I decided to put Microsoft examples into a usable micro-module. As it is available on GitHub and PowerShell Gallery you can also use it.

Prateek Singh avatar

Download & Install All WSL Distros with PowerShell

10 days ago | Prateek Singh

Hey, Once again with a quick blog post something very generic but, useful for me when I am testing or fiddling around various Linux distribution packages on WSL. I am... The post Download & Install All WSL Distros with PowerShell appeared first on Ridicurious.

Jeff Hicks avatar

A PowerShell Proof of Concept with Windows Terminal

10 days ago | Jeff Hicks

I recently updated my Windows 10 systems to the 1903 release. One of the reasons is that I wanted to try out the new Windows Terminal preview. You can find it in the Windows Store. This is bleeding edge stuff and far from complete but promises to a great addition. Now you will be able […] Check out my PowerShell Essentials page https://jdhitsolutions.com/blog/essential-powershell-resources/

Dan Franciscus avatar

Using PowerShell Operators

10 days ago | Dan Franciscus

The post Using PowerShell Operators appeared first on WinSysBlog.

Andy Levy avatar

SQL Saturday Albany NY 2019

11 days ago | Andy Levy

I am pleased to announce that I will be presenting at SQL Saturday #855 in Albany, NY on July 20, 2019. Join me at 2 PM in room LC05 for “dbatools for the Uninitiated“ You’ve just inherited a large SQL Server estate, and next month’s merger will double the number of instances you’re responsible for. … Continue reading "SQL Saturday Albany NY 2019"The post SQL Saturday Albany NY 2019 appeared first on FLX SQL with Andy Levy.

Tommy Maynard avatar

PowerShell.org New Posts – 06/2019

11 days ago | Tommy Maynard

Here’s my PowerShell.org posts for June 2019! June 2019 PowerShellGet Find-Both – June 11, 2019

Adam Bertram avatar

Write PowerShell Tests with Pester: Getting Started

11 days ago | Adam Bertram

Learn how to get started from the basics testing PowerShell scripts with Pester and the only full-featured book on Pester, the PowerShell module.

Saggie Haim avatar

Background Jobs: Start-ThreadJob Vs Start-Job

12 days ago | Saggie Haim

PowerShell offered us the ability to run background jobs with the Start-Job cmdlet. Most of the cmdlet also have-AsJob switch to instantly run the cmdlet as a background job. This gives us the ability to perform an action on many objects quicker. The post Background Jobs: Start-ThreadJob Vs Start-Job appeared first on Saggie Haim.

Gabriel Talavera avatar

PowerShell: Determinar el historial de membresias de grupo en Active Directory

12 days ago | Gabriel Talavera

Hay ocasiones en donde es necesario conocer en que momento un usuario fué agregado a un grupo, en estos casos, esta información puede extraerse de Active Directory gracias a ciertos atributos existentes en los metadatos de replicación.PS C:\Users\Administrador>PS C:\Users\Administrador> $username = "juan"PS C:\Users\Administrador> $userobj = Get-ADUser $usernamePS C:\Users\Administrador>PS C:\Users\Administrador> Get-ADUser $userobj.

Prateek Singh avatar

Today I Learned: -ErrorAction Ignore

13 days ago | Prateek Singh

Hi Guys, this is a quick blog post on something that I learned today on PowerShell. Ashamed to say this… but I have never used -ErrorAction Ignore before, until today... The post Today I Learned: -ErrorAction Ignore appeared first on Ridicurious.

Jonathan Medd avatar

PSDayUK 28th September 2019

14 days ago | Jonathan Medd

Following on from the highly successful 1 day PowerShell conference events run in 2017 and 2018 this year we are heading out of London and up to the International Convention Centre in Birmingham. See full details below: We’re SO excited to announce the final date and location of PSDay.UK 2019. Please join us this year … Continue reading PSDayUK 28th September 2019 →

Adam Bertram avatar

WOL via PowerShell Without Bothering the Network Guys

14 days ago | Adam Bertram

Imagine using Wake-on-Lan (WOL) across your entire network with nothing more than a PowerShell script...

Shane O'Neill avatar

Pester showed me a bug in our existing build process. Can you find it?

14 days ago | Shane O'Neill

Words: 729 Time to read: ~ 4 minutes Continuous Improvement Working on the goal of continuous improvement of our processes, I got given access to the PowerShell scripts for our Build Process. Credit where credit is due, these PowerShell scripts were created by people unfamiliar with the language. They have done a great job with … Continue reading "Pester showed me a bug in our existing build process.

Jeff Hicks avatar

Capturing Names with PowerShell and Regular Expressions

15 days ago | Jeff Hicks

As you continue to learn and embrace PowerShell, you will eventually meet regular expressions. Hopefully many of you already have some fundamental knowledge. if not, the first place to start is by reading the help topic, about_regular_expressions In this article, I’m gong to introduce you to an advanced regular expression topic – named captures. I’ll […] Check out my PowerShell Essentials page https://jdhitsolutions.

Roberth Strand avatar

PowerShell Monthly, June 2019

17 days ago | Roberth Strand

PowerShell news, articles, and releases for June 2019.

Adam Bertram avatar

How to Remove an Azure Virtual Machine and Cleanup with PowerShell

17 days ago | Adam Bertram

Removing an Azure virtual machine via the Azure portal doesn't clean everything up. Here's how to remove the VM and everything with it using PowerShell.

Kamal Farmer avatar

When the Local Administrator Password Solution (LAPS) fails

18 days ago | Kamal Farmer

Managing local Administrator passwords has notoriously been a headache, though the Microsoft Local Administrator Password Solution was designed to make the management of these passwords a lot less painful. One of the quirks of the solution, is that is stores each local Administrator password in the computer’s Active Directory object under the ms-mcs-admpwd attribute in... Continue reading &#

Roberth Strand avatar

Working with Windows Registry and PowerShell

20 days ago | Roberth Strand

Most people that does system administration in a Windows environment have had to work with the Windows Registry. This registry serves as a database of settings, used with everything from applications to drivers. The usual way of working with the Windows Registry is through regedit or Group Policy Objects but what if you have a server core that is not...

Przemyslaw Klys avatar

All your HTML Tables are belong to us

20 days ago | Przemyslaw Klys

Last few days, I've fulfilled my little dream related to building HTML tables. You know I've been using HTML based scripts for a long while for Microsoft Exchange from multiple people like Steve Goodman or Paul Cunningham (and others) and when I was going thru their PowerShell building code on how they create an HTML table with multi-row titles I thought Those guys are crazy. The effort to build an HTML table for a report for a person who has no clue how to do it is not something one can easily digest and understand.

Mike Robbins avatar

Determine the Generation of a Hyper-V VM with PowerShell

21 days ago | Mike Robbins

Ever need to determine what generation all of the virtual machines are on your Hyper-V servers? This is simple using the Get-VM command that installs as part of the Hyper-V module for Windows PowerShell. While the previous command will work on both clients and servers, the following command could also be used on a Windows server. The generation of the VM is one of the properties from the results of Get-VM.

Shane O'Neill avatar

Hiding Warnings in dbatools.

21 days ago | Shane O'Neill

Words: 726 Time to read: ~ 4 minutes Warning by default dbatools warns by default. From what we’ve seen, beginners to PowerShell do not want to be greeted by a sea of red when they use, mis-use, or abuse a dbatools command. PowerShell errors normally contain useful information on what went wrong. With this information, … Continue reading "Hiding Warnings in dbatools."