Merge pull request #156 from CriticalSolutionsNetwork/Bugfix--Fix-SPO-output-for-Get-SPOSite

fix: Fix SPO output for Get-SPOSite
This commit is contained in:
Doug Rios
2025-01-14 13:11:13 -06:00
committed by GitHub
3 changed files with 10 additions and 3 deletions

View File

@@ -4,6 +4,12 @@ The format is based on and uses the types of changes according to [Keep a Change
## [Unreleased] ## [Unreleased]
### Fixed
- Get-SPOSite command to return all but voided output for no code runs (Ex: PowerAutomate)
## [0.1.27] - 2025-01-13
### Added ### Added
- Added additional error handling to connect function to identify problematic steps when they occur. - Added additional error handling to connect function to identify problematic steps when they occur.

View File

@@ -5,10 +5,10 @@ Import-Module .\output\module\M365FoundationsCISReport\*\*.psd1
<# <#
$ver = "v0.1.27" $ver = "v0.1.28"
git checkout main git checkout main
git pull origin main git pull origin main
git tag -a $ver -m "Release version $ver refactor Update" git tag -a $ver -m "Release version $ver bugfix Update"
git push origin $ver git push origin $ver
"Fix: PR #37" "Fix: PR #37"
git push origin $ver git push origin $ver

View File

@@ -79,7 +79,8 @@ function Connect-M365Suite {
(Get-PnPSite).Url (Get-PnPSite).Url
} }
else { else {
$sites = Get-SPOSite # Supress output from Get-SPOSite for powerautomate to avoid errors
[void]($sites = Get-SPOSite -Limit All)
# Get the URL from the first site collection # Get the URL from the first site collection
$url = $sites[0].Url $url = $sites[0].Url
# Use regex to extract the base URL up to the .com portion # Use regex to extract the base URL up to the .com portion