Pregunta

Just a quick on this morning.

Is it possible to create a file and store in it the Powershell runspace/session memory?

Something like:

out-file 'powershell session space'?

instead of:

out-file C:\temp\system_info.txt

I'm creating an e-mail template that catches data from the machine the script is run on and sends it to the domain admin. However if it's run by another user who for whatever reason hasn't got access to the 'temp' folder or even the C:\ drive, I want the file (script_info.txt) to be created in the memory of the PS session. Is that possible?

Thanks

¿Fue útil?

Solución

Found out it was this:

out-file "$env:TEMP\file.extention"

Otros consejos

Surely the user has write access to somewhere on the local drive.

Your other option may be Memory-Mapped Files.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top