#PSTip Compress and uncompress files and folders using WMI
In WMI, the CIM_DataFile and CIM_Directory classes have some very useful methods we can use. For example, the Compress() and the Uncompress() methods can be used to reduce the on-disk footprint of a...
View Article#PSTip Get the size of a file on disk
This tip requires PowerShell 2.0 or above.Read More
View ArticleGet PowerShell Version with WMI
With the release of PowerShell 4.0, it is possible you might end up with a mix of systems in your environment. I know I do because I do a lot of writing, testing and development that requires multiple...
View ArticleRemotely query user profile information with PowerShell
The PowerShell script discussed in this article will help you in querying for information about Windows user profiles on remote computers. The script returns user name, profile type, and in-use status...
View ArticleNice to Know–Getting Make and Model using CMD or PowerShell
Trust me, this is not a new thing, rather I get the question every time on a session (before or after) or when working on a customer site, how can I extract the Make and Model from the machine? So, as...
View ArticleSurf WMI Namespaces Safely with WMI Explorer
System Center Configuration Manager (ConfigMgr) relies on the admin's ability to create queries utilizing data available in the Windows Management Instrumentation (WMI) database.Read More
View ArticleWMI Query Language via PowerShell available on Kindle
Back in 2011, I published a free book on learning WMI Query Language (WQL) via PowerShell. It was a huge success. It had more than 48K downloads to this day. I have received lot of positive feedback...
View ArticleUse PowerShell to Query WMI on Windows Servers
I recently needed to check and see whether a backup drive (which was just a 4TB USB drive) was plugged into a server. But the server had no GUI, so I had to use the command line. There was no drive...
View Articlemoving old email
Hi, I have an issue that I need help.I have email mailbox with thousand of messages in "INBOX" folder, I need to reduce this number.I need a script that move all email to sub-folder and will leave only...
View Articleprogress bar/ group of aliases
I wrote a script that imports a list of user alias' s, each alias then runs through the pipe and begins a new mailbox move to a specific server and database. What I want is a script that queries just...
View ArticleAppending to a Displayname in Exchange 2007
I am trying to append ***Disabled*** to 387 user's Displayname using the import-csv command. The csv contains Displayname, Alias. Any idea on how i can script this so i don't have to do it individually?
View ArticleExporting Distribution Group Members
I am trying to run the following script but it gives me a message about Input being NULL. What am I missing? $report=foreach($i in Get-DistributionGroup | where {$_.Name -like '*equity*'}) {...
View ArticleSending each item of array as new line.
I want to send each item in that array as new line:$str = Get-Service -DisplayName Windows* | foreach {$_.DisplayName} | Out-Stringif I run that script:$str = Get-Service -DisplayName Windows* |...
View ArticleConneting to Exchange 2010 from win7(different domain)
Hello All,Client: Win 7 EnterpriseClient Domain:ds.swin.edu.auHost server: Windows 2008 R2 EnterpriseSever domain: ex.swin.edu.auExchange: 2010How do I connect to Exchange 2010 with powershell...
View ArticleHelp with automation of email address policy PS script
I have a need to pull information from a file and automate the process of adding Email Address PoliciesI am trying to run a script but I'm hitting dead endsThe first part of the script need to launch...
View ArticleScript to find SMTP addresses with #2 after them
Good Day all, I am running Exchange 2010 in my environent and as you know if you create an address for a user that already exists it will create the account with First.Last2@my domain.com.Is there a...
View ArticleEmail address to Userr ID
HiIm trying to use powershell to obtain the users samid based on their email address (SMTP)Can someone please help as im new to powershell.
View Articlepowershell script for assigning \changing ownership of a shared mailbox
Can someone please tell me shell script for assigning or changing ownership to a mailbox ?!I am new to powershell, I have to update ownership of 200 shared mailboxes and would really prefer to run a...
View ArticleScript to find new accounts created on or after a specified date
Can anyone tell me how to get all new accounts created on or after a specified date and display the email name, first name and last name?
View ArticleIs there a way to pull number of e-mails sent\received from a particular Ad...
Good day everyone, I have a bit of a problem hopefully someone can help me here. I have a domain ABC.com with several Ad forests. Is there a powershell script that can distinguish users from a...
View Article