How can I combine 2 get-ADComputer queries in 1
Can someone please help me? I am trying to find computers that match this criteria (see from screenshot Screenshot 2024-06-26 085801.png) Right now I have 2 queries, Find all enabled computers : $allEnabledComputers=Get-ADComputer -Filter…
PowerShell MFA opens browser instead of mini-browser
Recently I reset my Windows 11 PC and also upgraded to PowerShell 7.4.2. Something is now causing any MFA sessions in PowerShell to launch a new tab in my default browser rather than opening a mini-browser to handle the modern authentication. It should…
![](https://techprofile.blob.core.windows.net/images/Ot4SV06o0Uq0kOpu-HOnhA.png?8D871C)
![](https://techprofile.blob.core.windows.net/images/Ot4SV06o0Uq0kOpu-HOnhA.png?8D871C)
Use PowerShell cmdlets in C#
Is it possible to use the cmdlets of a specific PowerShell version in C#? PowerShell has its limits regarding OO programming, so I'd like to use C# more, and make use of the power of the PowerShell cmdlets from within C#. My requirement is to have access…
Why do Get-AzSentinelAlertRule/Incident Powershell CLI queries not always provide specified output detail?
When running the following List-all-alert-rules query, Get-AzSentinelAlertRule -ResourceGroupName "myResourceGroupName" -workspaceName "myWorkspaceName" all specified field key:value pairs are returned for every rule, including the…
Listing file information filtered on values in a file
Hi, I would like to list sizes on all files in a directory, but the listed file names must match filenames picked up from a file. Basic information file size from this; Get-ChildItem -Path "\servername\DATA\files" -File | Select-Object…
Onedrive - batch download files
Someone shared a OneDrive folder with me containing over 20,000 files. Due to the download size limit, I'm unable to select and download them all at once. I tried using browser extensions, but they aren't reading the files. Reading online, I found…
Bulk Update of Users in Entra ID
I need a PowerShell script that updates all of my users' Employee IDs. NONE of the scripts I have found have worked due to one reason or another. I need a script that is recent using cmdlets and parameters that actually work.
Get-AdminPowerApp fails when authenticating using service principal
I registered an application and added it as a Service Principal according to this guide: https://learn.microsoft.com/en-us/power-platform/admin/powershell-create-service-principal. I then logged in as this service principal. I am trying to get a list of…
EWS service bind failure with powershell
I'm facing an issue while trying to use a powershell script to connecto to Exchange 2016 EWS service to extract calendar info from users' mailboxes. The error I get is Exception calling "Bind" with "2" argument(s): "The request…
![](https://techprofile.blob.core.windows.net/images/mEVUgP8_AwAAAAAAAAAAAA.png?8D8B49)
![](https://techprofile.blob.core.windows.net/images/a1395d6d60e64acc8c1bfc104037f1aa.png)
I'm hoping to find a sharepoint powershell script to enable only major versions at the site level. Is this possible?
Too many folders do ea parent. I'm hoping to find a sharepoint powershell script to enable only major versions at the site level. Is this possible?
how to enable internet connection share on windows server core 2016
please, how to enable internet connection share on windows server core 2016, just with command line console or powershell.
How to launch Microsoft Edge to a specific Workspace?
How can I launch Microsoft Edge directly to a specific shared Edge Workspace, ie what is the command line switch? Preferably I would like to launch two workspaces at once; more preferably I would like to launch them on to the last desktop region that…
How can I change the ProxyAddresses property associated with a guest user using PowerShell
Guest users in M365 do not have 365 mail boxes. Emails to guest users are sent to the external email address provided when the guest user is created. On creation of a guest user the user object has the following properties: Mail = "<user's…
![](https://techprofile.blob.core.windows.net/images/a1395d6d60e64acc8c1bfc104037f1aa.png)
Execute ps1 file on startup with all users
Hello Everyone, I am trying to execute the ".ps1" file which is making changes in the registry "HKCU" path. I want that every user which is present on the local machine, should execute this file on startup. I have tried a few things,…
Office 365 Apps frequently get disconnected from work account
The problem occurs on all Office 365 Apps when users log into their session from powered off pc, as everyone do at the beginning of a work day. It occurs on apps which are connected to a work account via the feature located on Windows in…
What PowerShell script can list all Azure AD users along with their last login date, in a CSV?
Hi there What PowerShell script can list all Azure AD users along with their last login date, in a CSV? Thanks.
How to create a webapp slot without copying settings using PowerShell?
I want to create a Slot for an Azure WebApp using PowerShell, without copying any settings from the main production slot. The command I'm using is: New-AzWebAppSlot -ResourceGroupName $ResourceGroup -Name $ApplicationName -Slot $SlotName -ErrorAction…
How to get a list of AD users that are set to change password at next logon
Hello, I am trying to export a list of all users in AD including a column for "ChangePasswordAtLogon" attribute. I have tried a lot of different variations but none of them have worked. This is one of the formats that didn't work. …
How do I use New-MgRoleManagementDirectoryRoleEligibilitySchedule?
I am trying to create a script that applies a role and a scope to a user. The below code as what I have tried, but the result I get is a 404 error. What am I missing? "message":"No HTTP resource was found that matches the request URI…
Invite bulk guest user using powershell
I want to invite bulk guest user using powershell and add guest user to group directly using script I dont want them to send notification when they were being added to Entra but when they added to group I want to send them notification for me for eg:…