Parallel copy of files on multiple servers
I want to copy all the files in a folder called test from ServerA to multiple Servers. I am using command like below, however it is not copying the files: Executing the below script from ServerA $serverlist = New-PSSession -ComputerName ( Get-Content…
Enable applocker powershell commandlets in Home versions of Windows
According to this site, I should be able to apply local applocker polices on Home versions of Windows. I cannot get the Set-AppLockerPolicy command to run in powershell. I am running Windows 10 Home Version 22H2 (OS Build 19045.4529). I have applied…
Move mails from one folder to another folder via powershell script for all mailboxes
Hello, Recently, I have done a cross tenant mailbox migration by manually export and import pst procedure. Now, I have been facing an issue. My all mails were imported in outlook on the web under TargetRootFolder which created by System. Now, I want to…
powershell script to check all Entra ID Role Assignment Members
Hi, Im checking on how i can manage to get all members of Entra ID Role Assignment and Administrators. when i try to export the file only the Scope with Directory is exported, not all members are exported. When i tried the Get-AzureADDirectoryRoleMember…
WARNING: Unable to acquire token for tenant 'organizations' with error 'InteractiveBrowserCredential authentication failed: Method not found: 'Void Microsoft.Identity.Client.Extensions.Msal.MsalCacheHelper.RegisterCache(Microsoft.Identity.Client.ITokenCa
Hi Team, Can someone here please assist me with this error to connect my PowerShell session using the Connect-AzAccount ? PS C:\WINDOWS\system32\WindowsPowerShell\v1.0> Connect-AzAccount WARNING: Unable to acquire token for tenant 'organizations' with…
Cannot run New-AzActionGroup after New-AzActionGroupReceiver
Hello, I am trying to create a new action group using PS. The group will use webhook. To achieve this I need to create an action group receiver. Code: $ActionGroupShortName = 'Alert' $ActionGroupReceiverName =…
I'm trying to use the Get-MgUserDrive command in PowerShell with the 'me' alias, full email address, and explicit user ID, but keep getting a 'User not found' error
I run the command below in powershell with using the Invoke-MgGraphRequest cmdlet. Please find below the Powershell Command´s Screenshot and the error message. Here is the Error msg: What do you suggest? Gemini propose an Alternative…
Getting certificates details using Invoke-Command powershell gives error
Invoke-command -computername server1 -ScriptBlock { dir cert: -Recurse | Where-Object { $_Subject -like 'server1' }} Gives error The system cannot open the device or file specified. Please help on how to this.
Connect-ExchangeOnline started giving a strange error
Hello all, I created a script in powershell to collect mailbox information from our tenants on Exchange Online. It stopped working somewhere aroung the 1st of May. Im going to explain what my process is in some detail and when the error occurs. There are…
Azure Virtual Desktop Auto Shutdown and Power On
Hello All, We're currently managing a pool of 30-40 VMs, and to optimize our licensing costs with Microsoft, we're planning to shut down idle VDI VMs that haven't been used in over 8 hours. To automate this process, could you assist us with a PowerShell…
How to enable schedule patching on azure vm using powershell
I am using below command as per documentation https://learn.microsoft.com/en-us/azure/update-manager/prerequsite-for-schedule-patching?tabs=new-prereq-powershell%2Cauto-portal&WT.mc_id=Portal-Microsoft_Azure_Automation#code-try-4 But it is asking to…
Run script on multiple users (using Excel table)
Hello everyone, im trying to build a PowerShell script that runs a command multiple times but with different URLs, but i cant quite understand how to build it. The point is to remove a user from the Share Point sites listed in the column D. So lets say…
Powershell scripts in System Center Orchestrator 2022
Hi all, We are trying to move from SC Orchestrator 2012 to 2022 version. in previous version, we were using the Powershell integration Pack which allowed us to run PowerShell scripts in remote machines and use output of those scripts in runbook. Since…
How to get the Sleep Setting and set new Sleep Setting for System from PowerShell?
Hey Experts, We are looking for a PowerShell command to get the current sleep time interval from the system and set a new time interval for the system. Currently, we have four sleep settings in the system, and we want all the settings to be retrieved and…
Get-MgUserPhotoContent does not return what was set using Set-MgUserPhotoContent
Describe the bug When using Set-MgUserPhotoContent and then Get-MgUserPhotoContent, the returned value is not the same as was set using Set-MgUserPhotoContent. I assume the image is compressed. To Reproduce Set-MgUserPhotoContent -infile…
I need the powershell command to active the PIM eligible assignment
Hello Microsoft. My Requirement is i have Multiple PIM Role Eligible Assignments in Azure. I am not using MFA for activate, just using the Justification so every day I need to active the multiple roles which is taking time to activate all the role. Is…
Change Product Key of Windows Server 2022 using Ansible and/or PowerShell script
Hi there, I am trying to automate the process of provisioning a Windows Server based Virtual Machine using Azure and Ansible. My company has some Windows Server product keys available through the Microsoft Partner Program. My goal is to use one of these…
Connect-SPOService : No valid OAuth 2.0 authentication session exists ?
How to fix the issue to connect to SharePoint Online using PowerShell like below? Because when I am using the PowerShell ISE, and then the command: Connect-SPOService -Url 'https://CompanyName-admin.sharepoint.com' I got the error:…
ExchangeOnline Powershell - Get-QuarantineMessage -ReleaseStatus Requested no results
I'm having a problem running a Get-QuarantineMessage Powershell script for ExchangeOnline in Powershell. My manager is able to run it connecting to the exact same account and get results. When I run it, I just get brought back to the prompt without any…
Intune Configuration Profiles, Remediation and Preferred Wi-Fi SSID
We are attempting to replace an existing wifi network that uses standard RADIUS. With a new network uses PSK without RADIUS for authentication. The goal is to get our fleet of Windows devices (mostly 10s, and a few 11s) to switch over to the new network…