Questions tagged as 'powershell'

1
answer

Rename all files in a folder to random names

I need a command to rename all files in a folder to a random name, which keep the same file extension, and preferably with numbers, what I've achieved so far was this: forfiles /P c:\teste\ /c "cmd /c rename @path %RANDOM%.@ext" however...
asked by 02.02.2016 / 18:20
1
answer

Open multiple programs in different workspaces using script in windows 10

I'm wanting to open some programs on different work screens that I have to use frequently. And I wanted to know how I make a script to automate this. I made a small, simple .bat script to make it easier echo Abrindo o Netbeans start /d "C:\...
asked by 24.08.2017 / 21:22
2
answers

execute script with administrator permission

I have the following code snippet: foreach($File in $(Get-ChildItem -Path $FromPath)){ $ObjFolder.CopyHere($File.fullname, $CopyOptions); } It copies the files to the windows folder, however the users are not allowed to do thi...
asked by 18.11.2014 / 11:56
1
answer

How to run more than one command in powershell?

I have the following AWS Cli command that runs on Windows PowerShell and downloads a specific folder inside an S3 bucket: aws s3 cp s3://rfcarga/RF73 . --recursive However, I have other collections of images to download as well, for exampl...
asked by 05.11.2018 / 17:19
1
answer

Compress Files in PowerShell

How can I create a PowerShell script to compress files in a specific folder?     
asked by 19.01.2018 / 13:04
2
answers

Copy file to ClipBoard using PowerShell

What command should I use through PowerShell to send a file to the Clipboard? I've tried this command: "C: \ Test.text" | Set-Clipboard But this command copies the text "C: \ Test.text" and not the file into memory.     
asked by 16.02.2016 / 17:15
1
answer

Error starting PowerShell in Windows Server 2008 R2. How to solve?

I have installed SQL Server 2014. When I start PowerShell on Windows Server 2008 R2 and do the "sqlps" command to test, this error occurs which shows in the image below ... On another computer, with windows 7 and the same version of SQL Serve...
asked by 20.08.2015 / 21:25
3
answers

How to disable CTRL + C in batch?

Is it possible to disable the CTRL + C batch command?     
asked by 30.04.2018 / 23:42
1
answer

Chocolatey in Windows Powershell

I'm trying to use the native Windows Powershell commands to install the Chocolatey packages, but when I use a command like Get-ChocolateyVersion I get the error message:    C: \ Program Files \ WindowsPowerShell \ Modules \ chocolatey...
asked by 03.03.2018 / 16:54
3
answers

Sed Alternative with PowerShell

On UNIX I would do something like this: sed -n '/início/,/fim/ p' < arquivo.txt On Windows we have PowerShell, how do you do it with it?     
asked by 04.05.2016 / 20:52