• We should now be fully online following an overnight outage. Apologies for any inconvenience, we do not expect there to be any further issues.

Network Admins - Powershell for startup/login scripts?

BZeto

Platinum Member
Apr 28, 2002
2,428
0
76
Any admins utilizing powershell scripts for workstation startup and user login?
Our current method uses Vbscript to set registry values, determine computer/user location in AD and map drives, etc. I'm sure PSH is capable of all of this. Is there anything to consider before ditching VB in favor of PSH for startup and login scripts?
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I think the only downsides would be that you'd have to install PowerShell on everyone's machines and spend the time to rewrite all of your scripts in that hideous language.
 

BZeto

Platinum Member
Apr 28, 2002
2,428
0
76
I think the only downsides would be that you'd have to install PowerShell on everyone's machines and spend the time to rewrite all of your scripts in that hideous language.

We deploy Windows 7 using SCCM to all machines anyway, so powershell will already be installed. Rewriting would be a pain, but I with my limited scripting/programming experience I already like PSH lots more than VB.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
We deploy Windows 7 using SCCM to all machines anyway, so powershell will already be installed. Rewriting would be a pain, but I with my limited scripting/programming experience I already like PSH lots more than VB.

Well VBscript is a pretty low point to start from, it's like asking whether you like Bud or Bud Light better. Both are shit, but Bud Light probably goes down a little easier...
 

theevilsharpie

Platinum Member
Nov 2, 2009
2,322
14
81
I think the only downsides would be that you'd have to install PowerShell on everyone's machines and spend the time to rewrite all of your scripts in that hideous language.

I've seen you claim that PowerShell is a horrible language, but to date, I don't believe you've ever explained why. Care to share? And for that matter, what's your beef with VBScript?

:colbert:
 

Emulex

Diamond Member
Jan 28, 2001
9,759
1
71
powershell is pretty freaking good. just different. VB/C#/JAVA/BASH/PHP/PERL they are like women - turn them upside down they mostly all look the same ;)
 

mvbighead

Diamond Member
Apr 20, 2009
3,793
1
81
Any admins utilizing powershell scripts for workstation startup and user login?
Our current method uses Vbscript to set registry values, determine computer/user location in AD and map drives, etc. I'm sure PSH is capable of all of this. Is there anything to consider before ditching VB in favor of PSH for startup and login scripts?

I have been slowing moving away from a different scripting language in favor of PowerShell. We primarily have XP workstations, slowly moving to Windows 7. With XP, all of our systems updates are managed via WSUS, and PowerShell is deployed using WSUS without any issue whatsoever.

That aside, I would suggest that Drive Mappings and other such login scriptable settings are much more easily controlled with Group Policy Client Side Extensions. It allows you to configure mapped drives in a very defined way across your entire environment. There are item targeting controls that allow you to give Suzy a mapped drive N if she is in the "Information Technology" security group and is running a Windows XP machine with an IP address in the network range of 192.168.1.x. It eliminates the possibility that some small piece of syntax in a script causes a user to not get a mapped drive, as each drive mapping is processed individually.

But, on the idea of moving to PowerShell, it's the best possible thing you could do for your scripts given the advanced security of signed scripts, the language is available for use in pretty much any Windows environment. It also has some very advanced capability (I have yet to get that deep into it yet) that can be tapped into as you find yourself needing more functionality. WIM comes to mind. Essentially, with PowerShell, you can do everything you already do with CMD and VBS, and a bit more. And there are numerous sites and resources that'll help you convert VB code to PowerShell.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I've seen you claim that PowerShell is a horrible language, but to date, I don't believe you've ever explained why. Care to share? And for that matter, what's your beef with VBScript?

:colbert:

Most of my experience with it is in Exchange management and I just find it an ugly language and a terrible interactive shell. I'm used to using things like bash and perl that work for me while PowerShell (terrible name too) seems to work against me every step of the way. That and CSRSS needs to f'ing die, even if PowerShell was the best thing ever the fact that you have to run it inside of CSRSS kills the usability. You'd think MS would've been able to come up with a terminal that you can actually drag to resize by now...