Adam Bertram avatar

How to Force Azure AD Connect to Sync [Walkthrough]

22 hours ago | Adam Bertram

Learn all about how to use Azure AD Connect to force and schedule a sync with your on-prem AD environment and Azure AD.

Mateusz Czerniawski avatar

PPoSh Meetup 16 - Back to School

yesterday | Mateusz Czerniawski

Intro After some time - 6 months in fact - we were finally able to meet again. At first we had to postpone PPoSh Meetups because of various personal matters. Then I was attending PSConfEU and had to prepare my talks there. Then Summer Break. But… At the PSConfEU both Bartek Bielawski and Jakub Jareš asked me if I’m planning any Meetups. Well, you can’t say no to this :smile:. Again, thanks to Obejctivity we were able to meet and - suprise, surprise - talk about Pester all day long.

Adam Bertram avatar

Managing Active Directory Groups using PowerShell

2 days ago | Adam Bertram

Learn how to manage Active Directory groups, group members individually, in bulk with a CSV and more in this example-driven post.

PowerShell Tip: Use a Code Editor

2 days ago

Don’t get me wrong, there’s a time and a place for Notepad++. There was a point in time where I preached how amazing the editor was for all purposes, even for PowerShell! That time is over. As our code increases in complexity, we need a code editor that can keep up with the workload. With Notepad++ and other basic text editors, we have a much harder time doing any code troubleshooting or any debugging on the fly.

Adam Bertram avatar

Learning Active Directory and LDAP Filters in PowerShell

2 days ago | Adam Bertram

Query Active Directory objects faster with PowerShell and learn how to build Active Directory filters (PowerShell and LDAP)!

Mike Robbins avatar

Parallel and ThrottleLimit Parameters added to ForEach-Object in PowerShell 7 Preview 3

2 days ago | Mike Robbins

Preview 3 of PowerShell 7 was released yesterday. It can be downloaded from the PowerShell repository on GitHub. Be sure to choose the preview version for the appropriate operating system. It should go without saying that anything with preview in its name should NOT be installed on a mission-critical production system. The examples shown in this blog article are being run on a system running Windows 10 (x64).

Sergey Vasin avatar

Getting and changing site admins in SharePoint Server with PowerShell

3 days ago | Sergey Vasin

In the previous post we discussed SharePoint Online cloud service. Now, let’s talk about SharePoint farm deployed on premises. We can specify Primary and Secondary site collection administrators in the SharePoint Central Administration portal by clicking on Application Management and… Continue reading →

Adam Bertram avatar

How to Install the PowerShell Active Directory Module and Connect

3 days ago | Adam Bertram

Learn how to install the PowerShell Active Directory module for Windows 10, Windows Server and authenticate to AD in this detailed blog post!

Adam Bertram avatar

Understanding and Building PowerShell Modules

3 days ago | Adam Bertram

In this in-depth guide to PowerShell modules, learn how PowerShell modules work and how to create your own.

Cláudio Silva avatar

More PowerShell Remoting coverage in dbatools

3 days ago | Cláudio Silva

Starting on dbatools version 1.0.31 we introduced better coverage for commands that make use of PowerShell Remoting. Which commands? Commands like Get-DbaComputerCertificate, Get-DbaPrivilege, Get-DbaClientAlias, just to mention a few of them, make use of the internal function Invoke-Command2 which uses New-PSSession when we run it against a remote computer.   “Why have you changed it?&

Jonathan Medd avatar

PSDayUK 2019 Schedule – Track 1

3 days ago | Jonathan Medd

PSDay.UK 2019 takes place on Saturday 28th September 2019 in Birmingham at the International Convention Centre (ICC) for a fun day learning PowerShell, DevOps, Cloud & Automation from community & industry experts for Beginners to Advanced practitioners. In this short series of posts, I’m going to highlight the three session tracks from which you can pick … Continue reading PSDa

Sergey Vasin avatar

Получение и изменение списка администраторов сайта SharePoint Server при помощи PowerShell

4 days ago | Sergey Vasin

В предыдущем посте мы рассматривали облачный сервис SharePoint Online. Теперь давайте поговорим о ферме SharePoint, развернутой локально. Мы можем указать первичного (Primary) и вторичного (Secondary) администраторов коллекции сайтов SharePoint в портале SharePoint Central Administration, выбрав в меню пункт Application Management… Читать далее →

Emmanuel Demilliere avatar

Invoke-Command Remote Variables PowerShell

4 days ago | Emmanuel Demilliere

Invoke-Command Remote Variables PowerShell Hello, Invoke-Command is great to use one of the “fan out” parallel execution possibilities with PowerShell. Indeed, by default it can execute the same command on 32 servers, simultaneously, without knowing anything about threads or runspaces. … Continue reading → The post Invoke-Command Remote Variables PowerShell appeared first on It for Dummies.

Bradley Wyatt avatar

ChatOps: Setting up PoshBot for Microsoft Teams

4 days ago | Bradley Wyatt

PoshBot is a chat bot written in PowerShell and created by DevBlackOps. ‘It makes extensive use of classes introduced in PowerShell 5.0. PowerShell modules are loaded into PoshBot and instantly become available as bot commands.’1 PoshBot can do pretty much anything you configure it to do. You can have it create Azure servers, reset Active Directory passwords, create and modify help desk tickets, license Office 365 users, etc.

Adam Bertram avatar

How to Download and Install VMware PowerCLI

7 days ago | Adam Bertram

Learn how to download and install VMware PowerCLI in this complete, step-by-step walkthrough.

Adam Bertram avatar

Automating an Azure Lab Setup with PowerShell

8 days ago | Adam Bertram

Learn how to build a custom PowerShell solution to provision an entire Azure lab setup with a single line of PowerShell code.

Mike Robbins avatar

Presenting 2 Sessions in the All Day Dedicated PowerShell Track at SQL Saturday Baton Rouge this Saturday August 17th, 2019

9 days ago | Mike Robbins

I’ll be presenting “PowerShell + SQL Server = Better Together” and “Writing Award Winning PowerShell Functions and Script Modules” at SQL Saturday #867 in Baton Rouge Louisiana this Saturday, August 17th. The event is free, although you need to register. Here’s a little information about what you can expect from my sessions: PowerShell + SQL Server = Better Together As a SQL Server professional, are you able to make a rhyme or reason to this thing called PowerShell? Need to accomplish something? Do you use Windows PowerShell or PowerShell Core? How will you interface with PowerShell? With the PowerShell console, ISE, VSCode, SAPIEN PowerShell Studio, or something else? Will you use Cmdlets from one of the various SQL related PowerShell modules? If so, which one? SQLPS, SQLServer, DBATools, etc.

Sergey Vasin avatar

Getting and changing site admins in SharePoint Online with PowerShell

10 days ago | Sergey Vasin

In the SharePoint Online admin portal we can specify the primary admin and the list of other admins in the properties menu of the site. Let’s look at how we can do it in PowerShell. Prologue To interact with SharePoint… Continue reading →

Adam Bertram avatar

Invoke-Expression: The Universal PowerShell Executor Cmdlet (Lots of Examples)

10 days ago | Adam Bertram

Learn how and why to use the Invoke-Expression cmdlet in this thorough guide with tons of good examples.

Shane O'Neill avatar

Dot Sourcing with PSScriptRoot

10 days ago | Shane O'Neill

TL;DR: Use . $PSScriptRoot\ instead of . .\ if you’re using where the script is as a reference to load other files. Words: 1033 Time to read: ~ 5 minutes Update (2019-08-14): Thanks to Cory Knox ( twitter | github | twitch ) pointed out that $PSScriptRoot is not available in PS2. I wrote before … Continue reading "Dot Sourcing with PSScriptRoot"

Adam Bertram avatar

How to Check Windows Server Uptime

10 days ago | Adam Bertram

Learn how to run a PowerShell script that will check a Windows Server uptime not only currently but pull historical windows uptimes too!

Sergey Vasin avatar

Получение и изменение списка администраторов сайта в SharePoint Online при помощи PowerShell

11 days ago | Sergey Vasin

В портале администрирования SharePoint Online мы можем указать как первичного администратора — Primary Admin, так и остальных администраторов в свойствах сайта. Давайте рассмотрим, как это сделать при помощи PowerShell. Пролог Для взамодействия с SharePoint Online через PowerShell, нам потребуется модуль… Читать далее →

Adam Bertram avatar

Using the Microsoft Graph API with PowerShell

11 days ago | Adam Bertram

Learn how to manage Azure AD and many different Office 365 via PowerShell using the Microsoft Graph API.

Adam Bertram avatar

How to Reset an Azure VM Password (PowerShell)

11 days ago | Adam Bertram

Learn how to reset an Azure VM password using the Azure VM agent and a little PowerShell.

Adam Bertram avatar

How to Find Domain-Joined Computers not in an Active Directory Site

12 days ago | Adam Bertram

Learn where to look and how to automate finding roaming, domain-joined Active Directory computers not in a site.

Przemyslaw Klys avatar

Formatting and minifying resources (HTML, CSS, JavaScript) with PowerShell

12 days ago | Przemyslaw Klys

When you work with HTML, CSS, and JavaScript, you often meet three versions on how those are stored in files - minified, formatted, somewhere in the middle (usually a total mess). I have all three versions in my PSWriteHTML module. Some are minified 3rd party resources, some are generated by my PowerShell commands (and are a total mess when it comes to formatting), and finally, some are formatted resources by using built-in VSCode features.

Kevin Marquette avatar

Powershell: Everything you wanted to know about the IF statement

13 days ago | Kevin Marquette

Like many other languages, PowerShell has statements for conditionally executing code in your scripts. One of those statements is the if statement. Today we will take a deep dive into one of the most fundamental commands in PowerShell. Index Index Conditional execution The if statement Comparison operators -eq for equality...

Mike Robbins avatar

PowerShell Function to Find Parameter Aliases

14 days ago | Mike Robbins

While sitting through Jeff Hicks‘ Advanced PowerShell Scripting Workshop at PowerShell on the River in Chattanooga today, he mentioned there being a “Cn” alias for the ComputerName parameter of commands in PowerShell. I’ve previously written a one-liner to find parameter aliases and at one time Microsoft had starting adding parameter aliases to the help for commands as referenced in that same blog article, but it appears that they’ve discontinued adding them to the help and removed the ones they previously added to it.

Gabriel Talavera avatar

Como guardar registros detallados de las sesiones de PowerShell

15 days ago | Gabriel Talavera

Auditar la el historial de actividad de PowerShell es algo que puede venir útil en caso de incidentes de seguridad o con fines de documentación. En este post, se muestra como habilitar una transcripción detallada de la actividad de PowerShell mediante directivas de grupo.En una nueva directiva de grupo, ir a "Configuración del equipo > Directivas > Plantillas Administrativas > Componentes de Windows > Windows Powershell" y seleccionar "Activar la transcripción de Powershell".

Bradley Wyatt avatar

Configure Windows 10 Accent Color with Intune and PowerShell

15 days ago | Bradley Wyatt

My last two articles showed you how you can set a computers desktop wallpaper and lock screen wallpaper without having Enterprise or Education by using a PowerShell script and Intune. Now I wanted to figure out how to configure the Windows accent color to also match my corporate branding. Get Color Values The first thing we need to do is to get the proper registry values for the color we want to use.

Bradley Wyatt avatar

Set Corporate Lock Screen Wallpaper with Intune for Non Windows 10 Enterprise or Windows 10 Education Machines

15 days ago | Bradley Wyatt

In my previous article I showed you how you can leverage PowerShell and Intune to set a computers wallpaper even if the OS was not Enterprise or Education. Currently, If you want to set the wallpaper or lock screen wallpaper via Intune Policies, you must be on either Enterprise or Education. In this article I will show you how you can leverage PowerShell and Intune, and set your own lock screen wallpaper no matter the version.

Kamal Farmer avatar

How can I mitigate DCSync attacks on Active Directory?

17 days ago | Kamal Farmer

DCSync is a tool within Mimikatz that allows you (assuming you have the rights) to impersonate a Domain Controller and request a sync from a live Domain Controller (effectively taking a full copy of the Active Directory database, including all password hashes). The DCSync exploit is well documented HERE. Normally, DCSync attacks are performed after... Continue reading →

Mike Robbins avatar

Where are Untitled Tabs in VSCode Saved on a Windows System?

17 days ago | Mike Robbins

Ever wonder how VSCode (Visual Studio Code) maintains those untitled tabs between sessions? They’re stored as files underneath your user’s profile in appdata on Windows based systems as shown in the following example. The previous command could be piped to Get-Content to view the contents of all of code in the open untitled tabs of VSCode. You could also use Select-String to find something specific.

Jonathan Medd avatar

Running PowerShell Core Commands in a Linux Target from Ansible

17 days ago | Jonathan Medd

Ansible has modules shell, for executing commands against Linux targets, and win_shell for executing commands against Windows targets – typically using PowerShell. So I was curious to see if it was possible to execute commands in a Linux target using PowerShell Core and if so, how to do it. For my test I have an … Continue reading Running PowerShell Core Commands in a Linux Target from

Przemyslaw Klys avatar

Getting Active Directory Last Backup Time using PowerShell

18 days ago | Przemyslaw Klys

I shouldn't be telling you that, but Active Directory Backup is an essential part of your Active Directory setup. When a backup of Active Directory happens, AD is aware of it. Following PowerShell solution allows you to get Active Directory Last Backup Time for the whole forest or by domain. The post Getting Active Directory Last Backup Time using PowerShell appeared first on Evotec.

Mike Robbins avatar

The No-Nonsense Beginner’s Guide to PowerShell at PowerShell on the River in Chattanooga, TN on Saturday August 10th

18 days ago | Mike Robbins

I’ll be presenting “PowerShell 101: The No-Nonsense Beginner’s Guide to PowerShell” at PowerShell on the River in Chattanooga Tennessee this Saturday, August 10th. The event itself is a mini-conference with all day sessions on Friday, August 9th and then numerous speakers presenting in three different tracks on Saturday, August 10th. Here’s a little information about what you can expect from my session: PowerShell 101: The No-Nonsense Beginner’s Guide to PowerShell Interested in PowerShell but not sure how to get started? Already have some experience but still having trouble with the basic concepts? This session is for you! Learn to easily figure out what the commands are and how to use those commands without searching the Internet.

Kamal Farmer avatar

How can I check the version and edition of SQL Server installed?

19 days ago | Kamal Farmer

********* UPDATE 05/08/2019 ********* It’s been a while (4 years!) since using this script, and have found a few flaws in its logic and execution, especially when it comes to SQL 2000 instances (yes, they’re still very much out there). The script below has now been updated and tested and should work correctly on servers... Continue reading →

Przemyslaw Klys avatar

Working with HTML in PowerShell just got better

19 days ago | Przemyslaw Klys

Last few weeks, I've been working on making creating HTML based Dashboards, Reports, and Emails better. PSWriteHTML already allows fancy looking reports or emails without much effort, but this release makes it even more helpful. I will be mixing three PowerShell modules in this blost post - PSWriteHTML (responsible for creating HTML/CSS/JS code), Emailimo (simplifies creating emails based on PSWriteHTML) and Dashimo (simple dashboard building).

Jan Egil Ring avatar

Introducing the Azure File Sync DSC resource module

19 days ago | Jan Egil Ring

In this article, we are going to introduce a new PowerShell DSC resource module called AzureFileSyncDsc. Before we get started, let us have a quick overview of what Azure File Sync is. Azure File Sync Azure File Sync is a cloud service which makes it possible for customers using Windows File servers to centralize file services in Azure storage, while having a cache in multiple locations for fast, local performance.

Przemyslaw Klys avatar

Testing LDAP and LDAPS connectivity with PowerShell

19 days ago | Przemyslaw Klys

One of the common ways to connect to Active Directory is thru LDAP protocol. There are a lot of applications that talk to AD via LDAP. By default Active Directory has LDAP enabled but that's a bit insecure in today's world. That's where LDAPS comes in. It's not easy to set up, but when you get it done, it works. The problem I had recently is that while setting up LDAPS on DC's I only did this on some of the DC's, and not all of them as I should.

Tommy Maynard avatar

PowerShell.org New Posts – 07/2019

21 days ago | Tommy Maynard

Here’s my PowerShell.org posts for June 2019! June 2019 Keeping a Continuous Total

Mike Robbins avatar

What’s in your PowerShell $PSDefaultParameterValues Preference Variable?

22 days ago | Mike Robbins

The $PSDefaultParameterValues preference variable, which was introduced in Windows PowerShell version 3.0, provides a mechanism for specifying default values for parameters. I thought I would share what I’ve added to mine and ask the community to share theirs. The first one in the list (‘Out-Default:OutVariable’ = ‘LastResult’) is one I picked up from Joel Bennett to store the results of the last command in a variable named $LastResult.

Jonathan Medd avatar

Returning Data from PowerShell Scripts to be consumed by Ansible Playbooks

24 days ago | Jonathan Medd

This topic was not initially obvious to me, so hopefully it will help someone out reading this. Consider the scenario where you have an Ansible playbook which executes some PowerShell code via win_shell and you wish to consume the PowerShell output later on in the playbook. The output from win_shell is available in the return … Continue reading Returning Data from PowerShell Scripts to be co

Josh King avatar

Crouton #12 - Toasting in Many Tongues (Tōhi o nga reo maha)

24 days ago | Josh King

Toast notification data bindings have a number of uses. We've already covered updating toasts, now let's teach our notifications a second language.

Kamal Farmer avatar

How do I recursively check Folder Permissions?

24 days ago | Kamal Farmer

When reviewing permissions on folders, it’s often important to not only know what groups have been assigned access, but to show the members of those groups as well (all in a single report).  And what if those groups have nested groups? We should be able to recurse those as well. This script achieves the following:... Continue reading →

Bradley Wyatt avatar

Set Corporate Wallpaper with Intune for Non Windows 10 Enterprise or Windows 10 Education Machines

24 days ago | Bradley Wyatt

By default, there is an Intune device configuration property that can set a devices wallpaper (Profile Type: Device Restrictions > Personalization) BUT this is only applicable on devices running Windows 10 Enterprise and Windows 10 Education. Luckily, using PowerShell we can download a image from the web, save it locally, and set it as our users wallpapers. First we need to create our PowerShell script.

Make Sure Your SQL Servers are Running the Latest CU with the New SQL Assessment cmdlets

24 days ago | Aaron Nelson

Make Sure Your SQL Servers are Running the Latest Cumulative Update (CU) with the New SQL Assessment cmdlets available in the SqlServer module.

Mateusz Czerniawski avatar

Manage Hyper-V Snapshots

25 days ago | Mateusz Czerniawski

Show me all your snapshots We have a cluster with a bunch of VMs. Let’s say around 300 :grin:. Some actions require us to take a snapshot of certain VMs and then remove them after we’re sure everything is ok. We are using VeeamOne to track this, but it’s goot do have good old PowerShell take care of the task itself. There are 3 snippets here I’m using very often: create new snapshot with a certain name for selected VMs find all VMs with snapshots of certain name (i.

Prateek Singh avatar

3 ways to UnZip Compressed Files using PowerShell

25 days ago | Prateek Singh

Hello! Today in this blog post we are going to take a look into: 3 different approaches to Unzip or expand compressed files in PowerShell. All these methods can come... The post 3 ways to UnZip Compressed Files using PowerShell appeared first on Ridicurious.

Josh King avatar

Normalizing Phone Numbers, Easier with Regex

one month ago | Josh King

After years of staring at it confused, I've finally given into the dark side and started to lean RegEx.