Content
i can not install powershell modules
when I type install module in powershell, it immediately goes to a new line.What to do?


How to rename files by date with PowerShell including characters between it
Good afternoon: First of all, note that I'm very new to this, so maybe I don't express myself as I should, I hope you understand me. I am trying to bulk rename a folder of images and videos based on the date they were taken. For now, this is the…


How to output to CSV file only with the offline PC hostname and with the PC owner and PC status showing as failed on 3 columns on CSV file?
Hi all, Need some advice please. I have below script that I use, it pings all the PC hostnames listed on Hostnames.txt Fyi, I only type the PC hostname on the .txt file, I didn't include the PC user owner, if I want to Output it with the PC owner, how…


Powershell Workflow Scripts for teams
I am exploring the option for Powershell workflow as I am trying a Powershell script for Microsoft teams. I would want to make use of parallel function. However, I notice that, whenever I run the script, the second script block under parallel doesnt work…


How to output to CSV file only with the offline PC hostnames and PC owners and PC status showing as failed on 3 columns on CSV file?
I tried the code below, it shows all the list for UP and Down PCs and showing Unknown for all the PC owners. Host PC Owner PC Status PC1 Unknown UP PC2 Unknown UP PC3 Unknown Down PC4 Unknown …


How do I update an object / jason in PowerShell?
Hi, I have the following object / jason and want to add one (or more) "target" to it. How do I do that? $Body = @{ enrollmentConfigurationAssignments = @( @{ target = @{ …


why is this showing in my vs code: Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. Try the new cross-platform PowerShell https://aka.ms/pscore6 PS C:\Users\Dell\Documents> & 'c:\Users\Dell\.vscode\extensions\ms-vscode.cppto
Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. Try the new cross-platform PowerShell https://aka.ms/pscore6 PS C:\Users\Dell\Documents> &…


Unable to run powershell script to enable sso to azure portal with google credentials
Hi Team, I am testing enabling sso to azure portal using google credentials I am following these documents to set it…


Read-SqlTableData : Failed to connect to server
Good morning. Greetings. I am making a connection to a remote SQL server on the local network via the following commands: $user = "domain\sql" $pass = "password" $credential = New-Object -TypeName…


API policy deployment using powershell fails policy error manual copy in portal succeeds
Hi All, Below is the full policy file and when i copy this manually in portal and tested, everything works great and no error. <policies> <inbound> <base /> <send-request mode="new"…


Help Migrating to Get-MgAuditLogSignIn to grab AuditLogs and Device Details
Hi, Previously we were using Get-AzureADAuditSignInLogs I'm trying to migrate over to Get-MgAuditLogSignIn but I'm running into a problem. Below is the code for Get-AzureADAuditSignInLogs $TodaysDate = Get-Date -format 'yyyy-MM_dd' $Outputfile =…


"Could not load file or assembly 'Microsoft.Identity.Client, Version=4.44.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae'." error whilst trying to use ExchangeOnlineManagement v3
"Could not load file or assembly 'Microsoft.Identity.Client, Version=4.44.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae'." error whilst trying to use ExchangeOnlineManagement v3 Problem: So, the scenario, you have installed…


Can’t use ExchangeOnlineManagement V3.1.0 together with Microsoft.Graph.Authentication V1.27.0 in powershell
Can’t use ExchangeOnlineManagement V3.1.0 together with Microsoft.Graph.Authentication V1.27.0 in powershell I’m having some trouble with using the ExchangeOnlineManagement V3.1.0 together with Microsoft.Graph.Authentication V1.27.0 in powershell. Both…


How to retrieve the image name of a private product
Hi, We published an image on the marketplace in preview mode and now we want to use the azure client to create a VM with 2 NICs. We need at least two NICs because our image is a security network appliance (embeds a firewall). Additional question: is it…


How to run a powershell script to generate exe in ubuntu with ps2exe package
Hi All, How to make powershell script to generate exe in ubuntu with ps2exe package. My script is working fine in Windows OS but the same script not working in Ubuntu. I need to run this script in Ubuntu because I have only one AWS cloud server which…


How to check if a predetermined list of users has mfa enabled via script or powershell command
I need to check if users on a list have mfa enabled. There are many users to consult on the Portal. And I also don't want to do the query using the get-mfareports.ps1 script that brings the status of all users, as I would have to compare line by line…


The 'Connect-PnPOnline' command was found in the module 'PnP.PowerShell', but the module could not be loaded.
I want to connect to PnP.PowerShell, but when I execute this command: Connect-PnPOnline -Url <> -Interactive I obtain this error: Connect-PnPOnline : The 'Connect-PnPOnline' command was found in the module 'PnP.PowerShell', but the module could not…


High CPU usage for vmmem
Hi, I have experienced high CPU usage for Vmmem frequently (~every 2days) and the only solution at the moment is simply restart my machine. It is understood that is related to WSL and I do have a Docker image running on Ubuntu on Windows. However it is…


Is Microsoft.Graph.Mail for powershell free ?
Hello everybody, I want to access mail messages from a shared mailbox in EXOL with powershell. After some digging it seems like microsoft.graph.mail is best suited for this task. Microsoft says on one of their websites, accessing data with the graph API…


How can I use New-CsApplicationAccessPolicy -identity $policyName on macos?
Hi Microsoft team, I try to Configure the application access policy but when I tried following this docs: https://learn.microsoft.com/en-us/graph/cloud-communication-online-meeting-application-access-policy in the step Create an application access policy…

