zoukankan      html  css  js  c++  java
  • 自动部署打印机

    (New-Object -ComObject WScript.Network).AddWindowsPrinterConnection("\cnhzsrv06apaccnhzprn02") 

    结合计划任务开机部署打印机:

    <?xml version="1.0" encoding="UTF-16"?>
    <Task version="1.3" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
      <RegistrationInfo>
        <Date>2014-03-29T16:30:35.8220999</Date>
        <Author>A7Ultraman</Author>
      </RegistrationInfo>
      <Triggers>
        <LogonTrigger>
          <Enabled>true</Enabled>
        </LogonTrigger>
      </Triggers>
      <Principals>
        <Principal id="Author">
          <GroupId>APACDomain Users</GroupId>
          <RunLevel>LeastPrivilege</RunLevel>
        </Principal>
      </Principals>
      <Settings>
        <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
        <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
        <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
        <AllowHardTerminate>true</AllowHardTerminate>
        <StartWhenAvailable>false</StartWhenAvailable>
        <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
        <IdleSettings>
          <StopOnIdleEnd>true</StopOnIdleEnd>
          <RestartOnIdle>false</RestartOnIdle>
        </IdleSettings>
        <AllowStartOnDemand>true</AllowStartOnDemand>
        <Enabled>true</Enabled>
        <Hidden>false</Hidden>
        <RunOnlyIfIdle>false</RunOnlyIfIdle>
        <DisallowStartOnRemoteAppSession>false</DisallowStartOnRemoteAppSession>
        <UseUnifiedSchedulingEngine>false</UseUnifiedSchedulingEngine>
        <WakeToRun>false</WakeToRun>
        <ExecutionTimeLimit>P3D</ExecutionTimeLimit>
        <Priority>7</Priority>
      </Settings>
      <Actions Context="Author">
        <Exec>
          <Command>powershell.exe</Command>
          <Arguments>-NonInteractive -WindowStyle Hidden -file C:WindowsSystem32WindowsPowerShellv1.0add-printer.ps1</Arguments>
        </Exec>
      </Actions>
    </Task>
  • 相关阅读:
    JS浮点数的加减乘除运算
    鼓励心里的阳光
    mysql创建新用户并分配数据库权限
    CentOS下的Memcache安装步骤(Linux+Nginx+PHP+Memcached)
    Python发送邮件
    SQL操作语句
    Mysql数据库操作语句
    Cookie,Session的区别
    Jmeter性能测试-分布式压力测试
    性能测试指标
  • 原文地址:https://www.cnblogs.com/IvanChen/p/4493751.html
Copyright © 2011-2022 走看看