During the TechEd Kent showed one of our solution that allows you to save all the Collections to an Excel file or to create Collections based on Excel template. We have received a lot of emails and twitter tweets that when we are going to publish it and good news is that we will publish it now 🙂 . If you haven’t seen the Kent TechEd video, then I recommend to watch it before you use this module. This is not the latest version and it is work in progress release. We will continue to improve this PowerShell module.

Here are commands. Run these commands step by step

PowerShell

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

#Import the Module

Import-Module-NameCTConfigMgr2012R2Automation

#Connect to SQL Server

New-SQLServerConnection-SQLServer.-DatabaseCM_PS1

#Connect to ConfigMgr Server

New-ConfigMgrConnection

#Test the SQL Query

New-SQLQuery|Out-GridView

#Test the Collection Rules Query

Get-CTCMCollectionRules|Out-GridView

#Query all the Collections Information

$CollectionData=New-SQLQuery

#Query all the Collections Query Rules

$QueryData=Get-CTCMCollectionRules

#Dump the information to a CSV file because we dont have Excel Application on Primary Site Servers