CategoryPowerShell

How to Resolve Remove-AzKeyVaultKey : Operation returned an invalid status code ‘Forbidden’ Error

I’ve come across another error message in my seemingly never-ending battle with Azure Key Vault. A while back I couldn’t delete a resource group because of Key Vault soft-delete. Then I couldn’t recreate a Key Vault with the same name again because of soft-delete. Which brings us to today’s post where I had to go to PowerShell and purge a key that but ran into an issue...

Building an Azure Sandbox – Part 1 – The Basics

I recently posted that I was doing my annual Azure sandbox rebuild but this time I wanted to do things a little differently…all in PowerShell. Unlike previous years when I would remove most of the resources, this year I removed all of the resources. As in I log into the Azure Portal and it says no resources to display. No databases, no networks, not even an empty resource group. As I work...

Azure PowerShell – List Virtual Machine Sizes

For those who use PowerShell to do things in Azure you will know that occasionally there is a parameter that you need to get right but are unsure of the exact value that should be there. In the Azure Portal it’s easy, you pick from a drop down menu where the required, pre-defined, values are and enter into the text box where it’s a free form value. Last week I wrote about using...

Azure PowerShell – List Data Center Locations

Occasionally I will come across the need to use PowerShell for my day to day activities. One such need came up this week when I was preparing to do training with a customer. Part of that meant creating 6 data science VMs. So we updated the software on a VM and went to clone it, ran into some issues and then decided to break out the PowerShell to fix the issue. For those who use PowerShell to do...

Setting Up a Domain Controller with PowerShell

Quickly setting up a domain controller is a vital step in creating a good demo environment. This post will walk you through a quick and easy set of scripts to get started. Step 1: Download and Install Windows Server 2012 If you don’t already have a blank image with Windows Server 2012 you can download the trial version directly from Microsoft here  The trial will allow you to try out all...

View Flat File Contents Using PowerShell

We have all been there; you need to take a look at the data inside a file. Sure you can open it in Notepad if it is under 20-30MB, bigger than that and you may run into problems depending on the computer. Sometime WordPad will handle the larger files, again up to about 60MB is where I tend to run out of luck. So what happens if the file is a hundred MB? 200 MB? How about 1 GB? I’ve recently...

Check Mount Points and Disk Free Space with PowerShell

Those who know me will know that this post is a little out of the ordinary… I am posting about PowerShell. I have done one previously about Backing up and restoring site collection in SharePoint, so believe me I will admit that it has its place.  Well I was onsite with a client today and found another use for PowerShell: checking the size of and free space on mount points on an HP appliance...

Backup and Restore SharePoint 2010 Site Collection with PowerShell

One of the most annoying processes with SharePoint is backing up a site collection.  There is a build in tool that you can use but it is kinda clunky and can take a while to perform the backup.  I used it once and was not impressed.  PowerShell provides a quick and easy way to do site collection backups.  My favorite part is that you can do the entire backup with one, uno, un, 1 (that’s all...

Bradley Schacht

Bradley Schacht is a Senior Program Manager on the Microsoft Azure Synapse Analytics team based in Jacksonville, FL. He has worked with Microsoft SQL Server and Azure data services since 2009 as a consultant, trainer, and architect. He has co-authored 4 SQL Server and Power BI books, most recently the Microsoft Power BI Quick Start Guide. Bradley enjoys solving interesting problems and teaching others to use new technology. He frequently presents at community events around the country, is a contributor to sites such as SQLServerCentral.com, and is a member of the Jacksonville SQL Server User Group (JSSUG).

Follow Me