New-CMGlobalConditionFile
Creates a File System type global condition in Configuration Manager.
Syntax
New-CMGlobalConditionFile
-FileOrFolderName <String>
[-IncludeSubfolder <Boolean>]
[-Is64Bit <Boolean>]
[-IsFolder]
-Path <String>
[-Description <String>]
-Name <String>
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[<CommonParameters>]
New-CMGlobalConditionFile
-FilePath <String>
[-IncludeSubfolder <Boolean>]
[-Is64Bit <Boolean>]
[-Description <String>]
-Name <String>
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[<CommonParameters>]
Description
The New-CMGlobalConditionFile cmdlet creates a File System type global condition in Configuration Manager.
A global condition is a setting or expression in Configuration Manager that you can use to specify how Configuration Manager provides and deploys an application to clients.
Note
Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>
. For more information, see getting started.
Examples
Example 1
$GlobalFloder = New-CMGlobalConditionFile -Path c:\ -FileOrFolderName test -IsFolder $true -Name Folder
This command creates a File System type folder global condition in Configuration Manager.
Example 1
$GlobalFile = New-CMGlobalConditionFile -FilePath c:\test -Name file
This command creates a File System type file global condition in Configuration Manager.
Parameters
-Description
Specifies a description.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DisableWildcardHandling
This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FileOrFolderName
Specifies the name of the file or folder object that will be searched for. You can specify system environment variables and the %USERPROFILE% environment variable in the file or folder name. You can also use the * and ? wildcards in the file name.
Type: | String |
Aliases: | FileName, FolderName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FilePath
Specifies the path to the specified file on client computers. You can specify system environment variables and the %USERPROFILE% environment variable in the path.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ForceWildcardHandling
This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IncludeSubfolder
Enable this option if you also want to search any sub-folders under the specified path.
Type: | Boolean |
Aliases: | IncludeSubfolders |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Is64Bit
Indicates whether the 64-bit system file location (%windir%\system32) should be searched in addition to the 32-bit system file location (%windir%\syswow64) on Configuration Manager clients that run a 64-bit version of Windows.
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IsFolder
Indicate whether it is a folder.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Specifies a name.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Path
Specifies the path to the specified folder on client computers. You can specify system environment variables and the %USERPROFILE% environment variable in the path.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None
Outputs
System.Object
Related Links
- Set-CMGlobalConditionFile
- New-CMGlobalCondition
- New-CMGlobalConditionActiveDirectoryQuery
- New-CMGlobalConditionAssembly
- New-CMGlobalConditionIisMetabase
- New-CMGlobalConditionOmaUri
- New-CMGlobalConditionRegistryKey
- New-CMGlobalConditionRegistryValue
- New-CMGlobalConditionScript
- New-CMGlobalConditionSqlQuery
- New-CMGlobalConditionWqlQuery
- New-CMGlobalConditionXPathQuery