ITPRO - Shay Levy

Shay Levy

If you repeat it, $CRIPT it!

Browse by Tags

All Tags » ITPRO (RSS)
The Administrator's Guide to Windows PowerShell Remoting
‘Remoting is one of the most anticipated new features in Windows PowerShell 2.0. It turns Windows Powershell into an industrial strength management platform by enabling users to run Windows PowerShell commands on remote machines throughout the enterprise. However, setting up PowerShell remoting can be a daunting task. This guide helps users understand the concepts of remoting and provides essential and practical advice on setup, deployment and security.’ The ‘Administrator's Guide To Windows...
QuickTip: How do you check Internet connectivity?
With the following PowerShell one-liner you can check if the machine you’re working on has internet connectivity. The result is a Boolean value. If TRUE, the local machine is connected to the internet; if FALSE, it is not. Minimum supported client : Windows Vista [Activator]::CreateInstance([Type]::GetTypeFromCLSID([Guid]'{DCB00C01-570F-4A9B-8D69-199FDBA5723B}')).IsConnectedToInternet
PowerShell to the rescue
A member of my team came in this morning with a scripting request: "If we ran a full backup on all of our servers (fixed disks), how much disk space would they all consume altogether? We need to give the boss a ‘ball-park number’ by the end of the day!" So, how can we get that number? Here’s a quick & dirty version. 1. Get all computers objects (names only). We keep our servers in a dedicated OU in active directory. 2. Run a WMI query on all servers and subtract each fixed disk FreeSpace...
New PowerShell Scripts feeds
The Scripting Guys added a new RSS feed for Windows PowerShell scripts at the TechNet Script Repository . The feed URL is: http://gallery.technet.microsoft.com/ScriptCenter/en-us/site/feeds/searchRss?f%5B0%5D.Type=ScriptLanguage&f%5B0%5D.Value=Powershell&f%5B0%5D.Text=Windows%20PowerShell&sortBy=Date Want more? Thanks to jaykul , you can now get the Script Center and PoshCode PowerShell script repositories in one feed http://pipes.yahoo.com/powershell/scripts
iPowerShell V2 available at Apple app store
iPowerShell V1 was the first application I installed on my iPhone and V2 is now available at the Apple app store.  It is an easy to use reference tool for users of Microsoft's PowerShell scripting language for use on the iPhone or iPod Touch, It's FREE! If you already have iPowerShell V1 you should just be able to download the update. If you are not familiar with this wicked, cool product, check out SAPIEN’s blog post and read all about it.
Windows PowerShell Community Review
Have you ever read Help that wasn't really helpful? Here's your chance to fix it.  The Windows PowerShell Community Review process is looking for volunteers for the third documentation review cycle – especially beginners and intermediate PowerShell users and people with little or no programming background. The Windows PowerShell documentation team and PowerShellCommunity.org jointly sponsor the Windows PowerShell Community Doc Review. As a member, you'll get to read and comment on...
PSTerminalServices – PowerShell module for Terminal Services
PSTerminalServices is a PowerShell module that helps you manage Terminal Services (including Remote Desktop connections) sessions and processes. No more legacy applications text parsing! The module is based on an open source project named Cassia (version 2.0.0.60), a .NET library for accessing the native Windows Terminal Services API. What you can do with it The following operations are supported on local and remote computers: Enumerating terminal sessions and reporting session information including...
Modifying multivalued Active Directory attributes
Updating an attribute value in Active directory is usually not a big deal. Most of the attributes are single valued and you can easily modify them. However, dealing with multi valued attributes is another game. With Quest AD cmdlets you don’t have to pull your hair out, there is special syntax for working with multi valued attributes and you use it via the ObjectAttributes parameter. The syntax is as follows (nested hashtable): Set-QADUser -Identity <Identity> -ObjectAttributes @{ AttributeName...
Webinar: Using PowerShell with Microsoft Online Services
Source: Microsoft Online Services Team Blog Join Jenna Lyday (Microsoft Online Services PM responsible for e-mail Migration) on Thursday, 1/28/2010 for the third webinar in our migration series. In this webinar, Jenna will demonstrate how to use Windows PowerShell commands to: - Provision and activate users - Perform a simple migration from Hosted Exchange to Exchange Online - Grant a user Full Mailbox Access permissions on another user's mailbox If you like managing your environment from the...
Utility to create a numeric range Regular Expression
Have you ever needed a regular expression to match a numeric range? If so, check Regex_For_Range . This is definitely one of the tools you’d want to add to your Regular Expression toolbox!  
PowerShell Localized Online help
Windows PowerShell online help content is now available in Chinese (simplified and traditional), German, Italian, Korean, Portuguese (Brazil), and Russian. Spanish, French, and Japanese are soon to follow. http://technet.microsoft.com/zh-cn/library/bb978526.aspx http://technet.microsoft.com/zh-tw/library/bb978526.aspx http://technet.microsoft.com/de-de/library/bb978526.aspx http://technet.microsoft.com/it-it/library/bb978526.aspx http://technet.microsoft.com/ko-kr/library/bb978526.aspx http://technet...
How to modify email addresses with PowerShell 2.0
One of the most asked question across many PowerShell forums, by Exchange administrators, is how to modify email addresses for mailbox users. The most common used code to add new email address in Exchange 2007 is: PS > $mbx = Get-Mailbox shay PS > $mbx.EmailAddresses += “newAddress@domain.com” PS > Set-Mailbox -Identity $mbx –EmailAddresses $mbx.EmailAddresses With Windows PowerShell 2.0 and Exchange 2007 (and above, sorry guys no 2003 ) we can use the Update-List cmdlet to add,remove or...
QuickTip - One-liners to get WinRM port numbers
With PowerShell 2.0 the default Windows Remote Management (WinRM) port numbers has changed from 80/443 (HTTP/HTTPS) to 5985/5986. One reason for changing the ports was a collision with internet servers which used the same ports. These ports are configured when you enable remoting in PowerShell 2.0 , typically by using the Enable-PSRemoting cmdlet. So, if you need a quick reminder about the port numbers WinRM uses for its listeners… PS > Get-ChildItem WSMan:\localhost\Service\DefaultPorts | Format...
PowerShell ISE on Windows Server 2008 R2
As you probably know PowerShell 2.0 is installed by default on Windows 7 and Windows Server 2008 R2 .  PowerShell 2.0 shipped with a new feature called Windows PowerShell Integrated Scripting Environment (ISE) , A graphical user interface code editor. In PowerShell 2.0 you can launch ISE simply by executing ‘ise’ in the console (built-in Alias) or by clicking on its shortcut(s) in the programs menu. However, on Windows Server 2008 you won’t be able to find it:   If you open PowerShell and...
Module manifest gotcha
Module authors can use a manifest file for their modules (although this is not required). A manifest file is a .psd1 file that contains a hash table. The keys and values in the hash table describe the contents and attributes of the module, define the prerequisites, and determine how the components are processed. How do you know all the hash table keys? You don’t have to. PowerShell can create the file for you with the New-ModuleManifest cmdlet. New-ModuleManifest creates a new module manifest (.psd1...
More Posts Next page »