I am attempting to setup a script where it looks inside a file, retrieves the user description, the username, and the date/time that each of the users ...
I am attempting to setup a script where it looks inside a file, retrieves the user description, the username, and the date/time that each of the users ...
Hi I am trying to connect to a remote host using Powershell but getting the following error: New : The term 'New' is not recognized as the name of a ...
The timestamp is returning a timestamp with a strange format: The problem is that I want to upload the information to powerBi and it gives me an er ...
I have an existing email template file for Outlook with To, CC, Subject and Body prefilled. I can replace the values I need on the subject just fine, ...
I have created two variables that pick multiple values from a particular file. Here is the part of my script for that: These are the results for th ...
Hey Everyone so I am able to set the sharepoint sites sensitivity labels in my tenant by doing them individually using the following commands: And ...
My Windows 11 laptop has two versions of PowerShell installed: 5.1.22621.963 7.3.1 (PowerShell Core) Following MS instructions, I want to ins ...
I'm trying to write a function that will run 1 line of code if run PowerShell 5.1, and a different line if code if run in PowerShell 7. The problem I ...
I have a PowerShell script that logs into Azure and assign a group call membership to a user based on the input email address the user gave: This g ...
Background I have a data object in PowerShell with 4 properties, 3 of which are strings and the 4th a hashtable. I would like to arrange for a new ty ...
even though I made it a one-liner, It still won't work. the result is a new PowerShell window opening for a split second and closing. how can I mak ...
So I am trying to write a script that will disable the spooler service when it is running and enable the spooler service when it is not. Every time I ...
I usually run a modified version of the script provided by Microsoft on how to “Convert per-user MFA enabled and enforced users to disabled”. If I ru ...
When I run the script inside ISE(as admin) I get error: Running in Powershell I get expected output, of GUID numbers which I double checked are the ...
I am having some trouble validating a file input in a script. Using the following function Then I call the function with these two input files T ...
With Powershell 7 there have been several changes to Invoke-RestMethod. I've written some modules that are wrappers for several Invoke-RestMethod call ...
I am trying to print parts of several docx files. The code below works in Windows PowerShell 5.1, but not in PowerShell 7.3. I would like to understan ...
The wider context of this is that I am trying to write some powershell code to extract a listing of the contents of my Office 365 mailbox in CSV form ...
I've recently discovered the Windows Terminal and wanted to give it a try. However, it doesn't seem to work the same as the original PowerShell Consol ...
How can I start a service on an Azure VM remotely? It seems impossible to do without Powershell being "Run as Administrator". Is there a way to launch ...