Overclock.net - An Overclocking Community - View Single Post - Question about Powershell Scripting

View Single Post
post #1 of (permalink) Old 01-09-2019, 07:05 AM - Thread Starter
Destrto
New to Overclock.net
 
Destrto's Avatar
 
Join Date: Apr 2013
Location: Richardson, TX
Posts: 2,255
Rep: 80 (Unique: 63)
Question about Powershell Scripting

Hey guys, I have a question related to Powershell Scripting. I am admittedly very new to this, so bear with me, as I've only just started googling this topic yesterday.

So, I currently have a script, that I'm running on a Server 2008 R2 environment, that pulls all inactive users from Active Directory and lists their last logon timestamp. Then exports that data to a CSV file. It works exactly how I would like. However, If another user logs in under their own credentials to run that script, they get "Access Denied" to the CSV filename that the script tries to create.

Is there anything I can do or change about the script so that any user can run this script and have the file be created without this issue?

Any help would be appreciated.

EK Club XCrossXFire ClubX
-OCN Water Cooling Club-
Destrto
(13 items)
CPU
AMD FX-8370
Motherboard
MSI 990FXA-Gaming
GPU
AMD PowerColor RX 580
RAM
G.Skill - Ripjaws X Series 16Gb
RAM
G.Skill - Ripjaws X Series 16 GB
Hard Drive
Samsung 850 500Gb
Hard Drive
Seagate 3 Tb
Power Supply
Raidmax Vampire 800 Watt
Cooling
EK-Suprema​cy MX CPU ​Block
Cooling
XSPC 240mm​ Radiator
Cooling
XSPC 240mm​ Radiator
Cooling
EK-XRES 140 DDC 3.2 PWM Elite
Case
HBT Gravity6
▲ hide details ▲
Destrto is offline