OK to post GPT-generated scripts here? What about github?


PhilB

Well-known member
Member
VIP
Local time
2:42 AM
Posts
723
Location
Western USA
OS
Windows 11 2H25
I needed a script to take FULL CONTROL of all files and folders on a drive, so I asked GPT (5). First 4 times I ran the script i got Powershell errors. I fed those back into GPT and fifth time was a charm. I have the impression that I'm sort of training GPT on writing Powershell. But no matter. My Windows scripting is restricted to CMD files. Powershell would just be too much time for me to learn. Now with AI, I don't have to (famous last words).

I would like to post my script here. This script does an entire drive in one go, unless some of the "take ownership" scripts out there. And I never knew there was a difference between take control and take FULL control. This script does all that, plus give me file counts, an ETA and a progress bar. I will be happy to post this script if the mods agree. If not I can still desribe what I asked GPT to do.

I have tried out ChatGPT 4 and 5, and also Claude and Grok. I like GPT 5 the best because it asks you if you want additional features in your script.
 

My Computer My Computer

OS
Windows 11 2H25
Computer type
PC/Desktop
Manufacturer/Model
DIY
CPU
AMD 9900X
Motherboard
MSI X870E Carbon
Memory
64 GB
Graphics Card(s)
AMD 9070 XT
Sound Card
built-in
Monitor(s) Displays
Dell 24"
Hard Drives
Sabrent 1 TB NVMe, 4 x SSD (need to check models), 4 x 3.5" HDD, 8-16 TB, all WD
PSU
Seasonic 850
Case
Fractal Design North XL (which I likw)
Cooling
Corsair AIO for CPU, fans for case
Keyboard
Das Keyboard 4
Mouse
Corsair M65 (white)
Internet Speed
1 TB download
Browser
Firefox
Antivirus
Bitdefender
Other Info
Also have Lenovo T14S laptop (me) and Lenovo Slim 71 (wife)
You’ve already said it was AI-generated, and you’re not a PowerShell expert. I think it’s totally fair to post it with that full disclosure. Just like with any other code folks post, others can choose to use it or not.
 

My Computer My Computer

OS
Windows 11 Pro 25H2
Computer type
PC/Desktop
Manufacturer/Model
Intel NUC12WSHi7
CPU
12th Gen Core i7-1260P
Motherboard
NUC12WSBi7
Memory
64 GB Micron PC4-25600
Graphics Card(s)
Intel Iris Xe Graphics
Sound Card
on-board Realtek HD Audio
Monitor(s) Displays
Dell U3219Q
Screen Resolution
3840 x 2160
Hard Drives
Samsung SSD 990 PRO 1TB
Crucial MX500 2 TB
Antivirus
Microsoft Defender
That's a very good question @x509. What with everyone using A1 these days, maybe asking @z3r010 John or @Brink would be advisable to clarify if AI responses fall within forum rule #9 which says:
No direct linking to executable files and scripts - exe, bat, ps1, cmd, vbs etc.

The thing about some AI responses are that they can become user or machine specific. I have shared an AI response several times not even thinking that I shouldn't be doing it.
 

My Computers My Computers

System One System Two

  • OS
    Windows 11 Pro 25H2 26200.8655
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Optiplex 7080
    CPU
    i9-10900 10 core 20 threads
    Motherboard
    DELL 0J37VM
    Memory
    32 gb
    Graphics Card(s)
    none-Intel UHD Graphics 630
    Sound Card
    Integrated Realtek
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    2x1tb Solidigm m.2 nvme /External drives 512gb Samsung m.2 sata+2tb Kingston m2.nvme
    PSU
    500w
    Case
    MT
    Cooling
    Dell Premium
    Keyboard
    Logitech wired
    Mouse
    Logitech wireless
    Internet Speed
    so slow I'm too embarrassed to tell
    Browser
    #1 Edge #2 Firefox
    Antivirus
    Defender+MWB Premium
  • Operating System
    Windows 11 Pro 24H2 26200.8457
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink Mini PC SER5
    CPU
    AMD Ryzen 7 6800U
    Memory
    32 gb
    Graphics card(s)
    integrated
    Sound Card
    integrated
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Crucial nvme
    Keyboard
    Logitech wired
    Mouse
    Logitech wireless
    Internet Speed
    still too embarrassed to tell
    Browser
    Firefox
    Antivirus
    Defender
    Other Info
    System 3 is non compliant Dell 9020 i7-4770/24gb ram Win11 PRO 26200.8457
That's a very good question @x509. What with everyone using A1 these days, maybe asking @z3r010 John or @Brink would be advisable to clarify if AI responses fall within forum rule #9 which says:
No direct linking to executable files and scripts - exe, bat, ps1, cmd, vbs etc.

That sounds like github links would not be allowed.
The thing about some AI responses are that they can become user or machine specific. I have shared an AI response several times not even thinking that I shouldn't be doing it.
So how about you upload a script to ChatGPT, and then ask for the changes you need.

I will message @Brink directly.
 

My Computer My Computer

OS
Windows 11 2H25
Computer type
PC/Desktop
Manufacturer/Model
DIY
CPU
AMD 9900X
Motherboard
MSI X870E Carbon
Memory
64 GB
Graphics Card(s)
AMD 9070 XT
Sound Card
built-in
Monitor(s) Displays
Dell 24"
Hard Drives
Sabrent 1 TB NVMe, 4 x SSD (need to check models), 4 x 3.5" HDD, 8-16 TB, all WD
PSU
Seasonic 850
Case
Fractal Design North XL (which I likw)
Cooling
Corsair AIO for CPU, fans for case
Keyboard
Das Keyboard 4
Mouse
Corsair M65 (white)
Internet Speed
1 TB download
Browser
Firefox
Antivirus
Bitdefender
Other Info
Also have Lenovo T14S laptop (me) and Lenovo Slim 71 (wife)
You can post the code in a code block here, otherwise it wouldn’t exist. I’ve done it plenty of times.
 

My Computer My Computer

OS
Windows 11 Pro 25H2
Computer type
PC/Desktop
Manufacturer/Model
Intel NUC12WSHi7
CPU
12th Gen Core i7-1260P
Motherboard
NUC12WSBi7
Memory
64 GB Micron PC4-25600
Graphics Card(s)
Intel Iris Xe Graphics
Sound Card
on-board Realtek HD Audio
Monitor(s) Displays
Dell U3219Q
Screen Resolution
3840 x 2160
Hard Drives
Samsung SSD 990 PRO 1TB
Crucial MX500 2 TB
Antivirus
Microsoft Defender
You can post the code in a code block here, otherwise it wouldn’t exist. I’ve done it plenty of times.
I have sent a DM to @Brink. if he OKs it, I will post this script along with some "documentation."
 

My Computer My Computer

OS
Windows 11 2H25
Computer type
PC/Desktop
Manufacturer/Model
DIY
CPU
AMD 9900X
Motherboard
MSI X870E Carbon
Memory
64 GB
Graphics Card(s)
AMD 9070 XT
Sound Card
built-in
Monitor(s) Displays
Dell 24"
Hard Drives
Sabrent 1 TB NVMe, 4 x SSD (need to check models), 4 x 3.5" HDD, 8-16 TB, all WD
PSU
Seasonic 850
Case
Fractal Design North XL (which I likw)
Cooling
Corsair AIO for CPU, fans for case
Keyboard
Das Keyboard 4
Mouse
Corsair M65 (white)
Internet Speed
1 TB download
Browser
Firefox
Antivirus
Bitdefender
Other Info
Also have Lenovo T14S laptop (me) and Lenovo Slim 71 (wife)
It's fine.
 

My Computers My Computers

System One System Two Other systems

  • OS
    Windows 11 Workstation
    Computer type
    PC/Desktop
    Manufacturer/Model
    doofenshmirtz evil incorporated
    CPU
    Ryzen 9 5950X
    Motherboard
    Asus ROG Crosshair VIII Formula
    Memory
    Corsair Vengeance RGB PRO Black 64GB (4x16GB) 3600MHz AMD Ryzen Tuned DDR4
    Graphics Card(s)
    ASUS AMD Radeon RX 6900 XT 16GB ROG Strix LC OC
    Sound Card
    Sound BlasterX Katana
    Monitor(s) Displays
    3 x27" Dell U2724D & 1 x 34" Dell U3415W
    Hard Drives
    Samsung 980 Pro 1TB M.2 2280 PCI-e 4.0 x4 NVMe Solid State
    Drive
    PSU
    ASUS ROG THOR 850W 80 Plus Platinum
    Case
    ASUS ROG Strix Helios Midi-Tower ARGB Gaming Case
    Cooling
    ASUS ROG Strix LC Performance RGB AIO CPU Liquid Cooler - 360mm
    Keyboard
    Logi Ergo
    Mouse
    Logitech MX Vertical
    Internet Speed
    900/100 Mbps
    Browser
    Chrome
    Antivirus
    Windows Defender, Malwarebytes Pro
    Other Info
    HP M281 Printer
    Logitech Brio Stream webcam
    Yeti X mic
  • Operating System
    Windows 10
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop
    CPU
    i7
  • Nothing to see here.
Best of luck when the Artificial Idiot deletes all your files :lmao:
 

My Computer My Computer

OS
Windows 11 Pro
Computer type
PC/Desktop
Manufacturer/Model
Self build
CPU
Core i7-13700K
Motherboard
Asus TUF Gaming Plus WiFi Z790
Memory
64 GB Kingston Fury Beast DDR5
Graphics Card(s)
Gigabyte GeForce RTX 2060 Super Gaming OC 8G
Sound Card
Realtek S1200A
Monitor(s) Displays
Viewsonic VP2770 & Dell (secondary)
Screen Resolution
2560 x 1440
Hard Drives
Kingston KC3000 2TB NVME SSD & SATA HDDs & SSD
PSU
EVGA SuperNova G2 850W
Case
Nanoxia Deep Silence 1
Cooling
Noctua NH-D14
Keyboard
Microsoft Digital Media Pro
Mouse
Logitech Wireless
Internet Speed
80 Mb / s
Browser
Chrome
Antivirus
Defender, Malwarebytes Free & AdwCleaner
Best of luck when the Artificial Idiot deletes all your files :lmao:
Can you give it a rest with all the negative "Artificial Idiot" comments about AI? I understand you’re not a fan, but could you stop posting them on every AI thread? Some of us who actually use AI find it pretty useful. If you don’t have anything constructive to add, then please don’t.
 

My Computers My Computers

System One System Two Other systems

  • OS
    Windows 11 Workstation
    Computer type
    PC/Desktop
    Manufacturer/Model
    doofenshmirtz evil incorporated
    CPU
    Ryzen 9 5950X
    Motherboard
    Asus ROG Crosshair VIII Formula
    Memory
    Corsair Vengeance RGB PRO Black 64GB (4x16GB) 3600MHz AMD Ryzen Tuned DDR4
    Graphics Card(s)
    ASUS AMD Radeon RX 6900 XT 16GB ROG Strix LC OC
    Sound Card
    Sound BlasterX Katana
    Monitor(s) Displays
    3 x27" Dell U2724D & 1 x 34" Dell U3415W
    Hard Drives
    Samsung 980 Pro 1TB M.2 2280 PCI-e 4.0 x4 NVMe Solid State
    Drive
    PSU
    ASUS ROG THOR 850W 80 Plus Platinum
    Case
    ASUS ROG Strix Helios Midi-Tower ARGB Gaming Case
    Cooling
    ASUS ROG Strix LC Performance RGB AIO CPU Liquid Cooler - 360mm
    Keyboard
    Logi Ergo
    Mouse
    Logitech MX Vertical
    Internet Speed
    900/100 Mbps
    Browser
    Chrome
    Antivirus
    Windows Defender, Malwarebytes Pro
    Other Info
    HP M281 Printer
    Logitech Brio Stream webcam
    Yeti X mic
  • Operating System
    Windows 10
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop
    CPU
    i7
  • Nothing to see here.
Can you give it a rest with all the negative "Artificial Idiot" comments about AI? I understand you’re not a fan, but could you stop posting them on every AI thread? Some of us who actually use AI find it pretty useful. If you don’t have anything constructive to add, then please don’t.
AIs are generally useful and are well used by me but they do at times produce some real howlers hence their idiocy.
 

My Computer My Computer

OS
Windows 11 Pro
Computer type
PC/Desktop
Manufacturer/Model
Self build
CPU
Core i7-13700K
Motherboard
Asus TUF Gaming Plus WiFi Z790
Memory
64 GB Kingston Fury Beast DDR5
Graphics Card(s)
Gigabyte GeForce RTX 2060 Super Gaming OC 8G
Sound Card
Realtek S1200A
Monitor(s) Displays
Viewsonic VP2770 & Dell (secondary)
Screen Resolution
2560 x 1440
Hard Drives
Kingston KC3000 2TB NVME SSD & SATA HDDs & SSD
PSU
EVGA SuperNova G2 850W
Case
Nanoxia Deep Silence 1
Cooling
Noctua NH-D14
Keyboard
Microsoft Digital Media Pro
Mouse
Logitech Wireless
Internet Speed
80 Mb / s
Browser
Chrome
Antivirus
Defender, Malwarebytes Free & AdwCleaner
AIs are generally useful and are well used by me but they do at times produce some real howlers hence their idiocy.
They are idiots, but if I tell them to be serious, they become serious idiots!
 

My Computers My Computers

System One System Two

  • OS
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Asus TUF Gaming F16 (2024)
    CPU
    i7 13650HX
    Memory
    16GB DDR5
    Graphics Card(s)
    GeForce RTX 4060 Mobile
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    512GB SSD internal
    37TB external
    PSU
    Li-ion
    Cooling
    2× Arc Flow Fans, 4× exhaust vents, 5× heatpipes
    Keyboard
    Logitech K800
    Mouse
    Logitech G402
    Internet Speed
    30Mbit/s up, 500Mbit/s down
    Browser
    FF
    Antivirus
    What's an antivirus?
  • Operating System
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Medion S15450
    CPU
    i5 1135G7
    Memory
    16GB DDR4
    Graphics card(s)
    Intel Iris Xe
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    2TB SSD internal
    37TB external
    PSU
    Li-ion
    Keyboard
    Logitech K800
    Mouse
    Logitech G402
    Internet Speed
    30Mbit/s up, 500Mbit/s down
    Browser
    FF
Whether a script comes from AI or me or anywhere else, you have an obligation to review it before turning it loose on a system that’s important. If you don’t have the requisite knowledge, that’s fine; let another trusted person review it.

That’s why, when I post a script that could delete something, I usually put the -WhatIf switch on those lines, so you have to intentionally remove that switch to make the script do any work.
 

My Computer My Computer

OS
Windows 11 Pro 25H2
Computer type
PC/Desktop
Manufacturer/Model
Intel NUC12WSHi7
CPU
12th Gen Core i7-1260P
Motherboard
NUC12WSBi7
Memory
64 GB Micron PC4-25600
Graphics Card(s)
Intel Iris Xe Graphics
Sound Card
on-board Realtek HD Audio
Monitor(s) Displays
Dell U3219Q
Screen Resolution
3840 x 2160
Hard Drives
Samsung SSD 990 PRO 1TB
Crucial MX500 2 TB
Antivirus
Microsoft Defender
Whether a script comes from AI or me or anywhere else, you have an obligation to review it before turning it loose on a system that’s important. If you don’t have the requisite knowledge, that’s fine; let another trusted person review it.

That’s why, when I post a script that could delete something, I usually put the -WhatIf switch on those lines, so you have to intentionally remove that switch to make the script do any work.
As the OP here, I have tested any scripts that I want to upload here. That said, I would have to improve a lot just to become a PowerShell newbie. :unsure: So can I post it with a note that it needs some expert reviews. As I said in an earlier post, I think that I have been "training" the AIs in some of the fine points of Powershell. I know that there is an issue only when PowerShell throws an error. Otherwise, if it executes and seems to work, I'm satisfied.

That's why on the one hand I want to share something useful. On the other hand, I don't want people to wreck their systems because of something I uploaded. That's why I'm being so cautious. And I don't want to get banned.
 

My Computer My Computer

OS
Windows 11 2H25
Computer type
PC/Desktop
Manufacturer/Model
DIY
CPU
AMD 9900X
Motherboard
MSI X870E Carbon
Memory
64 GB
Graphics Card(s)
AMD 9070 XT
Sound Card
built-in
Monitor(s) Displays
Dell 24"
Hard Drives
Sabrent 1 TB NVMe, 4 x SSD (need to check models), 4 x 3.5" HDD, 8-16 TB, all WD
PSU
Seasonic 850
Case
Fractal Design North XL (which I likw)
Cooling
Corsair AIO for CPU, fans for case
Keyboard
Das Keyboard 4
Mouse
Corsair M65 (white)
Internet Speed
1 TB download
Browser
Firefox
Antivirus
Bitdefender
Other Info
Also have Lenovo T14S laptop (me) and Lenovo Slim 71 (wife)
Back
Top Bottom