Category "powershell"

PowerShell, unable rename registry on the remote computer

How can I rename Registry SubKey instead of deleting it on the remote device? $remoteHive = [Microsoft.Win32.RegistryHive]“LocalMachine”; $regKey =

Why am I getting gibberish result in Windows terminal?

I am trying to compare version in windows terminal. It works great in Git Bash but in Windows terminal it shows gibberish and wrong result? verlte() { [ "$

Windows Container Access is denied. (0x5). using Powershell. But still accessible on Docker Desktop CLI tool

I am running a docker-compose up and spinning up my Windows containers. Then I want to attach to a container. I tried docker attach <container id>, but i

Run powershell scripts from a C program

I'm creating a C program to run several powershell scripts. But when I run the command with the system function it opens the script in a txt file instead of run

How to enumerate available properties of member

In the code below there are a number of properties of "member" I've added "description" property successfully but I can't find out if the account is enabled.

Microsoft Login Check

I'm new to Powershell. I want to know how to do a check if the user log into their account successfully and if not loop back to the beginning. Thank you! if(-n

Stream Analytics: Best parameters to choose for the autopause of a day wise TUMBLINGWINDOW stream job and best trigger time to set for that function

Context I have a daywise TUMBLINGWINDOW (similar to the one shown below) SELECT DATEADD(day, -1, System.Timestamp()) AS WindowStart System.Timestamp() A

How can I call a Powershell / Command Line Script using a BrowserAction in a FireFox WebExtension?

When the button is pressed, I want to get the URL from the current tab and pass it as an argument to the script. I know that I have to use browser.browserAction

Windows Powershell: How to compare two CSV files and output the rows that are just in either of the file but not in both

I have a file first.csv name,surname,height,city,county,state,zipCode John,Doe,120,jefferson,Riverside,NJ,8075 Jack,Yan,220,Phila,Riverside,PA,9119 Jill,Fan,120

Unable to retrieve createdDateTime along with mail,displayName of Azure AD Users

I am trying to retrieve createdDateTime of Azure AD Users along with their Name and email address. I found below commands: To connect to Azure AD: Connect-Azur

How to run a msi file in powershell by passing a key in it

I have downloaded the msi file to desktop. C:\Users\Administrator\Desktop\package.msi. I am trying to run this msi file through powershell. when running this ms

Clear out powershell terminal variables

Say I have the following powershell script: $hello = "Hello World" Write-Output $hello When I run it I get Hello World Then I decide that I want my variable

Trying to back up my Bitlocker Key to ADDS Through Script

I'm trying to automatize the process of storing BitLocker Keys to ADDS. I wanna be able to run the following script at logon, in order to do that, as the OS is

powershell regex replace using variable parameters when calling replace

I wondering how to make the following powershell code work with regular expressions. For example I want to call it like this: rename_file -OneFile proj1_file.t

How to execute Powershell's "start-process -Verb RunAs" from inside a Batch where the elevated command inherits the Batch's environment?

1. Problem I have a complicated batch file where some parts need to run with elevated/admin rights (e.g. interacting with Windows services) and I found a Powers

How can I connect to my REST API with powershell (CYPHERTRUST)

I am searching for how to connect to my rest API with a Powershell script I know that I need a to send my Body with the POST Method but cant define how to do it

EWS Powershell Script to manipulate messages in junk email

I'm trying to write a simple Script, in PowerShell using EWS managed API. The premise is I need to establish connection with our Enterprise Office365 Exchange e

Powershell Progressbar partially hidden

I have a progress bar that is run when a job is done. Unfortunately, the progress bar is partially hidden. This is the code: Add-Type -AssemblyName System.Windo

Microsoft-Graph: Invoke-MgGraphRequest returns unable to cast object of type JsonObject to JsonArray

I am trying to use Invoke-MgGraphRequest to convert immutableEntryIds to ewsIDs. I have been following Microsoft's documentation and have created the following

Functions do not get loaded into Workflow

When I use a Workflow, only the functions directly called in the Workflow get loaded from the calling script. When dot-sourcing the following script and call Ma