Skip to main content

Questions tagged [powershell]

Windows PowerShell is a command line shell and scripting language for Windows that supersedes the CMD.exe shell and batch language. PowerShell is also an automation engine for Windows that provides functionality similar to Windows Script Host and VBScript.

0 votes
0 answers
12 views

How to diagnose recurring unwanted language settings in Microsoft Edge? [closed]

Following this question, in my Microsoft Edge browser on Windows, where I have admin privileges, there is a setting in the edge://settings/languages section for "Preferred languages". ...
Foad's user avatar
  • 682
0 votes
0 answers
18 views

Script that checks whether agents running on workstation need idea where to write output [closed]

I want to write a script that checks whether specific software is running on a computer, i manage around 200 computers and I think this is the best way to check whether the necessary security agents ...
Lukas Yčas's user avatar
0 votes
0 answers
17 views

Invoke-PnPTenantTemplate -Verbose will raise this error "Acquiring oAuth token for permission scope Group.ReadWrite.All. Access token acquired"

I have 2 office 365 tenants (Source & Destination). I used this command to get the Source communication site template inside my PowerShell 7.0 version 7.3.4:- PS C:\Users\mohan> Connect-...
microsoftdeveloperdesigner's user avatar
0 votes
1 answer
27 views

How to copy files from one location to another using powershell and skipping files that are corrupt or that cannot be read?

I am looking to use powershell to copy all file from one location to another, however sometimes a file in the current directory is corrupt and cannot be copied. Powershell seems to stop and not ...
Dr_Xunil's user avatar
  • 338
0 votes
1 answer
41 views

Automatically run powershell script as administrator

I'm new to this, sorry if i'm posting this in duplicate! I'm trying to create a script to add/modify some registry keys.. to test it i'm modifying simple keys from the power modes on my laptop. ...
Augusto Barbosa's user avatar
0 votes
1 answer
37 views

Unable to install Powershell 7 on Windows Server 2016 DataCenter .. Error "Access denied"

I have purchased a VM where I connect to it using RDP. now I downloaded 2 files from the web; Microsoft Edge exe file + PowerShell 7.0 MSI file, as follow: - then using the administrator user >>...
microsoftdeveloperdesigner's user avatar
0 votes
1 answer
55 views

How can I run a batch file on macOS?

I've been attempting to install a mod for Elden Ring on Mac, and it uses a batch file to install and launch. I can't seem to get it to run with Wine, receiving these errors: 0074:err:ntoskrnl:...
matthew kuni's user avatar
1 vote
0 answers
42 views

Use Powershell to enable "Only allow a magic packet to wake the computer" checkbox in a network adapter?

I would like to have a Powershell script which enables the "Only allow a magic packet to wake the computer" checkbox, which is the bottom one shown in this image: I tried this, but it doesn'...
EllipticalInitial's user avatar
0 votes
0 answers
16 views

How to run a command using command line arguments for Windows Terminal using wt command?

I'm trying to setup my environment. The below code is working, I just need to execute "Code ." in the new tab opened. Tried doing -Command 'code .' , -c 'code .' , but no luck. Here's my ...
sohdata's user avatar
  • 101
1 vote
1 answer
49 views

How to change "Original size" of paper in printer using Powershell

Good day! The standard paper for our users is A4. However, after printer installation, the "Original size" always defaulted to A3 or Letter. Even after trying to save printing preferences ...
Alex's user avatar
  • 39
0 votes
1 answer
23 views

Powershell interfacing with MobaXTerm get's stuck when SSHing to IP

I have the following PowerShell code below: # SSH connection parameters $sshHost = "MyIP" $sshUsername = "MyUsername" $sshPassword = "MyPassword" # Commands to execute ...
sw29's user avatar
  • 1
2 votes
1 answer
47 views

How to set the password expiring date for a local user remotely?

I am building an app to manage some local passwords. I already have some functions working and I can get the expiring date of the local user's password. However I can't seem to find a way to set a new ...
SIMOES's user avatar
  • 49
0 votes
1 answer
40 views

Powershell program, displaying function not working [SOLVED]

Morning to everyone, I have an issue with a powershell script. Context I'm trying to create a program to edit tf2 pop file in powershell, right now I'm trying to have a program that open a txt file, ...
Maslie's user avatar
  • 116
0 votes
0 answers
18 views

Way to upload images, using existing Invoke-WebRequest websession, with Powershell 5.1.19041.4522 [migrated]

I have the below code that works to login to a site (not google, just an example), then submit a form on the page, but it requires images be submitted separately to a URL that is created upon form ...
user66001's user avatar
  • 1,265
0 votes
1 answer
47 views

How to escape an already escaped string in Regex

I am using the below code, as part of a script to turn a canonical name into a distinguished name. However should I present the CN "test.example.com/This\/is\/a\/escaped/\space/\OU/person, I get ...
user66001's user avatar
  • 1,265

15 30 50 per page
1
2 3 4 5
395