PoshSec / PoshSecFramework

A framework for PowerShell and PoshSec scripts for network management, security, and maintenance.
BSD 3-Clause "New" or "Revised" License
145 stars 23 forks source link

Default Scripts Directory / First Time Setup #18

Closed vScripter closed 10 years ago

vScripter commented 10 years ago

Two suggestions/requests:

  1. As part of the First Time Setup, could you add URI detail that would display the UNC path where things will be created/modified? I took a guess when it prompted me that there were already scripts in my 'Scripts' directory, which I just happen to also maintain at C:\Scripts [good thing I took a backup, first; it cleaned that directory out, just like it said it would ;) ]. In my experience, C:\Scripts is a popular script location, especially on shared systems & servers, as such, the default behavior may cause some undesired results.
  2. In response to #1, modify the default behavior to wipe out contents of C:\Scripts. Maybe create a sub-dir within C:\Scripts, like C:\Scripts\PoshSecFramework, and treat that as the root.
Ben0xA commented 10 years ago

vN3rd,

Great feedback. The intent was to put psf into a subdirectory and not directly in the C:\ drive location. So if you put it in C:\psf, it will create C:\psf\Scripts C:\psf\Modules, etc.

I will add a check to see if the folders already exist on the first time utility.

vScripter commented 10 years ago

Awesome; sounds good.

Did I miss some place that asks what/where the root folder should be placed? I think it just defaulted to using C:\Scripts as the root when I ran the first time setup.

Thanks again!

Ben0xA commented 10 years ago

I've added a check to see if psf is running from the root directory. I'll also update the readme to encourage people to put it in a sub folder.

https://github.com/PoshSec/PoshSecFramework/commit/5d2c6080ca44e45019780c0f4ec2411f8b2194a6

Feel free to reopen this request if this doesn't solve your issue.

Thank you again!

vScripter commented 10 years ago

Superb; I'll sync later this afternoon and test.

Thanks!