小编tor*_*res的帖子

makecab - 从文件夹中的所有文件创建cab文件

我在目录中有大量文件.我试过跟随makecab,但它不包括文件夹中的所有文件到cab文件中.

makecab /d "C:\Users\crtorres\Documents\- SouthPacific Project 2014\- Projects\Sales Doc Center\New Region" test.cab
Run Code Online (Sandbox Code Playgroud)

以下工作但cab文件只有清单文件.makecab manifest.xml test.cab

cab batch-file makecab

16
推荐指数
2
解决办法
6万
查看次数

正则表达式在第一个空格之后得到一切

在第一个空格后获取字符串中所有单词的语法是什么?例如,鲍勃漂亮的房子.所以结果应该是没有引用的"好房子".

([^\s]+) 给了我所有3个单独的单词;

,[\s\S]*$ > 没有编译.

c# regex string

10
推荐指数
2
解决办法
3万
查看次数

有没有任何工具可以对powershell执行c#代码

我想知道是否有一个可以将c#代码转换为powershell cmdlet代码的在线工具.我有以下代码,我需要它有PowerShell.我没有visual studio把它变成exe或dll.任何帮助或想法都会很棒.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;

namespace CopyUsersBetweenGroupsInSharepointByRR
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("This tool will copy the users from one group to another group");
            Console.WriteLine("Please enter the URL of the site where your groups are available");
            String siteUrl = Console.ReadLine();
            using (SPSite site = new SPSite(siteUrl))
            {
                try
                {
                    SPWeb web = site.OpenWeb();
                    Console.WriteLine("Please enter the name of the source group");
                    String sourceGroupName = Console.ReadLine();
                    Console.WriteLine("Please enter the …
Run Code Online (Sandbox Code Playgroud)

c# powershell cmdlets sharepoint sharepoint-2010

5
推荐指数
2
解决办法
6794
查看次数

如何从事务日志执行SQL回滚

我的事务日志文件可以追溯到6个月.我需要从数据库中回滚2013年5月20日之后发生的所有事情.任何人都可以请教我如何做到这一点?

transaction-log rollback sql-server-2008-r2

5
推荐指数
1
解决办法
2万
查看次数

在Excel中从文件名转发扩展

我有这个公式.这很好用,但是当包含点在内的5个字符时会失败.

例如,

abcdefgh.pdf = TRIM(左(A1,LEN(A1)-4))给我abcdefgh xyz.xlsx = TRIM(左(A2,LEN(A2)-4))给我xyz.

是否有一个公式可以查找最后一个点并修剪最后一个点后的所有内容?

excel trim

3
推荐指数
1
解决办法
2万
查看次数

SharePoint> Powershell>如何获取人员字段的显示名称?

我正在运行以下ps脚本以获取一些数据到csv.person字段(AssignedTo和CreatedBy)带有索引; #LastName,FirstName.如何在没有索引的情况下获取名称.或者我需要进行正则表达式还是替换?例如,

32;#Doe,John应该是Doe,John

$results = @()
$web = Get-SPWeb "http://ourlocal.company.cc/docs/sales"
$list = $web.Lists["Sales Tasks"]
$caml = '<Where><Eq><FieldRef Name="Status" /><Value Type="Choice">Completed</Value></Eq></Where>'
$query=new-object Microsoft.SharePoint.SPQuery
$query.Query=$caml
$ListItems=$list.GetItems($query)
Write-Host "count " $ListItems.Count
foreach ($item in $listItems)
{
         $Title = $item["Title"]
         $AssignedTo = $item["AssignedTo"]
         $Status = $item["Status"]
         $Priority = $item["Priority"]
         $CreatedBy = $item["Created By"]

         $out = new-object psobject -Property @{Title = $Title
                       AssignedTo = $AssignedTo
                       Status = $Status
                       Priority = $Priority
                       "Due Date" = $DueDate
                       "Percent Complete" = $Percent
                       "Created by" = $CreatedBy}


        $out = …
Run Code Online (Sandbox Code Playgroud)

powershell sharepoint

3
推荐指数
1
解决办法
7879
查看次数

powershell get-childitem到csv的详细信息

我正在尝试为具有深层文件夹结构的文件共享创建CSV文件.

我希望CSV看起来像:

filename, filepath, file type, folderStructure
Run Code Online (Sandbox Code Playgroud)

到目前为止,我有以下内容:

#Get-ChildItem -Path D:\ -Recurse
$directory="d:\"
gci $directory -recurse |
where {$_.psiscontainer} |
foreach {
    get-childitem $_.fullname |
    sort creationtime |
    select -expand fullname -last 1
}
Run Code Online (Sandbox Code Playgroud)

directory powershell enumerate

1
推荐指数
1
解决办法
2万
查看次数