[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

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

Posted on 2014-04-04
2
Medium Priority
?
198 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 29

Accepted Solution

by:
becraig earned 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

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…
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

650 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