Invoke-command Access denied on Windows 11 but works with Windows 10
I'm trying to connect to a remote computer using Invoke-Command while running an elevated Powershell ise. I recently upgraded to Windows 11 and my scripts no longer work and are giving me an Access is denied error. Here is a test script I've been using…
Automation runbook for start/stop VM using Storage account blob
Hi, I am trying to deploy a powershell runbook in automation account which should read contents of CSV stored in storage account blob using system assigned managed identity of automation account. Looking for a piece of code as I don't want to use sas…
How to fix "403 forbidden" while trying to access MS Graph API during creation of User Flow using PowerShell or Bash in Azure AD B2C Tenant?
Hi all, I need help with API permissions for MS Graph API while creating User Flow using PowerShell. Context: I am trying to create User Flow in Azure AD B2C tenant, but while trying to send Graph API requests using Invoke-MgGraphRequest command, I am…
Need a poweshell script to list all the SPO sites with the certain character in URL where the offline client availability is set to true
Need help with a powershell to list all the SPO sites where the offline client availability is set to true.
Getting of Notification Email using Powershell Script from Azure SAML Applications
How can we get the Notification Email (see image attached) using Powershell script in Microsoft Entra ID SAML applications whose certificates are near expiry within 60 days? Currently, we can get the Key Credentials of each SAML Applications, but we…
How to setup Azure Automation account to restore database on SQL MI ?
Hello, I have a PowerShell script (see below) that I currently run daily from a task scheduler on a VM to restore a production database (SQL Managed Instance) to a secondary instance (SQL Managed Instance). I am planning to move this process to an Azure…
Trying to add Microsoft Sentinel to a Log Analytics Workspace in Azure but keep getting error "The gateway did not receive a response from 'Microsoft.SecurityInsights' within the specified time period"
I am trying to add Microsoft Sentinel to a Log Analytics Workspace connected to a Virtual Machine in the Azure portal but keep getting the error "The gateway did not receive a response from 'Microsoft.SecurityInsights' within the specified time…
Deleting Storage Account Pending Migration to SRP in Powershell
After much research on these forums and online in general, I'm trying to run the following two commands in attempt to delete a storage account that is pending migration to SRP: Move-AzureStorageAccount-Abort -StorageAccountName…
Real "files on demand". Automatically uploading cached OneDrive user files?
Hello, I recently came across a seemingly simple task, but in fact I have been unable to get OneDrive to do what I want it to do for two weeks now. I'll try to describe it briefly. The problem is that when a Windows user restarts or logs off their…
Exchange admin center bugs for manage email forwarding
I have set up the email forwarding in the Exchange Admin Center, where it is mentioned that "The mailbox owner will not be able to view and change this forwarding address." But I found that user logging into their mailbox can see which…
How can I troubleshoot issues connecting my "Powershell Onedrive Graph" API to Microsoft Graph Explorer for bulk exporting OneDrive photo URLs to Excel using a Microsoft 365 Business Basic license?
Please find below a screenshot of Microsoft Graph , Azur Api and MS365 license. Thank you, Regards,
How to deploy KIR through script
Team, We have over 1000 assets managed by a third party RMM tool. The document here describes how to configure local groups manually through the GUI. Since we don't have GPO or Intune, we need a way to do this through CLI or a script. Please help us…
Getting an error when trying to setup Exchange Online ForwardingAddress in Azure Runbook
Hello, I am trying to setup an Azure Automation Runbook in which I convert a User Mailbox to a Shared Mailbox and setup a ForwardingAddress. I setup all the permissions and converting the mailbox is working, setting a forwarding address throws the…
Invoke-PnPTenantTemplate is not performing any action.. "Access token acquired"
I have 2 SharePoint Online tenants which both have a modern communication sites. now i used this command to get the source site template:- PS C:\Users\mohan> Connect-PnPOnline -Url "https://ssms.sharepoint.com/sites/PPM-test/"…
What is the UserID required by Get-MgUserContact?
According to the documentation, Get-MgUserContact requires either a UPN or a UserId in the -UserId field. However, mail contacts don't have UPNs, and the documentation doesn't define what a mail contact's UserID is. I've tried email address, display…
i need help to delete the additional root folders i created
Hello. so i made the big mistakes of creating root folders and files and i need help to delete them so basically i was trying to code a node and java file and i didnt thought of what permissions im giving to the VS code and about 1 or 2 hours later i…
Restore a SQL Server backup to Azure SQL Managed Instance
What is the best way to restore an SQL Server backup file (.bak) from a storage container to Azure SQL Managed Instance, and overwrite the existing database with the backup? I am looking for the appropriate PowerShell Az command to accomplish this task.…
Discrepancy in Windows Form Appearance between PowerShell ISE and PowerShell
Hello Everyone, I've encountered an issue with the appearance of a Windows Form created using PowerShell. When running the script within PowerShell ISE, the form displays correctly with clear fonts and the expected size. However, when running the same…
Help with PowerShell - remove an attribute value if a user is not in all 4 groups
Hi, I am hoping to get some suggestions on how to do this. There are 4 defined groups. I need to get a list of AD users that have adminCount = 1 Then I need to compare. If a user is not in all 4 groups (not just 1 group), then remove the adminCount. This…
![](https://techprofile.blob.core.windows.net/images/siIzquzvok-OvkV73N8s5Q.png?8DA48C)
Runtime Exception When Using Set-OrganizationConfig
Trying to run Set-OrganizationConfig cmdlet in powershell EXO V3 module returns runtime exception: "unable to find type [uint]". Has anyone had this error before and know of a potential solution? I cannot find anything online to reference…