基于列数据声明原位记录 [英] Declaring Inplace Records Based on Column Data
问题描述
大家好,
我创建了一个脚本,从CSV加载一个站点列表。然后遍历列表并查找不在排除列表中的所有库。此时的脚本正在运行。我当时尝试做的是根据列'颜色'
找到所有文件/项目和'红色'值,如果找到符合此条件的任何项目,则声明为记录。
I have created a script that loads from a CSV a list of sites. Then iterates through the list and finds all the Libraries not in the excluded list. The script at the point is working. What i am then try to do is find all files/items based on the Column 'Colour' and value of 'Red' and if it finds any item that meets this criteria then declare as a Record.
然而,它没有用,希望有人可以给我指向正确的方向,我还在学习powershell:
However, it's not working and hoping someone can give me a pointer in the right direction, i'm still learning powershell:
谢谢
John
推荐答案
所以我设法让它工作但它不会在库中的子文件夹中声明或取消任何内容,不确定我是如何过来的,任何建议?下面更新的脚本:
So i have managed to get it working but it won't declare or undeclare anything in subfolders in the libraries, not sure how i over come that, any suggestions? The updated script below:
systemList = @("Converted Forms","Master Page Gallery","Customized Reports","Form Templates","List Template Gallery","Theme Gallery",>
" Reporting Templates","Solution Gallery","Style Library","Web Part Gallery","Site Assets" ;,"wfpub","审核日志")
#load csv
systemList = @("Converted Forms","Master Page Gallery","Customized Reports","Form Templates","List Template Gallery","Theme Gallery",
"Reporting Templates","Solution Gallery","Style Library", "Web Part Gallery","Site Assets","wfpub","audit logs")
# load csv
webs = Import -Csv"D:\Audit Reports\testsite1and2sites.csv" -Header(" SiteUrl")
#load sites
foreach(
webs = Import-Csv "D:\Audit Reports\testsite1and2sites.csv" -Header("SiteUrl")
#load sites
foreach(
这篇关于基于列数据声明原位记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!