Update-AzVM will not assinged a user defined identity
Hello, I am creating a set o virtual machines and need to assign them a user defined identity. This code below at the last command returns everything is ok but at the Azure portal the identity is not assigned. I still can assing it at the portal but…
How can I Uninstall MS SARA for Enterprise via PowerShell?
Hello, I am looking for a way to uninstall MS SARA for Enterprise via PowerShell. I have looked at the SARA for Enterprise documentation, and it does not give any guidance on this matter. Note: I am an IT Technician trying to automate our PC build…
Disabling OneDrive Access and Removing Data for Specific Users via PowerShell
I would like to explore options for deleting specific users' OneDrive data using a PowerShell script. I have around 1500+ active users with OneDrive access, and I want to disable OneDrive access for around 500+ specific users and remove the files from…
Starting applications from MsAccess VBA using shell, can take seconds !!
My MsAccess program is starting task using the VBA Shell version. Starting a program using shell() should take a couple of milliseconds, and sometimes it works that way, but frequently it takes seconds (3.5) !! Not workable at all! Some info: I am…
Read SCIM provisioning configuration of Service Principal
How to read SCIM provisioning configuration of Service Principal using PowerShell or Graph API? Regards
powershell to get all users and their managers recursively
I am looking to pull all Active Directory users and their managers all the way up to the chain. I get how to do get-aduser -filter * -properties * | select name, manager export-csv -path "csv path" I also get: $Users = Get-ADUser -filter *…
Automate daily checks for Azure VMs
Hello, I would like to check the CPU percentage, Disk IOPS, and Memory availability values of Azure VMs daily in an Excel file. I am considering using Azure Automation for this. Is there a script that I can refer to for automating the process of…
Connect to CloudShell
Hi, I have granted one of my users access to Azure Kubernetes Service. The user wants to connect to Azure Cloud Shell from the Azure portal but is unable to do so, as connecting to Azure Cloud Shell requires a storage account, and the user does not have…
Connect-SPOService : No valid OAuth 2.0 authentication session exists ?
I have not been able to connect using the command “Connect-SPOService -Url https://company-admin.sharepoint.com” for several months now. I pick account Enter password click "Next" And get this empty "working..." window…
Add a local IPP printer queue programmatically or with Powershell when Windows protected print mode is enabled
After enabling Windows protected print mode I am no longer able to add a printer queue programmatically using the Win32 API nor using Powershell. Windows protected print mode requires me to use the built-in driver called Microsoft IPP Class Driver. The…
Install a local IPP printer queue programmatically or with Powershell when Windows protected print mode is enabled
After enabling Windows protected print mode I am no longer able to add a printer queue programmatically using the Win32 API nor using Powershell. Windows protected print mode requires me to use the built-in driver called Microsoft IPP Class Driver. It…
Script to request and get access token from Microsoft graph API with certificate instead of client secret
I want to avoid using the standard MSGraph or AzureAD modules by using Invoke-WebRequest. There are plenty of examples on how to use a client secret for App Registration authentication with Invoke-WebRequest. The below is from Vasil Michev's excellent…
Restore OneDrive files in bulk from Preservation Library
Is there a way to pull files from the OneDrive Preservation library in bulk? User had two computers and had OneDrive sync'd on both. While in the process of issues they lost their OneDrive files and had cleared the trash. They are all now located in the…
How to assign Static Private IP address to Network interface of replicated item under Azure Recovery service vault using PowerShell
Using below script to assign Virtual network and static IP to replicated item under Recovery service vault. Script successfully assigns virtual network and static IP to the replicated item as per Job status. But static IP is not reflecting on Azure…
Resource "some application ID" does not exist or one of its queried reference-property objects are not present.
When I run: Get-MgApplication | FL DisplayName, AppID I get some application IDs and when I run: Get-MgApplication -ApplicationId "any application ID from above" it shows: Get-MgApplication : Resource 'xxxxxxxxxxxxxxxxxx' does not exist or one…
Resource '<application ID' does not exist or one of its queried reference-property objects are not present.
So I run: Get-MgApplication | FL DisplayName, AppID And I get some application IDs And when I run: Get-MgApplication -ApplicationId "<any application ID listed from above>" It all says: Get-MgApplication : Resource…
How to Exclude a User from Auditpol - Discovered a possible bug with auditpol.exe
Hello all, I am trying to exclude a user from being audited on a Server 2019 Domain Controller. Using the following: Auditpol /set /user:adm.svc.acc /subcategory:"Logon" /Success:disable Reason for doing so, it's a service account that is…
Intune script that will check the uptime of each machine in the organization and restart laptop after checks
Hello everyone, I need your help, please, because I’m feeling desperate. I want to create a detection and a remediation script in Intune. As a result, I would like it to check if the uptime of each machine reaches 5 days and send a warning to the user:…
Change PowerShell Font when "run as administrator"
Hey,I tried to change the font of the powershell and it was easy. However, every time I let it "run as administrator", it will use the system default font and will be reset even I change it (doesn't affect normal run- not admin). I looked…
Delete multiple members of distribution group using CSV thru Exchange Management Shell On Premise
I received a request from our employees to delete all the members of this particular distribution group within our organization, and upon checking this DL has a total of 7,000 members. Is there any powershell script I can use to delete just the members…