Questions tagged as 'powershell'

0
answers

Read and write from a remote PC to a shared powershell

This is my code Write-Host "Remote copy a file" $username = 'Usuario' $password = 'Password' $myfile = [System.IO.File]::ReadAllBytes("C:\user.txt") ; $Escribir={[System.IO.File]::WriteAllBytes("\192.x.x.x\foreach.txt", $args)} ; $pw = Con...
asked by 14.12.2018 / 19:16
1
answer

skip in powershell

Hi, I'm new to programming, but I'm using PowerSHELL, and I want to make a script showing the permissions of a user. I already achieve it only that it shows me all the permits and they can not see all of them Function Get-UserPermission {...
asked by 06.12.2018 / 22:54
0
answers

Execute a Powershell file from ASP C # without exhausting / using the IIS memory

I have a Powershell file ps1 that I need to run from a webapp hosted on IIS created in ASP C #; the Powershell file is on the server where the app lives, when I run it manually from the server, it works well and it gives me the expected results,...
asked by 15.11.2018 / 20:18
0
answers

ps1 working well in ISE and not in powershell console or in scheduled task

I'm getting a little crazy already. I have a ps1 script that works perfectly in powershell ISE but when I tell it to run directly with powershell or from a scheduled task it runs only once and closes (I have programmed to place the -noexit param...
asked by 17.10.2018 / 09:48
1
answer

Run powershell from SQL SERVER

I am trying to obtain a PowerShell query, where I get back the free space in all the disks of my linked servers, this by means of a distributed query, nevertheless when executing this query with the xp_cmdshell I get an error, I will leave the q...
asked by 05.10.2018 / 17:04
1
answer

create a multi program installer with chocolatey

There is some way to create a multi installer programs through chocolatey, create in a file .bat or .cmd where to install install chocolatey and often start installing a list of previously created programs, and install the latest version of each...
asked by 04.10.2018 / 23:29
1
answer

Change the date format from Epoch to datetime in PowerShell

I have a String that represents a time in Epoch and I need the correct format to be able to enter it into a SQL Server database, from PowerShell. So far I can change the Epoch format to a very long date format, EXAMPLE: Date in Epoch to conve...
asked by 10.10.2018 / 19:23
0
answers

Dates in power shell

I created a program task with PowerShell so I have a source folder (files in txt with different creation dates) and a destination folder (where I receive the files txt of origin but already converted to csv ) to upload it t...
asked by 20.09.2018 / 16:56
0
answers

how to pass script from sqlite3 to shell script?

My query is as follows: I open a .db file from the cdm of sqlite3, with some queries and I want that same code to be executed as a script from the powershell, so I can create an automated process to execute it in certain time of day. Is th...
asked by 28.08.2018 / 17:19
1
answer

how can I post elastic search from windows?

I am developing a system that will post a log that I have hosted on a virtual server, for now just post the fields that I have not defined and post them in a generic way, the program will also parse it clear-host $contenido=Get-Content -Path \...
asked by 18.07.2018 / 16:45