Linked Questions

1 vote
1 answer
3k views

i have a script to run and he works fine when i use that on PowerShell ISE, but i need to run at .ps1 file (double clicking) and when i try this, hothing happen... the powershell's window opens but my ...
Lucas Crespo Ferreira's user avatar
0 votes
0 answers
47 views

I have written a very simple PowerShell script called "open backup.ps1". It just goes: start ms-settings:backup When I run it from the Powershell ISE or choose "Run with PowerShell"...
ricecrispies's user avatar
138 votes
4 answers
297k views

I've been forcing the usage of chcp 65001 in Command Prompt and Windows Powershell for some time now, but judging by Q&A posts on SO and several other communities it seems like a dangerous and ...
Paul Kim's user avatar
  • 1,572
10 votes
1 answer
39k views

I have a script that sits in Program Files folder and accepts arguments: verbose and restart Running it from its folder works perfectly: powershell ./<file.ps1> -verbose:$True -restart Trying ...
ocp1000's user avatar
  • 611
2 votes
2 answers
6k views

I have a powershell script that is in my startup: %appdata%\Microsoft\Windows\Start Menu\Programs\Startup\ Note, the script itself is not in startup. Rather in \Startup\ is a shortcut to the script. ...
Jonesome Reinstate Monica's user avatar
3 votes
1 answer
8k views

Hi I have a script on a memory stick that I want to be able to run in cmd line before a computer has windows fully installed. (the stage just after you've connected to a network). Cmd used to run the ...
Vilestorm's user avatar
1 vote
1 answer
5k views

I've got a script that installs a certain BP Program called iLink (Crosslink). The Script works fine and installs Java 6.21 and both Crosslink Components and also installs through DISM .Net 3.5 ...
Brendan's user avatar
  • 21
4 votes
2 answers
3k views

I have a simple .ps1 script that basically just creates a directory. When I right-click on the script in Windows Explorer and select "Run with PowerShell", it gives the following error ...
charlesz's user avatar
  • 333
1 vote
1 answer
1k views

This code: $username = 'Username' $password = 'Password' $securePassword = ConvertTo-SecureString $password -AsPlainText -Force $credential = New-Object System.Management.Automation.PSCredential $...
Mario Palumbo's user avatar
1 vote
2 answers
963 views

I have this simple PowerShell script: Copy-Item -path ('\\PC1\Images\' + (Get-ChildItem -Path '\\PC1\Images' -Attributes !Directory *.dat | Sort-Object -Descending -Property LastWriteTime | Select-...
Ωmega's user avatar
  • 44k
1 vote
2 answers
716 views

I have a shortcut file that points to a PowerShell script file that is located in a different directory, and when that PowerShell script is executed via the shortcut file I require to obtain the ...
ElektroStudios's user avatar
0 votes
0 answers
1k views

I'm using onenote as a documentation tool for some trivial tests and I sometimes use scripts. I was using aside multiple scripts for automating stuff. I would like to include these scripts in ...
gonepap's user avatar
1 vote
2 answers
443 views

This powershell code works fine: powershell -NoProfile -Command {Start-Process -FilePath wscript.exe -Verb RunAs -ArgumentList '"C:\Users\TestAccount\Desktop\cartella con spazi\test.vbs" &...
Mario Palumbo's user avatar
1 vote
1 answer
629 views

In my directory I have a file called "t1.ps1" and a second file called "t1 - something.ps1". Both of them run fine when run fine, when executed via right click run with PowerShell ...
peter's user avatar
  • 13
1 vote
1 answer
298 views

I want to place PowerShell code in a BAT File and start the BAT file from the Windows explorer by double-click. Powershell shall execute BAT as PowerShell script. The intention is show in this example ...
harper's user avatar
  • 13.8k

15 30 50 per page