Question

Locked

Powershell : SOS

By adamjnichols ·
Dear All,

Fairly new to powershell - i've made a boo boo.

Got a custom powershell module. Wrote another script to import the module and run the cmdlet.

Unfortunately, in the 'import' process, i've overwritten the entire "c:\windows\system32\windowspowershell\v1.0\modules" folder. So now, not only does my script not work but nothing else PowerShell does either!!

Wouldn't be much of an issue if it were just my machine but this has run on 180 machines - doh.

Any advice on how to 'reload' the default modules or something similar on 180 machines?

Sticky one this...

Thanks very much in advance.

Adam

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

Fixed It

by adamjnichols In reply to Powershell : SOS

Hi All,

Thought i'd provide an update as this has now been resolved. There may well be a better way of doing this but i took what i knew;

1. Fresh Windows 8.1 install on VM
2. Copy all 'Module' folders from "C:\Windows\System32\WindowsPowerShell\v1.0\Modules" (on new VM)
3. Created central repository to store 'Default' modules
4. Created PowerShell script to copy from repository to C:\Windows.. on target machines - Invoking CMD's ROBOCOPY.
5. Ran this on target machines via management system

That was a headache but deffinately one to keep hold of! Hope this helps somebody.

If anyone knows a better way of doing this please do let me know!

Best,
Adam

Back to Windows Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums