Browsing: PowerShell

PowerShell

Introduction For most organizations, Office 365 (mailboxes) can contain both high business impact and personally identifiable information, so it’s important that we track who logs on to the mailboxes in the organization and what actions are taken. By default, mailbox auditing in Office 365 isn’t turned on, so this guide will help you to setup and verify mailbox auditing in Office 365. This guide will walk you through the following steps: Step 1: Connect to Exchange Online Step 2: Get the current state of audit logging Step 3: Enable mailbox audit logging Step 4: Set the age limit for mailbox…

Today I got a call from a System Center Configuration Manager (SCCM/ConfigMgr) customer that wanted to automate the creation of device collections for each SCCM client version, that was in their environment. I guess summer time means “time to cleanup/fix all the broken clients” :-)A couple of years ago I create another similar script for CU updates: https://gallery.technet.microsoft.com/SCCM-Creating-Collections-f334c7f0 but this time I wanted to make the script simpler, fully automated and only create the collections that was needed by the customer.This script will pull a list of all the client versions from the SCCM site server, and create a collection…

Today I got a call from a customer that was working on a Office 365 Project. As part of the Project they wanted to change the Exchange Email Address Policies to filter on the Company Name for each user. Only problem was that some of the users had a blank or misspelled Company name…Luckily, someone invented PowerShell so we started by pulling a list of all Company Names by running this command:Get-ADUser -Filter * -Properties Company | Group Company | Select Name,CountThe result was as expected… Too many company names. Misspelled Company Names and users with no company name specified…

When you install the latest cumulative update for System Center 2012 Configuration Manager (SCCM), it automatically creates 4 new packages for client, server and console updates. If you forget to clean up after each update, you’ll end up a situation like this: Unfortunately the SCCM user interface does not support multiselect and delete, so if you want to delete all these packages, you need to walk through the delete wizard for each package. That is both extremely boring but also takes a lot of time. So I wrote this little PowerShell script that will delete all post SCCM 2012 CU4…

Here is a list of all the 35 NEW cmdlets that was added in System Center 2012 R2 Configuration Manager CU4. More information and examples will be added to this post later. Add-CMDeploymentTypeDependency Add-CMDeploymentTypeSupersedence ConvertFrom-CMApplication ConvertFrom-CMConfigurationItem ConvertTo-CMApplication ConvertTo-CMConfigurationItem Get-CMClientOperation Get-CMCertificate Get-CMDeploymentTypeDependency Get-CMDeploymentTypeDependencyGroup Get-CMDeploymentTypeSupersedence Get-CMMigrationSource Get-CMObjectSecurityScope Get-CMQuery Get-CMSiteRole Invoke-CMQuery Invoke-CMSystemDiscovery Invoke-CMUserDiscovery Invoke-GroupDiscovery New-CMADGroupDiscoveryScope New-CMDeploymentTypeDependencyGroup New-CMEmbeddedObjectInstance New-CMEmbeddedProperty New-CMEmbeddedPropertyList New-CMQuery Remove-CMCollection Remove-CMDeploymentTypeDependency Remove-CMDeploymentTypeDependencyGroup Remove-CMDeploymentTypeSupersedence Remove-CMQuery Set-CMDeploymentTypeDependency Set-CMDeploymentTypeDependencyGroup Set-CMDeploymentTypeSupersedence Set-CMQuery Sync-CMMigrationSource /Enjoy

When upgrading the System Center Configuration Manager (SCCM) client to a new version, most customers would prefer to create new collections for this task. As a cosultant I create alot of these “ad-hoc” collections every time I visit a customer, so I’ve created a small libary of PowerShell scripts that will help me create these collections really fast when I need them. Here is a simple PowerShell script that will create 2 kinds of collections that will help you for this specific task. #CLI – Client Version; That will have all clients with a specific client version. #CU – Cumulative…

From time to time, I teach the Microsoft 10747D Administering System Center Configuration Manager class. Many of the students don’t have much experience with writing PowerShell scripts, and one of the labs allways create a lot of noise and frustration. So to make this task easier for some of the students, I decided to publish the script here, so they can copy it, if they don’t want to write the code. The script can be downloaded here: https://gallery.technet.microsoft.com/Class-10747D-Lab-13-0ef106a8 /Enjoy.

It’s a New Day in IT – Experience it Today! There are more apps, more devices, and now, more data than ever – all driven by the rise of cloud computing and the use of cloud services. With these technologies playing an ever present role in businesses, how can IT drive more efficiency and deliver new forms of value? Microsoft’s answer is the Cloud OS. This joined event between Microsoft and System Center User Group Denmark (SCUG.dk), wil be a full day where Danish Microsoft MVP´s will share their deep knowledge about Windows infrastructure, System Center tools and delivering enterprise…

A new Danish PowerShell User Group is born on Friday, November 16th at 16.30 (CET) in Copenhagen. The agenda is news about PowerShell 3.0 presented by Ed “The Scripting Guy” Wilson and networking opportunities with other Danish PowerShell enthusiasts. If interested, read more on their website and register for the event at: http://www.psug.dk/2012/10/er-du-klar-til-forste-mode-i-psug/ There are limited seating for the event!

PowerShell 2.0 is installed by default in Windows Server 2008 R2. However, the PowerShell ISE is not… Turns out that the ISE is not installed by default and needs to be added as a Feature. This is different to a manual install of PowerShell 2 on Windows 2008 (or 2003) where the ISE is included as part of the Windows Management Framework Install. You can get this feature installed via the following PowerShell commands: Import-Module ServerManager Add-Windowsfeature PowerShell-ISE