Alan's Blog

"Yeah. I wrote a script that will do that."

Get a list of Script Variables inside ISE

Posted on December 27th, 2014

Get-ScriptVariables.ps1 is my take on a variable inventory script I found on Powershell.com.  I changed the function name, as Get-Variable already in use, gave a unique name to function variables to exclude, added other system variables, and added example to show current values with enumeration.

Script Text

Tags:
Filed under PowerShell | No Comments »

Enabling ISE and ActiveDirectory module on Windows 2008 R2 Member Server

Posted on August 23rd, 2013

So, I wrote a pretty cool script and sent it to a co-worker.  I wrote it on a Windows 7 PC with the RSAT tools installed.  My friend tried to run it on a 2008 R2 server with PowerShell 3.0, but the ActiveDirectory module would not load.  I tried to edit the script, but ISE would not load.  After some research, I found a couple of one-liners:

#Installs AD Module and ISE on 2008 R2 server
import-module servermanager
add-WindowsFeature PowerShell-ISE
add-WindowsFeature RSAT-AD-Tools
									

For me the RSAT tools required a reboot.  It is not clear to me whether the ISE also requires a reboot.

Tags: ,
Filed under Active Directory, PowerShell, Windows Administration | No Comments »

Please Note

All the scripts are saved as .txt files. Newer files have a "View Script" button which will let you save or open a script in notepad. For earlier posts, the easiest way to download with IE is to right click on the link and use "Save Target As". Rename file from Name_ext.txt to Name.ext.

To see a full post after searching, please click on the title.

PowerShell Scripts were written with Version 3 or 4.

https connections are supported.

All new users accounts must be approved, as are comments. Please be patient. It is pretty easy to figure out my email address from the scripts, and you are welcome to contact me that way.

Site Search

Categories

Archives

SQL Site

Bad Behavior has blocked 169 access attempts in the last 7 days.