Hello. I have setup multiple ps1 scripts which connect to O365/MSOL PowerShell and allows me to manipulate individual schools accounts.
I wish to be able to collect these PS1 files together using the LS *ps1 command and use the Name to fire a powershell command and look for the accounts which begin with office@
LS *ps1 work in a variable and I can look at the names it provides by doing $cmd = ls *ps1
$cmd.Name
I cannot get this to fire a powershell command or run each ps1 as a foreach loop.
can anyone help please
I cd into the directory which contains the PS1 scripts.
Thank you in advance