With the addition of the new PowerShell module VMware.CloudFoundation.Reporting, it’s now easier than ever to create custom reports to prepare for an upcoming VCF upgrade or to provide to members of your infrastructure group. There are a lot more functions built into this module but for the sake of this post I will be focusing…
Category: Powershell
Cmdlet to delete e-mail in Exchange 2010
This can be used to find/delete one email or thousands of emails. Again, the below came in handy to zap away the offending emails. Using Search-Mailbox to search emails Introducing… the Search-Mailbox cmdlet. This can search for specified criteria and will copy the results to a destination mailbox. First off though, we have to tell Search-Mailbox which…
Upgrading Distribution groups from Exch 03/07 to 10
EMS 2010 commands: Get-DistributionGroup –ID “DistributionGroupName” | Set-DistributionGroup –ForceUpdate To “upgrade” all Distribution Groups within an Organization, the following command will do the trick: Get-DistributionGroup –ResultSize Unlimited | Set-DistributionGroup –ForceUpdate I have heard heard reports of substituting -ForceUpdate for -ForceUpgrade working as well.
Find rogue snapshots within VMware
Requirements: – VMware vSphere PowerCLI – VMware Virtual Center 4.0 + Command: Connect-VIServer <virtual center name or IP>
Adding multiple users to AD from CSV
Download script here Requirements: – Powershell 2.0 – CSV file Attributes Used: FirstName LastName City Department Job Title Logon Name Password Description E-Mail Script (Logon Script) H drive (Logon file share letter) domain name
Sending an E-mail blast from a CSV with an attachment
Download script here Required: – Powershell 2.0 – CSV file with the first 3 cell names dictated by what you put in $emailaddress, $fileLocation, & $name. (In that order) PS1 Script: #CSV SETTINGS #This is the location of the CSV file
Exch Session Import to PS
Using a machine without Exchange Management Tools Requirements: – Powershell 2.0 – Access to your Exchange Server Launch Powershell and run:
Script to diagram Aggregates, Volumes & Luns within Visio
Done with: PowerShell 2.0 Visio 2010 Standard/Premium OnTap 7.3/8.0 Download the NetApp Vision Stencils and extract them to your “C:Users<User name>My DocumentsMy Shapes” directory. Then install the NetApp OnTap PS Toolkit from the now.netapp.com site (you will need a customer login although it is free). You will need to import the module by typing “Import-Module…
Disabled Mailboxes not displaying in Disconnected Mailbox area
Exchange 07 Microsoft’s documentation shows that when you “Disable” a mailbox it will automatically be placed in the “Disconnected Mailbox” area. That is usually not the case and the GUI doesn’t provide much assistance on refreshing it. In Exchange 03 we used to run the the Mailbox cleanup agent to show the mailboxes as disconnected….
AD – Adding Indiv Users To An Indiv Group
DNs can be found in AD Explorer. Script: $root=[adsi]”” $rootdn=$root.distinguishedName $group=[adsi](“LDAP://<Group DN>”) $group.add(“LDAP://<User DN>”)