Skip to content
This repository has been archived by the owner on Nov 13, 2018. It is now read-only.

Commit

Permalink
[FIX] Allow same folder names in Packages and Advertisements
Browse files Browse the repository at this point in the history
  • Loading branch information
masc committed Apr 1, 2014
1 parent 24e57e7 commit 2b3a535
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SCCM_Folder.psm1
Expand Up @@ -117,7 +117,7 @@ Function New-SCCMFolder {
# We need to find out if there's another folder with that name under the same parent. If there is, we throw an exception and don't create the folder.
$allFolders = Get-SCCMFolder -siteProvider $siteProvider -siteCode $siteCode
foreach($folder in $allFolders) {
if( ($folder.Name -eq $folderName) -and ($folder.ParentContainerNodeID -eq $parentFolderNodeId) ) {
if( ($folder.Name -eq $folderName) -and ($folder.ParentContainerNodeID -eq $parentFolderNodeId) -and ($folder.ObjectType -eq $folderType) ) {
Throw "There is already a folder named $folderName under the same parent folder with ID $parentFolderNodeId"
}
}
Expand Down

0 comments on commit 2b3a535

Please sign in to comment.