Export (0) Print
Expand All
Expand Minimize

New-CMGlobalCondition

Updated: September 1, 2013

Applies To: System Center 2012 Configuration Manager SP1

New-CMGlobalCondition

Creates a global condition in Configuration Manager.

Syntax

Parameter Set: NewADQuery
New-CMGlobalCondition -DataType <GlobalConditionDataType> {Boolean | DateTime | FloatingPoint | Integer | IntegerArray | String | StringArray | Version} -DeviceType <GlobalConditionDeviceType> {Nokia | Windows | WindowsMobile} -DistinguishedName <String> -LdapFilter <String> -Name <String> -Property <String> -SearchScope <SearchScope> {Base | OneLevel | Subtree} [-Description <String> ] [-LdapPrefix <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: NewAssembly
New-CMGlobalCondition -AssemblyName <String> -DeviceType <GlobalConditionDeviceType> {Nokia | Windows | WindowsMobile} -Name <String> [-Description <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: NewFileSystem
New-CMGlobalCondition -DeviceType <GlobalConditionDeviceType> {Nokia | Windows | WindowsMobile} -FileOrFolderName <String> -Name <String> -Path <String> [-Description <String> ] [-IncludeSubfolders] [-Is64Bit] [-IsFolder] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: NewFileSystemFile
New-CMGlobalCondition -DeviceType <GlobalConditionDeviceType> {Nokia | Windows | WindowsMobile} -FilePath <String> -Name <String> [-Description <String> ] [-IncludeSubfolders] [-Is64Bit] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: NewIisMetabase
New-CMGlobalCondition -DataType <GlobalConditionDataType> {Boolean | DateTime | FloatingPoint | Integer | IntegerArray | String | StringArray | Version} -DeviceType <GlobalConditionDeviceType> {Nokia | Windows | WindowsMobile} -Name <String> -PropertyId <String> [-Description <String> ] [-MetabasePath <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: NewOmaUri
New-CMGlobalCondition -DataType <GlobalConditionDataType> {Boolean | DateTime | FloatingPoint | Integer | IntegerArray | String | StringArray | Version} -DeviceType <GlobalConditionDeviceType> {Nokia | Windows | WindowsMobile} -Name <String> -OmaUri <String> [-Description <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: NewRegistryKey
New-CMGlobalCondition -DeviceType <GlobalConditionDeviceType> {Nokia | Windows | WindowsMobile} -KeyName <String> -Name <String> -RegistryHive <RegistryRootKey> {ClassesRoot | CurrentConfig | CurrentUser | LocalMachine | Users} [-Description <String> ] [-Is64Bit] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: NewRegistryValue
New-CMGlobalCondition -DataType <GlobalConditionDataType> {Boolean | DateTime | FloatingPoint | Integer | IntegerArray | String | StringArray | Version} -DeviceType <GlobalConditionDeviceType> {Nokia | Windows | WindowsMobile} -KeyName <String> -Name <String> -RegistryHive <RegistryRootKey> {ClassesRoot | CurrentConfig | CurrentUser | LocalMachine | Users} -ValueName <String> [-Description <String> ] [-Is64Bit] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: NewScript
New-CMGlobalCondition -DataType <GlobalConditionDataType> {Boolean | DateTime | FloatingPoint | Integer | IntegerArray | String | StringArray | Version} -DeviceType <GlobalConditionDeviceType> {Nokia | Windows | WindowsMobile} -FilePath <String> -Name <String> -ScriptLanguage <ScriptingLanguage> {PowerShell | VBScript | JScript | ShellScript} [-Description <String> ] [-Use32BitHost] [-UseLoggedOnUserCredentials] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: NewSqlQueryAllInstances
New-CMGlobalCondition -Column <String> -Database <String> -DataType <GlobalConditionDataType> {Boolean | DateTime | FloatingPoint | Integer | IntegerArray | String | StringArray | Version} -DeviceType <GlobalConditionDeviceType> {Nokia | Windows | WindowsMobile} -FilePath <String> -Name <String> -UseAllInstances [-Description <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: NewSqlQueryDefaultInstance
New-CMGlobalCondition -Column <String> -Database <String> -DataType <GlobalConditionDataType> {Boolean | DateTime | FloatingPoint | Integer | IntegerArray | String | StringArray | Version} -DeviceType <GlobalConditionDeviceType> {Nokia | Windows | WindowsMobile} -FilePath <String> -Name <String> -UseDefaultInstance [-Description <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: NewSqlQuerySpecificInstance
New-CMGlobalCondition -Column <String> -Database <String> -DataType <GlobalConditionDataType> {Boolean | DateTime | FloatingPoint | Integer | IntegerArray | String | StringArray | Version} -DeviceType <GlobalConditionDeviceType> {Nokia | Windows | WindowsMobile} -FilePath <String> -InstanceName <String> -Name <String> [-Description <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: NewWqlQuery
New-CMGlobalCondition -Class <String> -DataType <GlobalConditionDataType> {Boolean | DateTime | FloatingPoint | Integer | IntegerArray | String | StringArray | Version} -DeviceType <GlobalConditionDeviceType> {Nokia | Windows | WindowsMobile} -Name <String> -Property <String> -WhereClause <String> [-Description <String> ] [-Namespace <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: NewXPathQuery
New-CMGlobalCondition -DataType <GlobalConditionDataType> {Boolean | DateTime | FloatingPoint | Integer | IntegerArray | String | StringArray | Version} -DeviceType <GlobalConditionDeviceType> {Nokia | Windows | WindowsMobile} -FilePath <String> -Name <String> -XmlFilePath <String> -XmlNamespace <String[]> [-Description <String> ] [-IncludeSubfolders] [-Is64Bit] [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

The New-CMGlobalCondition cmdlet creates a global condition in Microsoft System Center 2012 Configuration Manager. A global condition is a setting or expression in System Center 2012 Configuration Manager that you can use to specify how System Center 2012 Configuration Manager provides and deploys an application to clients.

Parameters

-AssemblyName<String>

Specifies the name of an assembly for which to search. An assembly name must be registered in the Global Assembly Cache.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Class<String>

Specifies a Windows Management Instrumentation (WMI) class used to build a WMI Query Language (WQL) query. The query assesses compliance on client computers.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Column<String>

Specifies the column name used to assess the compliance of the global condition.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Database<String>

Specifies the name of a database. The SQL query runs on this database.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-DataType<GlobalConditionDataType>

Specifies the global condition data type. The acceptable values for this parameter are: Boolean, DateTime, FloatingPoint, Integer, IntegerArray, String, StringArray, and Version.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Description<String>

Specifies a description for the global condition.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-DeviceType<GlobalConditionDeviceType>

Specifies the type of device to which this global condition applies. The acceptable values for this parameter are: Nokia, Windows, and WindowsMobile.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-DistinguishedName<String>

Specifies the distinguished name of the Active Directory Domain Services (AD DS) object to assess for compliance on client computers.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-FileOrFolderName<String>

Specifies the name of a file or folder. Specify the IsFolder parameter to search for a folder.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-FilePath<String>

Specifies a file path for the file that the condition assesses for compliance.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-IncludeSubfolders

Indicates that the global condition searches in subfolders.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-InstanceName<String>

Specifies the name of a database instance that the global condition searches. To search the default instance, specify the UseDefaultInstance parameter. To search all instances, specify the UseAllInstances parameter.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Is64Bit

Indicates that the global condition searches the 64-bit system file location in addition to the 32-bit system file location.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-IsFolder

Indicates that the global condition searches for a folder. If you do not select this parameter, the condition searches for a file. Specify the name of the file or folder by using the FileOrFolderName parameter.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-KeyName<String>

Specifies the registry key name for which to search. Use the format key\subkey.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-LdapFilter<String>

Specifies an LDAP filter to refine the results from the AD DS query to assess compliance on client computers.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-LdapPrefix<String>

Specifies a valid Lightweight Directory Access Protocol (LDAP) prefix for the AD DS query that assesses compliance on client computers. This prefix can be either LDAP:// or GC://.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-MetabasePath<String>

Specifies the path to the metabase file for Internet Information Services (IIS).


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of an IIS metabase file.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Namespace<String>

Specifies a namespace from a WMI repository. The default value is Root\cimv2.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-OmaUri<String>

Specifies a Uniform Resource Indicator (URI) that points to device-specific parameters for an Open Mobile Alliance (OMA) device.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Path<String>

Specifies the path for an OMA URI.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Property<String>

Specifies the property of the AD DS object used to assess compliance on client computers.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-PropertyId<String>

Specifies the property of AD DS that Configuration Manager uses to determine client compliance.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-RegistryHive<RegistryRootKey>

Specifies the root key in the registry that identifies the registry hive that you search. WMI uses the registry hive to return, set, and change the values of registry keys. The acceptable values for this parameter are: ClassesRoot, CurrentConfig, CurrentUser, LocalMachine, and Users.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ScriptLanguage<ScriptingLanguage>

Specifies a scripting language to use. The acceptable values for this parameter are: PowerShell, VBScript, and JScript.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SearchScope<SearchScope>

Specifies the search scope in AD DS. The acceptable values for this parameter are: Base, OneLevel, and Subtree.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Use32BitHost

Indicates that the file or folder is associated with a 64-bit application.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-UseAllInstances

Indicates that the global condition searches all database instances. To search a named instance, specify the InstanceName parameter. To search the default instance, specify the UseDefaultInstance parameter.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-UseDefaultInstance

Indicates that the global condition searches the default database instance. To search a named instance, specify the InstanceName parameter. To search all instances, specify the UseAllInstances parameter.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-UseLoggedOnUserCredentials

Indicates that the script runs on client computers by using the logged on user credentials.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ValueName<String>

Specifies the value to be contained in the specified registry key.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-WhereClause<String>

Specifies a WQL query WHERE clause to apply to the specified namespace, class, and property on client computers.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-XmlFilePath<String>

Specifies a file that contains the XML query to use to assess compliance on client computers.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-XmlNamespace<String[]>

Specifies an array of valid, full XML path language (XPath) queries to use to assess compliance on client computers.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before executing the command.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Describes what would happen if you executed the command without actually executing the command.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Create a global condition

This command creates a global condition that searches the assembly named Microsoft.Office.Tools.Word.v9.0 on Windows devices.


PS C:\> New-CMGlobalCondition -AssemblyName "Microsoft.Office.Tools.Word.v9.0" -DeviceType $Windows

Related topics

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft