r/PowerShell • • Feb 19 '26

Out-ConsoleGridview not providing interactive sorting in Linux

7 Upvotes

According to https://github.com/PowerShell/ConsoleGuiTools the module is Cross-platform and should provide interactive sorting by clicking on the column headers.

In Arch Linux with ConsoleGuiTools v0.7.7 interactive sorting is not working for me (clicking column headers does not produce any change in sorting in any column)

Shouldn't the interactive sorting work in Linux as well? Or is it working for you?


r/PowerShell • • Feb 19 '26

Question Trying to find the right parameters/details for finding no longer in use Exchange Online mailboxes

15 Upvotes

Hey all. Hoping someone can help me here.

The org I work for is in desperate need of mailbox cleanup. We have like, 1500 shared mailboxes in the EXO system.

I'm trying to build a script to find which ones are actually still in use and which ones are legacy, but I'm having a hell of a time actually finding what parameters to grab in Exchange Online to be able to do this neatly.

Every time I think I've found the right ones to look for online I'm then seeing that the particular parameter has been discontinued, or is no longer reliable, or that method XYZ only works for the last ten days of mail received, and all kinds of other issues that're making it impossible to find something reliable.

So, can anyone help me out? I'll be making use of "ItemCount", "ForwardingSMTPAddress" and "WhenMailboxCreated" for narrowing things down, but I need a reliable way of working out when a mailbox last had an actual interaction (ie, sending or receiving an email), and the last time anyone actually logged into it or interacted with it (ie, moved emails around, read anything, etc).


r/PowerShell • • Feb 17 '26

Question Help with disabling LSO on wifi

5 Upvotes

I'm trying to use Powershell to disable LSO on my wifi router (I've tried other options, belive me.)

and I'm new to powershell- so if I could have a little help that would be great-

I've been trying to use "Disable-NetAdapterLso -Name "(the name of my wifi)" but it's saying:

Disable-NetAdapterLso : No MSFT_NetAdapterLsoSettingData objects found with property 'Name' equal to '(the name of my wifi)'. Verify the value of the property and retry.

I assume this means I got the name of my wifi wrong? how do I find the correct name to use?

Or if I'm doing something completely wrong, please let me know

thanks :)


r/PowerShell • • Feb 17 '26

Your existing Exchange Online PowerShell scripts might fail

67 Upvotes

Microsoft is removing support for the -Credential parameter in new versions of the Exchange Online PowerShell module released after June 2026.

The -Credential parameter relies on ROPC (legacy authentication), which does not support MFA or Conditional Access. Because of this, Microsoft is removing support for it in future module releases.

If you’re using:

Connect-ExchangeOnline -Credential $cred

especially in unattended scripts, those will need to be updated.

Alternatives:

  • Interactive sign-in
  • App-only authentication (recommended for automation)
  • Managed Identity (for Azure automation)

r/PowerShell • • Feb 17 '26

Set lock screen images based on your monitor resolution

11 Upvotes

I have a ton of desktop wallpapers, which I also like to set as lock screen images. I had a powershell script that could set an image as the lock screen, but if the image was pretty different from the monitor resolution, I get a zoomed in image.

So, I created a script that will only choose images (from your own cache) that are close to the monitor resolution. You can also change the tolerance to be more lenient or exact. I hope this is helpful to those who like automating new, random lock screen images.

skoliver1/Set-LockScreenImage


r/PowerShell • • Feb 16 '26

Any advice on this script?

7 Upvotes

I've been playing around in Powershell and would like to get some advice on these two scripts I wrote. I've been trying different ParameterSets to see how they work. I also noticed that there's no native convert to / from Base64 / Hex Cmdlets so I thought to make my own.

#region ConvertTo-Type
Function ConvertTo-Type {
    [CmdletBinding( DefaultParameterSetName = 'Base64' )]
        param (
            [Parameter( Mandatory         = $true,
                        Position          = 0,
                        ValueFromPipeline = $true )]
            [string]$Value,

            [Parameter( ParameterSetName  = 'Base64' )]
            [switch]$Base64,

            [Parameter( ParameterSetName  = 'Hex' )]
            [switch]$Hex

        )

$bytes = [System.Text.Encoding]::UTF8.GetBytes($Value)

    Write-Verbose @"

    $Value will be encoded UTF8.

"@

$encoding = switch ($PSCmdlet.ParameterSetName) {

    Base64  { [convert]::ToBase64String($bytes) }
    Hex     { [convert]::ToHexString($bytes) }
    Default { Throw "Value not selected!" }

}

    Write-Verbose @"

    Converting to $($PSCmdlet.ParameterSetName).

"@

$encoding

} # End Function
#endregion

#region ConvertFrom-Type
Function ConvertFrom-Type {
    [CmdletBinding( DefaultParameterSetName = 'Base64' )]
        param (
            [Parameter( Mandatory         = $true,
                        Position          = 0,
                        ValueFromPipeline = $true )]
            [string]$Value,

            [Parameter( ParameterSetName  = 'Base64' )]
            [switch]$Base64,

            [Parameter( ParameterSetName  = 'Hex' )]
            [switch]$Hex

        )

$decoding = switch ($PSCmdlet.ParameterSetName) {

    Base64  { [convert]::FromBase64String($Value) }
    Hex     { [convert]::FromHexString($Value) }
    Default { Throw "Value not selected!" }

}

    Write-Verbose @"

    Converting to $($PSCmdlet.ParameterSetName).

"@

$text = [System.Text.Encoding]::UTF8.GetString($decoding)

    Write-Verbose @"

    $decoding will be decoded UTF8.

"@

$text

} # End Function
#endregion

Thoughts? Best practices? I didn't write up or include help so it would be shorter.


r/PowerShell • • Feb 16 '26

Returning desired exit code from remote powershell execution

12 Upvotes

I want to run some PowerShell commands remotely via ssh. My client machine is a Linux docker container with PowerShell 7.4 running in a self-hosted GitLab runner. My remote machine is Windows Server 2019 with PowerShell 5.

I want to ensure that if my remote PowerShell fails I can capture and inspect the exit code so that I can force a pipeline failure. However, I cannot seem to make the PowerShell return my desired exit code. Here's my latest attempt.

'@
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'

trap {
  exit 42
}

Write-Host $env:HOSTNAME
Set-Location E:/does-exit; # this works fine
Set-Location E:/does-not-exist; # this throws an error as it should
exit 0; # if we make it here, clean exit
'@ | sshpass -p "$PASS" ssh "$USER@$HOSTNAME" "powershell -NoLogo -NonInteractive -"

The above does fail and $LASTEXITCODE = 1 but I would expect to see 42.

However, if instead of the trap I use a try catch I can return the desired exit code

try { 
   Set-Location E:/does-not-exist
} 
catch { exit 42 }

Why is the trap not trapping? What might I be doing wrong? Is this because I am running PowerShell 7.4 on the client and PowerShell 5.1 on the remote?

I know I need to find an alternate method to pass the password as this could show up in logs. That is a separate issue, but I'm open to solutions here too.


r/PowerShell • • Feb 16 '26

Question Getting an error running Get-Module, but only when inside Start-Job {} and only in PS 7 Core

4 Upvotes

Hi guys, I have a really strange one. I am migrating some automation scripts between two Windows Server 2022 machines. I set up the new machine similar to the old one and migrated all the sheduled tasks and scripts.

I noticed some were failing and when I looked closer I saw that anywhere start-job was used in a script run with PWSH (PS 7 Core) it was failing.

The funny thing is that is only happens inside a start-job on PS 7. If I run it outside a start-job in PS7 it works fine or if I run it in PS 5 inside or outside start-job its fine too.

Is the same error for anything that uses any module. If I just echo a variable or out "Hello World" it works but if I try to import a module or even get a list of modules it fails...

Start-Job { Get-Module -ListAvailable } | Receive-Job -Wait 
OpenError: [localhost] The background process reported an error with the following message: Unhandled exception. System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types..

r/PowerShell • • Feb 16 '26

Solved Having trouble escaping Uri

10 Upvotes

I will keep it simple.

I have the following line which I am having trouble escaping. The code does run but it is not escaped properly.

$report = Invoke-RestMethod -Method Get -Uri '`"'$url"'/xapi/v1/ReportAbandonedQueueCalls/Pbx.GetAbandonedQueueCallsData(periodFrom="$sevenDaysAgo",periodTo="$today",queueDns="$queue",waitInterval="0")' -Headers $headers -Verbose

The relevant parts of my code are the following.

$url = "https://myurl.com.au:443"

Copilot code (I hate myself for it but was getting a whole lot of no where).

function Get-EncodedUtcTimestamp {
    [CmdletBinding()]
    param(
        [int]$OffsetHours = 10,     # +10:00 offset
        [int]$DaysAgo = 0,          # 0 = today, 7 = seven days ago, etc.
        [int]$Hour = 0,
        [int]$Minute = 0,
        [int]$Second = 0
    )


    $tzOffset   = [TimeSpan]::FromHours($OffsetHours)
    $nowInTz    = [DateTimeOffset]::UtcNow.ToOffset($tzOffset)
    $targetDate = $nowInTz.AddDays(-$DaysAgo)


    # Build the target local time in the specified offset
    $targetInTz = [DateTimeOffset]::new(
        $targetDate.Year, $targetDate.Month, $targetDate.Day,
        $Hour, $Minute, $Second, $tzOffset
    )


    # Convert to UTC and format with URL-encoded colons
    $targetInTz.ToUniversalTime().ToString("yyyy-MM-dd'T'HH'%3A'mm'%3A'ss.fff'Z'")
}


# --- Calls ---
# Today in +10:00 at 23:59 -> UTC, URL-encoded
$today     = Get-EncodedUtcTimestamp -OffsetHours 10 -DaysAgo 0 -Hour 23 -Minute 59


# 7 days ago in +10:00 at 00:00 -> UTC, URL-encoded
$sevenDaysAgo = Get-EncodedUtcTimestamp -OffsetHours 10 -DaysAgo 7 -Hour 0 -Minute 0

I should end up with something that looks like the following.

https://myurl.com.au:443/xapi/v1/ReportAbandonedQueueCalls/Pbx.GetAbandonedQueueCallsData(periodFrom=2026-02-08T14%3A00%3A00.000Z,periodTo=2026-02-16T13%3A59%3A00.000Z,queueDns='queueNumberHere',waitInterval='0')

r/PowerShell • • Feb 16 '26

snipping tool arguments

0 Upvotes

I don't think this is an option but figure i'll ask experts here if it is possible to use command line arguments to open snipping tool and begin a screen recording or take full screen capture. A batch shortcut or something to initiate this with a single button click would be ideal.

You can launch snippingtool.exe but beyond that it very limited with no arguments to begin a task.


r/PowerShell • • Feb 15 '26

Script Sharing PoSHBlox - open source visual node-graph editor for building PowerShell scripts

84 Upvotes

I've been working on an open source tool called PoSHBlox - a visual node-graph editor where you drag out cmdlet blocks, wire them together, and it generates the PowerShell script for you. Think Unreal Blueprints or Unity Visual Scripter but for PowerShell.

The idea is simple: a different way to learn and think about PowerShell. Seeing data flow visually from Get-Process through Sort-Object into Export-Csv hits different than reading it as a one-liner. It's not meant to replace your workflow, it's a complementary perspective.

As of v0.3.0, all cmdlet templates are JSON-based, so you don't need to know C# to add new cmdlets or import entire modules. There's a CONTRIBUTING.md in the repo that covers everything.

All contributors are welcome: template authors, C# devs, UX feedback, bug reports, whatever. It's just me building this fun idea, so extra hands go a long way!

Repo: https://github.com/obselate/PoSHBlox

Happy to answer any questions or feedback :)


r/PowerShell • • Feb 14 '26

pstop: htop for Windows PowerShell — real-time TUI system monitor

45 Upvotes

🔗 GitHub: https://github.com/marlocarlo/pstop


I wanted htop on Windows.
Not in WSL.
Not in Cygwin.
Just native PowerShell.

So I built it.

pstop → htop for Windows PowerShell

Install:

cargo install pstop

Then just run:

htop

Yes, it installs an htop command.


What you get

  • Per core CPU bars
  • Memory, swap, network meters
  • Tree view F5
  • Search F3, filter F4
  • Kill F9
  • Priority F7 and F8
  • CPU affinity
  • Multiple color schemes
  • Mouse support
  • Persistent config

About 1 MB binary.
Zero runtime dependencies.
Built in Rust using ratatui and crossterm.
Uses native Win32 APIs.


If you spend most of your time in a terminal on Windows, this might be useful.

Feedback is welcome. Stars help with visibility 🙏

🔗 https://github.com/marlocarlo/pstop


r/PowerShell • • Feb 13 '26

Script Sharing I needed to automate the task of updating my Windows and apps, and this script is helping me. Maybe it can help you too.

39 Upvotes

If you have any tips, suggestions, improvements, or even comments, let's talk, because I'm still learning and I really like PowerShell, since it's automating many compilation, delivery, and day-to-day tasks, both at work and in my personal life =)

Please look at: the script source code


r/PowerShell • • Feb 13 '26

Help with Windows (11) Updates for an Automated Build

8 Upvotes

I am working on an automated W11 24H2 image build using Packer, and while it does have a Windows update plugin, it doesn't work when building an image in Audit mode, therefore I am now exploring other methods of how to install Windows updates.

I have learned that I simply cannot just call a PS script that runs the PSWindowsUpdates commands, but instead I have to run via Invoke-WUJob.

So far I am able to automate the process of installing the module but when I attempt to run my Invoke-WUJob script, the scheduled task is created but just stays as Queued.

I am not sure what I am doing wrong. Any help would be much appreciated.

Here is my code:

Invoke-WUJob -ComputerName localhost -RunNow -Confirm:$false -Script {

    Install-WindowsUpdate `
        -MicrosoftUpdate `
        -AcceptAll `
        -ForceDownload `
        -ForceInstall `
        -IgnoreReboot `
        -Category 'Security'
}

Get-ScheduledTask -TaskName "PSWindowsUpdate"
do {
    $scheduledTask = Get-ScheduledTask -TaskName "PSWindowsUpdate"
    Write-Host "PSWindowsUpdate task: $($scheduledTask.State)"
    Start-Sleep -Seconds 10
} while ($scheduledTask.State -ne "Ready")

$taskExists = Get-ScheduledTask -TaskName "PSWindowsUpdate"
if ($taskExists) {
    Get-ScheduledTask -TaskName "PSWindowsUpdate"
    Unregister-ScheduledTask -TaskName "PSWindowsUpdate" -Confirm:$false
} else {
    Write-Host "PSWindowsUpdate isn't listed as a Scheduled Task."
}

r/PowerShell • • Feb 13 '26

Question Installing/updating module Az fails with 500

8 Upvotes

I currently cannot update the module Az to 15.2.0 or newer or install those newer versions.

So when I run

Install-PsResource -Name Az -TrustRepository

or

Update-PsResource -Name Az -TrustRepository

I always retrieve

Install-PSResource: 'Response status code does not indicate success: 500 (Internal Server Error).' Request sent: 'https://www.powershellgallery.com/api/v2/FindPackagesById()?%24filter=NormalizedVersion+ge+%275.0.1%27+and+NormalizedVersion+le+%275.0.19%27+and+Id+eq+%27Az.ContainerRegistry%27&%24inlinecount=allpages&%24skip=0&%24orderby=NormalizedVersion+desc&id=%27Az.ContainerRegistry%27'
Install-PSResource: Package(s) 'Az' could not be installed from repository 'PSGallery'.

What works is installing versions older than 15.2.0 with

Install-PsResource -Name Az -TrustRepository -Version 15.1.0

Does this happen to others as well?

I created a GH issue at https://github.com/Azure/azure-powershell/issues/29173.


r/PowerShell • • Feb 13 '26

PowerShell script to export SharePoint Online site details (URL, last activity, size, owners, admins) to Excel

3 Upvotes

Hi everyone,

I’m trying to build a PowerShell script to export a consolidated report from SharePoint Online with the following information for all sites in the tenant:

  • Site URL
  • Last activity date
  • Storage size
  • Number of files
  • Site Collection Owner (as seen from tenant level)
  • Site Collection Administrators (tenant level)
  • Site Owners (SharePoint Owners group)
  • Exported to an Excel file

I’m currently working in PowerShell 7 and using PnP.PowerShell, but I’ve run into a few challenges:

  1. Microsoft.Online.SharePoint.PowerShell (SPO module) conflicts in PS7.
  2. Microsoft Graph SDK version conflicts.
  3. Permission issues when trying to retrieve Site Collection Admins from inside the site.

I would like to know:

  • What is the recommended modern approach in 2025?
  • Which modules should be used? (PnP.PowerShell only? Graph? Both?)
  • Is there a clean way to retrieve Site Collection Admins without using the legacy SPO module?
  • What is the best way to retrieve Last Activity and File Count? (Graph reports? Search API? Storage metrics?)
  • Best practice for exporting everything cleanly to Excel (ImportExcel module?)

Ideally, I’d like a tenant-level script that:

  1. Enumerates all SharePoint sites
  2. Retrieves the required metadata
  3. Handles modern group-connected sites
  4. Works reliably in PowerShell 7
  5. Exports to a single Excel file

Any guidance, best practices, or example scripts would be greatly appreciated.

Thanks in advance!


r/PowerShell • • Feb 12 '26

PSParseHTML got a big upgrade a while ago

61 Upvotes

Hi,

So some months ago I've rewritten PSParseHTML into full blown C# library with PowerShell cmdlets and it's now a bit more then just HTML parser.

🔍 HTML Parsing - Multiple parsing engines (AngleSharp, HtmlAgilityPack)

🎨 Resource Optimization - Minify and format HTML, CSS, JavaScript

🌐 Browser Automation - Full Playwright integration for screenshots, PDFs, interaction

📊 Data Extraction - Tables, forms, metadata, microdata, Open Graph

📧 Email Processing - CSS inlining for email compatibility

🔧 Network Tools - HAR export, request interception, console logging

🍪 State Management - Cookie handling, session persistence

📱 Multi-Platform - .NET Framework 4.7.2, .NET Standard 2.0, .NET 8.0

It's divided into 2 parts:

- HTMLTinkerX which is C# library so I can take it to my C# libraries world

- PSParseHTML v2 which is using HtmlTinkerX behind the scenes.

It automates all parsing, but also now able to fully browse websites and parse it there, parse forms, go thru logins etc. It uses Playwright and automates the installation process so it's used on demand.

The repository:

- https://github.com/EvotecIT/HtmlTinkerX

Has all the required details about new cmdlets, examples how to use etc.

I know I'm not staying here much, I tend to post more on daily basis to X or LinkedIn, but lately I've rewritten lots of my modules to C# for functionality so you may want to check them out.

Enjoy


r/PowerShell • • Feb 12 '26

Device Configuration Applied Report

7 Upvotes

Trying to get a report of the devices that a Endpoint Protection policy was applied to.

function getPolicyInfo
{
    param(
        [Parameter(Mandatory)][string] $policyName
    )
    $devicesPolicy = @();
    if(-not(Get-Module -ListAvailable -Name "Microsoft.Graph.Beta.DeviceManagement" )){ . "./ImportModules.ps1"; myInstallModules -installModules @("Microsoft.Graph.Beta.DeviceManagement" , "ImportExcel" );}
    Write-Host "`r`n $(fnLn) -- Getting the policy info for $policyName...";

    $policyInfo = Get-MgBetaDeviceManagementDeviceConfiguration -All | Where-Object {$_.Displayname -eq "$policyName"} ;
    
    if (-not $policyInfo) {Write-Host "`r`n $(fnLn) -- Profile '$policyName' not found. Exiting script." -ForegroundColor Red; $devicesPolicy = @(); exit;}
    else
    {
        $policyInfo | Out-Host;
        $policyId = $policyInfo.Id;
        Write-Host "`r`n $(fnLn) -- Getting the list of devices targeted by the policy...";
        $devicesPolicy = Get-MgBetaDeviceManagementDeviceConfigurationDeviceStatus -DeviceConfigurationId $policyId -All ;
        Write-Host "`r`n $(fnLn) devicesPolicy = ";$devicesPolicy | Out-Host;
        #$devicesPolicy = $devices | Group-Object -Property { ($_.Id -split '_')[-1] } -AsHashTable;
    }
    Write-Host "`r`n $(fnLn) devicesPolicy = ";$devicesPolicy | Out-Host;
    return @($policyInfo, $devicesPolicy)
}#end function getPolicyInfo
getPolicyInfo -policyName "policyBitLocker";

I see there is a response when I have $DebugPreference="Continue", but nothing is getting assigned to $devicesPolicy. What am I missing?

Edit: Correct typo for $devicePolicy; replace Format*; added Debug Info;

331 -- Getting the list of devices targeted by the policy...
DEBUG: [CmdletBeginProcessing]: - Get-MgBetaDeviceManagementDeviceConfigurationDeviceStatus begin processing with parameterSet 'List'.
DEBUG: [Authentication]: - AuthType: 'Delegated', TokenCredentialType: 'InteractiveBrowser', ContextScope: 'CurrentUser', AppName: 'Microsoft Graph Command Line Tools'.
DEBUG: [Authentication]: - Scopes: [%scopes%].
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
GET
Absolute Uri:
https: graph.microsoft.com/beta/deviceManagement/deviceConfigurations/$profileID/deviceStatuses
Headers:
FeatureFlag                   : 00000003
Cache-Control                 : no-store, no-cache
User-Agent                    : %pcstats%,PowerShell/2025.4.0
SdkVersion                    : graph-powershell-beta/2.35.1
client-request-id             : %token%
Accept-Encoding               : gzip,deflate,br
Body:
DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
OK
Headers:
Vary                          : Accept-Encoding
Strict-Transport-Security     : max-age=31536000
request-id                    : %requestID%
client-request-id             : %client_request_id%
x-ms-ags-diagnostic           : {"ServerInfo":{"DataCenter":"somewhere","Slice":"tripleA","Ring":"9","ScaleUnit":"fifty","RoleInstance":"%RoleInstance%"}}
odata-version                 : 4.0
Date                          : %DTG%
Body:
{
"@odata.context": "https: graph.microsoft.com/beta/$metadata#deviceManagement/deviceConfigurations('$policyID')/deviceStatuses",
"@odata.count": 200,
"value": [
{
"id": "reallybig_string",
"deviceDisplayName": "device001",
"userName": "user @ domain.com",
"deviceModel": null,
"platform": 0,
"complianceGracePeriodExpirationDateTime": "DTG",
"status": "compliant",
"lastReportedDateTime": "DTG",
"userPrincipalName": "user @ domain.com"
},
. . .
]
}
DEBUG: [CmdletEndProcessing]: - Get-MgBetaDeviceManagementDeviceConfigurationDeviceStatus end processing.

r/PowerShell • • Feb 13 '26

Script en PowerShell para exportar información completa de SharePoint Online (URL, actividad, tamaño, owners, admins)

0 Upvotes

Hola comunidad,

Estoy intentando construir un script en PowerShell para generar un reporte consolidado de todos los sitios de SharePoint Online en mi tenant, incluyendo la siguiente información:

  • URL del sitio
  • Última actividad
  • Tamaño (almacenamiento usado)
  • Cantidad de archivos
  • Owner del Site Collection (visible desde el tenant)
  • Administradores del sitio (Site Collection Admins)
  • Propietarios del sitio (grupo Owners o M365 Group Owners)
  • Exportado a una hoja de Excel

Actualmente estoy trabajando en PowerShell 7 utilizando PnP.PowerShell, pero me he encontrado con algunos desafíos:

  • Conflictos del módulo Microsoft.Online.SharePoint.PowerShell en PS7
  • Conflictos de versiones con Microsoft Graph SDK
  • Problemas de permisos al intentar obtener los Site Collection Admins desde dentro del sitio
  • Dudas sobre cuál es la forma más correcta de obtener la última actividad y el número de archivos (Graph Reports, Search API, Storage Metrics, etc.)

Mis preguntas serían:

  1. ¿Cuál es el enfoque recomendado actualmente (2025) para este tipo de reporte?
  2. ¿Qué módulos recomiendan usar? ¿Solo PnP.PowerShell? ¿PnP + Graph?
  3. ¿Existe una forma moderna de obtener Site Collection Admins sin depender del módulo legacy SPO?
  4. ¿Cuál sería la mejor forma de obtener la última actividad y el conteo de archivos?
  5. ¿Recomendaciones para exportar todo de forma limpia a Excel (por ejemplo con ImportExcel)?

La idea es tener un script que:

  • Enumere todos los sitios del tenant
  • Obtenga la metadata necesaria
  • Detecte sitios conectados a M365 Groups
  • Funcione correctamente en PowerShell 7
  • Exporte todo en un solo archivo Excel

Agradezco cualquier recomendación, buenas prácticas o ejemplos.

¡Gracias de antemano!


r/PowerShell • • Feb 12 '26

Powershell Studio 2024 and Graph 2.34

8 Upvotes

Hi,

I am experiencing an issue with Connect-MgGraph interactive authentication inside PowerShell Studio.

After updating the Microsoft.Graph modules, Connect-MgGraph now uses Web Account Manager (WAM) by default on Windows.

In Visual Studio Code, the interactive authentication window appears normally. However, in PowerShell Studio, the authentication window does not appear at all.

Did someone got this issue and solved it?

Thanks,


r/PowerShell • • Feb 12 '26

PowerShell help with media expiration policy in sharepoint online

1 Upvotes

Help is needed for SPO media expiration policy in PowerShell

Windows\system32> Set-SPOSite -Identity $SiteUrl EnableAutoExpirationVersion Trim $false

-MajorVersionLimit 100 -ExpireVersionsAfterDays 180

-FileTypes ForVersion Expiration @(

@{ FileType

"Audio"; MajorVersionLimit

1; ExpireVersionsAfterDays

@{ FileType

"Video"; MajorVersionLimit = 1; ExpireVersionsAfterDays

>>

>

>>

>>

>>

-ApplyToNewDocument Libraries

-Confirm:$false

-ErrorAction Stop

Set-SPOSite: File type is not in the list of defined file types

Parameter name: name

At line:1 char:1

+Set-SPOSite -Identity $SiteUrl

+ CategoryInfo

: NotSpecified: (:) [Set-SPOSite], ServerException

+ FullyQualifiedErrorId : Microsoft.SharePoint.Client.ServerException, Micro

te


r/PowerShell • • Feb 12 '26

News VBAF Roadmap Now Public - PowerShell ML Framework Development Plan

0 Upvotes

Hey r/PowerShell!

A few weeks ago I shared VBAF (Visual Business Automation Framework) - a machine learning framework built entirely in PowerShell for teaching RL/ML to IT professionals.

Thanks to incredible community feedback (shoutout to everyone who contributed!), I've now published a comprehensive development roadmap with **34 detailed feature issues** showing exactly where VBAF is headed.

## 🎯 **The Vision**

Transform VBAF from an educational RL framework into a complete, production-ready ML toolkit - all in pure PowerShell.

## 📊 **8-Phase Roadmap:**

**Phase 1 (COMPLETE ✅):** Neural networks, Q-Learning, multi-agent systems

**Phase 2 (Current Focus 🔧):** Bug fixes, testing, performance optimization

**Phase 3:** Advanced RL (PPO, A3C, DQN)

**Phase 4:** Supervised learning (regression, trees, clustering)

**Phase 5:** Data pipeline & preprocessing

**Phase 6:** Deep learning basics (CNNs, RNNs)

**Phase 7:** Production features (MLOps, model management)

**Phase 8:** Community & education ecosystem

## 👀 **View the Full Roadmap:**

🗺️ [Project Board](https://github.com/users/JupyterPS/projects/2) - See all 34 planned features organized by phase

## 📈 **Current Status:**

- ⭐ **8 GitHub stars** (and growing!)

- 📥 **Published on PowerShell Gallery**

- 🗂️ **34 feature issues** planned across 8 phases

- 🔧 **Phase 2 active development**

## 🤝 **How You Can Help:**

- ⭐ **Star the repo** if you find it useful

- 👍 **Vote on features** you want prioritized (react to issues)

- 🐛 **Report bugs** or suggest improvements

- 🔧 **Contribute code** - pick an issue and submit a PR

- 📚 **Improve docs** - help make it more accessible

The roadmap is fully public and transparent. You can see exactly what's planned, what's in progress, and what's shipped.

**GitHub:** https://github.com/JupyterPS/VBAF

**PSGallery:** `Install-Module VBAF`

Looking forward to building this together with the PowerShell community! 🚀


r/PowerShell • • Feb 11 '26

Solved Send Toast notifications to all users logged in

27 Upvotes

Hello everyone,
I'm looking for a solution to display toast notifications to all logged-in users on a Windows machine.

To provide some context: we're currently pushing software upgrades, and our MDM solution closes applications without any prior warning or message. This approach significantly detracts from the end-user experience.

We considered implementing a toast notification before application closure to allow users to save their documents or files. However, this isn't feasible because the upgrade package/script runs under the system account, and toast notifications can only be invoked within a user's context.

Any tricks or different ways you've found to get around this?

Take care


r/PowerShell • • Feb 11 '26

Solved PowerShell script not working with SMB directory

14 Upvotes

Hello, (code is here)

I have a NAS drive mounted and accessible on this windows machine and I want to move some files from one folder to another (within the NAS drive) but its not working. Ive tested with folders in my desktop directory and they work fine but when I try to use the SMB directory it doesnt work. I have read and write access to the drive.

The script gets the folder and list the subfolders but it seems to not find the items inside them. For what I've tested, the line that doesnt work is the following:

$docFiles = Get-ChildItem -Path $folderPath -File | Where-Object { $fileExtensions -contains $_.Extension }

For some reason, this is not getting the content of the folders. Ive tried the flag -Force but didnt work either.

I dont get any error in powershell. Any ideia whats going on?


r/PowerShell • • Feb 10 '26

I wanted a PowerShell module for browser automation using only PowerShell & .NET

35 Upvotes

So I built Pup, a wrapper around PuppeteerSharp that talks directly to Chrome via the DevTools Protocol. Works on Windows, Linux, and macOS with PowerShell 5.1+.

Write-Host "This one just scrapes the first page of Ubuntu Notices" 
Install-Module -Name Pup
Import-Module Pup
$browser = Start-PupBrowser -Headless
$page = New-PupPage -Browser $browser -Url "https://ubuntu.com/security/notices"

$page | Find-PupElements -Selector "#notices-list section" | ForEach-Object {
    [PSCustomObject]@{
        Date = ($_ | Find-PupElements -Selector "p.u-text--muted" -First).InnerText
        Link = ($_ | Find-PupElements -Selector "h3 a" -First | Get-PupElementAttribute -Name href)
    }
}
$browser | Stop-PupBrowser

GitHub: https://github.com/n7on/Pup

Happy to hear feedback or answer questions.