Questions tagged as 'powershell'

1
answer

Docker-Machine create Windows 10: Powershell Problems

I'm trying to create a docker-machine in windows 10 with the following command: docker-machine --debug create --driver hyperv default2 Complete debug: link But I'm taking the following error, just like this, with the carecters like th...
asked by 21.07.2018 / 04:48
0
answers

How to pass a function in an array in powershell?

I need to create a script, some of the fields are preventable and I would like to pass a function to edit it, but when I step inside the array it pops an ERR .     
asked by 26.09.2017 / 03:22
1
answer

Powershell interactive script menu. I can not get out (invalid option)

I am a beginner in Powershell and I have a small problem. I have 2 scripts (menu and submenu). I run script_A (menu) and when I select option 9 (exit) it works as expected. But when I run script_A and I choose option 1 (submenu), and then...
asked by 11.08.2017 / 03:35
0
answers

VB.NET + PowerShell

I would like to create a program in VB.NET that executes the following code in PowerShell Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} I created a .ps1 fil...
asked by 10.08.2017 / 13:09
1
answer

Navigate folders and subfolders with powershell

Recently I did a recovery of the data of a HD, but the folder where the files are, is separated by subfolders with the name of each extension (eg, jpg, gif ...), and each subfolder contains other subfolders separating the files in "small" quanti...
asked by 17.06.2017 / 17:22
0
answers

Creating Active Directory Users Using Forms

I'm creating a form to create a user with the fields in question, but at this point you're giving me the following error:    New-ADUser: The server is not available to process the request   At D: \ Scripts \ CreateUsersAD \ CreateUserAD_v2.p...
asked by 28.09.2016 / 12:30
2
answers

Rename files in PowerShell based on the destination folder

I have the path A and the destination B . This destination is repeated for multiple clients as the structure below shows: A -->app.exe -->server.ini -->js.png. B-Cliente 01 -->app_cliente01.exe -->server.ini --&g...
asked by 09.12.2015 / 18:17
1
answer

Determine the index of a numeric character

How can I store the position of the first numeric character of a string ? Example: $NomeEstacao = "Atendimento05" # posição 11 (carácter 0) $NomeEstacao = "Direcao46" # posição 7 (carácter 4) I tried to use $a.IndexOf("\d")....
asked by 06.11.2015 / 12:49
0
answers

Powershell command to list members

Someone has already encountered this situation, power shell command to list AD members connected to the shared printer in each sector.     
asked by 27.05.2015 / 13:07
0
answers

powershell script for offline office key decryption

I removed the "2007" office key from a "dead" PC that was on the registry Now I was modifying the popular "Search-RegistryKeyValues" script, to directly pass the value to decrypt. But I'm not sure what to "give". My question is on the line...
asked by 01.07.2015 / 18:33