Powershell循环调用磁盘清理

时间:2016-07-26 22:10:03

标签: powershell active-directory

我尝试遍历域中的Windows计算机列表以调用磁盘清理,但是,由于列表返回的方式,它没有执行名称替换的ForEach语句。任何人都可以就如何使这项工作提供一些指导吗?

        this.picker.css("opacity", 0);
        this.picker.show();
        this.picker.animate(
            {
                "opacity": 1
            },
          400
        );

2 个答案:

答案 0 :(得分:0)

类似这样的事情

FundMat, mask = cv2.findFundamentalMat(imgpoints1, imgpoints2, cv2.FM_LMEDS)

# is the fundamental matrix is really a fundamental Matrix. xFx'=0 ??
# verfication of fundamental matrix

for i in range(len(imgpoints1)):

    X = np.array([imgpoints1[i][0],imgpoints1[i][1],1])
    X_prime = np.array([imgpoints2[i][0],imgpoints2[i][1],1])
    err = np.dot(np.dot(X_prime.T,FundMat),X)
    if mask[i] == True:
       print(err)


    # E = [t]R = (K_-T)_-1 * F * K = K_T*F*K
term1 = np.dot(np.transpose(mtx), FundMat)       # newcameramtx , mtx
E = np.dot(term1, mtx)                           # newcameramtx , mtx


     # verfication of Essential matrix
for i in range(len(imgpoints1)):

    X_norm = np.dot(np.linalg.inv(mtx), np.array([imgpoints1[i][0],imgpoints1[i][1],1]).T)
    X_prime_norm = np.dot(np.linalg.inv(mtx), np.array([imgpoints2[i][0],imgpoints2[i][1],1]).T)
    err_Ess = np.dot(np.dot(X_prime_norm.T,E),X_norm)
    if mask[i] == True:
        print(err_Ess)

# SVD of E 
U,S,V_T = np.linalg.svd(E)

# computation of Rotation and Translation without enforcement 
W = np.array([[0,-1,0],[1,0,0],[0,0,1]])


Rot1 = np.dot(np.dot(U, W), V_T)  

Rot2 = np.dot(np.dot(U, W.T), V_T)

答案 1 :(得分:0)

我完全按照我想要的方式和特定的OU工作。

ForEach ($COMPUTER in (Get-ADComputer -Filter * | Where-Object {$_.DistinguishedName -Like "*OU=Employee's Computers,DC=company,DC=com"} | Select-Object -ExpandProperty Name)) { .\psexec \\$COMPUTER cleanmgr /sagerun:1 }