Skip Ribbon Commands
Skip to main content
 

 Follow Me

 
 
 
 
 

 SharePoint Blog List

 
  
  
  
  
  
  
  
  
  
  
  
  
Todd Klindt's home page > Todd Klindt's Office 365 Admin Blog
What's going on with TK.
May 21
Using PowerShell to Find Power Apps that use the SharePoint Connector

I recently had a fun task come across my desk. A customer of mine has a large tenant, with a lot of Power Apps and a lot of Power App makers. They’re doing a tenant migration, and the Power Apps themselves will likely move over pretty easily. A lot of them are connecting to the tenant’s SharePoint site, and after the tenant move those SharePoint URLs are going kaput. The customer wanted to be able to find out which Power Apps were going to be broken so they could reach out to the owners to get them fixed. That’s where I, and my PowerShell prowess came in.

I had whipped up some quick and dirty PowerShell for this customer before so they asked if I could work my magic with this. I have dabbled a bit with the Power Apps and Flow Power Automate PowerShell in the past, and while I found it… lacking, I figured this was something it could handle. Here is the PowerShell I eventually went with:

Get-AdminPowerApp | ForEach-Object { if (Get-AdminPowerAppConnectionReferences -EnvironmentName $(Get-PowerAppEnvironment).EnvironmentName -AppName $_.AppName | Where-Object -Property ConnectorName -EQ -Value "shared_sharepointonline") {$_ | Select-Object DisplayName, @{Label="Owner";e={$_.Owner.displayName}},@{Label="Email";e={$_.Owner.userPrincipalName}}, AppName }}

Here’s what it looks like when it runs:

image

I have the following two Power Apps modules installed with these versions:

2.0.61 Microsoft.PowerApps.Administration.PowerShell
1.0.9
Microsoft.PowerApps.PowerShell

(Full list of Office 365 PowerShell modules)

You’ll get prompted to log in. The account will have to have the necessary permissions to enumerate all of the Power Apps in the tenant.

I know what you’re thinking, “Todd, that’s amazing! Solid work! I hate to seem greedy, but, um, where is the URL of the SharePoint site the Power App is connecting to?” That’s a funny story, but the punchline is, there isn’t a way. At least not from the PowerShell modules we have today. Apparently the Center of Excellence Starter Kit has a way to get that information, but it’s a really big hammer for a nail this small.

This will work for any of the Connectors. You can use the following PowerShell to see all Connectors that are in use:

Get-AdminPowerAppConnection | Select-Object ConnectorName

That will give you the value you need to search for with the Where-Object. If you’re looking for more ways to abuse Power Apps and Power Automate with PowerShell (so many Powers there) you can watch Shane’s so-so PowerShell for PowerApps and Flow video. It’s okay. I guess. In a pinch.

Enjoy.

tk

ShortUrl: https://www.toddklindt.com/PoshFindPowerAppsConnectors

April 17
Podcast 454 - Quarantine Beard

Today Todd has Marc Anderson from Sympraxis on to talk. They start with talking about the changes taking place everywhere with the response to the virus. They do talk a bit about technology while talking about how this has impacted the way everyone works. They do spend a little time talking about Teams updates that are coming as well as an event they're doing to try to stay connected. And talk a bit about community content to share real world solutions.

Recorded 4/8/2020

Audio File

Video File

Podcast 454 - Quarantine Beard (Time 0_24_14;21)

YouTube (Subscribe)

Subscribe in iTunes

Running Time: 47:07

Links:

27:00 SharePoint Mobile App Branding
26:55
Microsoft Monitoring Cloud Services
40:03
Ask Sympraxis
41:48
Microsoft 365 Community Content

ShortURL: https://www.toddklindt.com/Podcast454

April 14
Podcast 453 - Holes All Over My Walls

Much life all of life these days, today's podcast focuses on the Covid-19 pandemic and its impact on technology. Todd talks about Microsoft's response and some ways you can stay connected.

Recorded 3/25/2020

Audio File

Video File

Podcast 453 - Holes All Over My Walls (Time 0_23_11;07)

YouTube (Subscribe)

Subscribe in iTunes

Running Time: 39:36

Links:

The Intrazone - Crisis Management and Remote Work
Teams Thursday virtual events
My own presence indicator
Teams Presence Publisher

ShortURL: https://www.toddklindt.com/Podcast453

April 10
Podcast 452 - Just Be Me

This week Shane is busy and Todd is taking over on his own for a while. He is able to share some of the things he's been dying to talk about for a while. Things like a change in the default sharing for OneDrive, Web Apps in Chromium Edge, and then of course focusing on PowerShell 7. Then he talks about the current world crisis and how Microsoft is trying to help. Wrapping up with some talk about Tesla and where he's going to be speaking in the coming months.

Recorded 3/11/2020

Audio File

Video File

Podcast 452 - Just Be Me (Time 0_13_42;17)

YouTube (Subscribe)

Subscribe in iTunes

Running Time: 35:49

Links:

02:41 "People with Existing Access" will be the default when sharing a file
05:19
Installing Web Apps on Chromium Edge
12:23
PowerShell 7 and a Whole Lot More
15:00
Office 365 PowerShell Module Installs
18:00
How To Use PowerShell ISE Mode In Visual Studio Code
23:43
Microsoft Teams Giving Away Paid Features for Six Months Due to Coronavirus
28:50
Crisis Communication Power App
30:38
Free Supercharging for Tesla Model S purchases
34:10
SharePoint Conference
34:35
Techorama Belgium

ShortURL: https://www.toddklindt.com/Podcast452

April 01
Office 365 PowerShell with the Omaha SPUG

In these times of uncertainty and trouble we all need something to feel good about. You know what makes me feel good? PowerShell, that’s what. Tomorrow, April 2nd, at 11:30 CDT, I’ll be remotely presenting my fan favorite “PowerShell with Office 365” presentation for the Omaha SharePoint User Group. Even if you’re not quarantined in Omaha, I’d love for you to join me. I’ll be telling you how I use PowerShell and sharing scripts for you to quietly make fun of.

Here is an ICS file to add the Teams meeting to your schedule. If you’re a crazy person and want to throw caution to the wind, here’s a direct link to the Teams meeting itself.

Thanks to David and Amber at the Omaha SPUG for inviting me. I appreciate it.

tk

ShortURL: https://www.toddklindt.com/OmahaSPUGtalk2020

March 27
Podcast 451 - Evaporated from Both of our Memories

Shane and Todd are busy this week talking about a lot of fun technology stuff. They start off talking about how they're almost caught up to catching up in production. And then dive into some technical fun about Windows updates followed by some ChrEdge goodies and wrapping up with all the fun you can have with some phones and new apps.

Recorded 2/19/2020

Audio File

Video File

title clip 

YouTube (Subscribe)

Subscribe in iTunes

Running Time: 43:15

Links:

04:20 UN SharePoint Hack. Should I worry?
28:10 Microsoft’s Unified Office App for Android Now Available to Everyone
31:55 Samsung Galaxy Z Flip, Microsoft Your Phone could change the way you use mobile tech

ShortURL: https://www.toddklindt.com/Podcast451

March 25
How to Keep Unwanted Visitors out of my Basement Office

With all of the working from home that’s going on, and all of the kids not going to school, it can be tough to keep the latter out of the former. In my continuing practice of making things more complicated than they need to be, I came up with a way for my kids to know they should not go down into the basement.

20200320_141751

Come on down. And…

20200320_141733

You shall not pass!

I posted those pictures on Facebook and a few friends asked me what I was using. It’s not as complicated as I’d like it to be, but it’s a work in progress. I can control it with an IR remote, an app on my phone, and with my digital assistant, Alexa. When I’m at my desk I only need to bark out, “Alexa, set busy lights to Red!” and she does.

I cobbled my solution together with parts I already had in “that damned box.” Since some of you don’t have that box (I feel so bad for you), here’s a link to a comparable package, Nexlux LED Strip Lights. If you want to put your own package together you’ll need three pieces; a power supply, a controller, and an LED light strip. You’ll find a nearly endless supply of combinations of those on Amazon. I used double-sided tape to stick the light strip to the door frame. The light strip has adhesive on the back, but my experience has shown that the heat from the LEDs degrades that adhesive pretty quickly.

I mentioned above that I have a few ways to change the light colors based on the controller I have. There is the included IR remote, the included app, and Alexa integration. Right now I don’t have any automation set up where the lights change based on my presence in Office 365 or my calendar. That may come later.

I was telling a friend of mine about this. He’s less inclined to nerd out on things like this. His loss. He thought he might just connect a string of Christmas lights up to a smart plug and get the same result. That would work too and would have all the same integration points depending on which smart plug you get. I have a few Wemo smart plugs from Belkin and they’ve treated me pretty well. They also integrate with IFTTT so I can have them flash a lamp when the garage door opens, fun things like that.

If this article was interesting, let me know. I’ll post some of my other home automation projects.

tk

ShortURL: https://www.toddklindt.com/SmartBusyLight

March 25
Podcast 450 - The Lost Episodes

Shane and Todd are back. They start with a summary of where all the podcasts have been hiding lately. Todd shares the total of the birthday charity drive this year. Then we talk about ChrEdge and how easy it is to question whether something is real or fake anymore. Wrapping up with a quick summary of upcoming events where one or both of them may be found.

Recorded 2/12/2020

Audio File

Video File

Podcast 450 - The Lost Episodes (Time 0_03_36;17)

YouTube (Subscribe)

Subscribe in iTunes

Running Time: 46:22

Links:

22:55 Microsoft relented on Bing-Jacking
36:45 Home Stallone [DeepFake]

ShortURL: https://www.toddklindt.com/Podcast450

March 24
Podcast 449 - One Big Hot Blob

ChrEdge, PowerShell, and the Super Bowl top the topics on this week's Podcast.

Recorded 2/5/2020

Audio File

Video File

Podcast 449 - One Big Hot Blob (Time 0_31_27;22)

YouTube (Subscribe)

Subscribe in iTunes

Running Time: 44:07

Links:

PowerPoint Live Presentations
SharePoint Continues to push you to Modern
Intro to Microsoft Forms

ShortURL: https://www.toddklindt.com/Podcast449

March 23
Sorting Hash Tables in PowerShell

I recently was working on a customer project and I was trying to find the name of a certain SharePoint list item property. (Spoiler, it was “_ModerationStatus”) I knew it was hiding in the item’s FieldValues property, but I wasn’t sure where. To get you up to speed, here’s the PowerShell that got me to this spot:

Connect-PnPOnline -Url https://m365x246038.sharepoint.com/sites/ContosoWeb1
(Get-PnPListItem -List "SitePages" -Id 5).FieldValues

SNAGHTML155621a

Not only is the list of FieldValues as long as my kids’ Christmas Lists, also like those lists, it’s not in alphabetical, chronological, numerical, or any other order I can conjure up. To say it’s random seems to be giving it more order than it really has.

While I didn’t know exactly was the name of the property I did have a few ideas. Trying to find those random property names would make swimming upstream look like a piece of cake. Fortunately I’ve fought this battle before and I have the scars to prove it. I’m hoping I can save you all the pain I went through, over and over.

The secret is the GetEnumerator() Method of the Hash Table. This got me what I was looking for:

(Get-PnPListItem -List "SitePages" -Id 5).FieldValues.GetEnumerator() | Sort-Object -Property Key

SNAGHTML17b6b87

Isn’t that much better?

Once you introduce .GetEnumerator() into the picture you can also get crazy with things like Where-Object, like this:

(Get-PnPListItem -List "SitePages" -Id 5).FieldValues.GetEnumerator() | Sort-Object -Property Key  | Where-Object -Property Key -Like -Value "*mod*"

or

(Get-PnPListItem -List "SitePages" -Id 5).FieldValues.GetEnumerator() | Sort-Object -Property Key  | Where-Object -Property Value -Like -Value "true"

SNAGHTML1825780

Normally you would put the Where-Object before the Sort-Object so that the Sort has fewer items to churn through.

While I did this in the context of a hash of SharePoint list item properties, it’s applicable to all PowerShell hash tables.

Happy PowerShelling.

tk

ShortURL: https://www.toddklindt.com/PoshSortHashTables

1 - 10Next
 

 Subscribe to my Netcast

 

You can watch Shane and I's Cloudy Podcast live every Wednesday Morning at 10:00 am Central US time at http://www.toddklindt.com/Netcast

You can subscribe to the Podcast in the following ways:

MP3 Audio

Windows WMV video

YouTube Channel

 

 SPDocKit

 
 

 Todd's Upcoming Events

 
  
  
There are no items to show in this view of the "Events" list.