Solved

Is there a way to deploy the PowerShell AD module to our users?

Posted on 2014-04-04
2
181 Views
Last Modified: 2014-04-08
Hello,

I wrote a PowerShell script that requires the ActiveDirectory module (i.e. Import-Module ActiveDirectory). It works without issue on my PC. However, I need to run it from a login script for all of our users and it won't because, despite having PowerShell on their PCs (Windows 7 x64), it won't run because this hasn't been installed. I know that this can be installed manually but we have 100's of PCs and I'm looking for a way to deploy it automatically. In my searching on the web, I haven't found a way to accomplish this but I'm thinking that there's got to be a way. Any way of doing this? I can't believe that no one has ever written a PS script that they wanted to deploy that uses AD.

Thank you.

-Marc Johnson
0
Comment
Question by:Marc_Johnson
2 Comments
 
LVL 29

Accepted Solution

by:
becraig earned 500 total points
ID: 39979364
Download this KB:
http://www.microsoft.com/en-us/download/details.aspx?id=7887

Then simply write a script something like below:
gc serverlist | %  {
if (!(Test-Path \\$_\C$\temp))
{mkdir \\$_\C$\temp}
invoke-command -computername $_ -scriptblock {
cmd c:\temp\kbname.exe 
}
#you can maybe put a sleep then reboot and test for response \
then run the add feature.

invoke-command -computername $_ -scriptblock {Add-WindowsFeature RSAT-AD-PowerShell
}

}

Open in new window



This is not really tested just a suggested path
0
 

Author Closing Comment

by:Marc_Johnson
ID: 39986768
Thank you, becraig. We ended up not going this route because we didn't want these tools on all of our user's workstations, but I appreciate the solution suggested.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
home folder path for users 4 85
Adapting Windows 7 Image for all HDD size 7 84
Need to learn promise API 2 55
How can I save all open docs into a given folder 12 120
This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question