Join to domain powershell script

$username = "domain\admin"
$Password = "xxxxxxxx"
$pwd = $Password | ConvertTo-SecureString -asPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential($UserName,$pwd)
$Domain = "domain.com"
Add-Computer -DomainName $Domain -Credential $credential –Restart

Join to domain powershell script的更多相关文章

  1. Join/remove server into/from windows domain PS script

    Join server into windows domain PS script $username = "ad-domain\admin" $Password = " ...

  2. Send email alert from Performance Monitor using PowerShell script (检测windows服务器的cpu 硬盘 服务等性能,发email的方法) -摘自网络

    I have created an alert in Performance Monitor (Windows Server 2008 R2) that should be triggered whe ...

  3. SharePoint2013 Powershell script to get site Title, Site Owner, Site user count and usage

    Powershell script to get site Title, Site Owner, Site user count and usage Add-PSSnapin microsoft.sh ...

  4. 微软 PowerShell Script Explorer

    微软 PowerShell Script Explorer 满血复活,正式发布 一年前的今天,微软在其Windows PowerShell官方博客声明中止 ‘Script Explorer’ 应用程序 ...

  5. Powershell script to install Windows Updates (msu) from folder

    ######################################################### # # Name: InstallWindowsUpdates.ps1 # Auth ...

  6. SharePoint 2013 How to Backup Site Collection Automatically With a PowerShell Script

    In this post I will introduce a way how to run a script for backing up SharePoint data which could b ...

  7. deploy a ec2 and join into domain with terraform

    Below is the example to convert the ps script into userdata for terraform to create instance and aut ...

  8. PowerShell Script to Deploy Multiple VM on Azure in Parallel #azure #powershell

    Since I need to deploy, start, stop and remove many virtual machines created from a common image I c ...

  9. 微软 PowerShell Script Explorer 满血复活,正式发布

    一年前的今天,微软在其Windows PowerShell官方博客声明中止 ‘Script Explorer’ 应用程序的开发. 一年后的今天,微软为其Script Explorer注入了新的生命.一 ...

随机推荐

  1. 微信H5支付 在其他浏览器调用微信支付

    微信H5支付的相关资料不是很多.不过步骤上来说不是很复杂 比公众号支付简单很多. 先上官方文档吧 https://pay.weixin.qq.com/wiki/doc/api/H5.php?chapt ...

  2. SharePoint显示错误信息

         在SharePoint项目中,一般如果发生错误,SharePoint会弹出它自定义的报错页面,一般就显示"Something went wrong",如果光是看这一句话, ...

  3. Pc移植到Mac的技术细节

    1.样式不对: 2.布局不对: 3.Mac的菜单替换PC的菜单: Mac的菜单替换PC的菜单: 1)左上角图标没有手动添加且不需要添加的情况下出现,而且点击是Help菜单内容: 2)把HelpBtn和 ...

  4. python中logging的常用方法

    logging常用 # -*- coding:utf-8 -*- __author__ = "lgj" import os import sys import time impor ...

  5. (转) Unreal Engine 4 Custom Shaders Tutorial

    说明: 1.这里的Custom Shaders 为且仅为 Custom Node的使用和USF的包含.并非全局Shader和Material Shader. 2.原文来源:https://www.ra ...

  6. json格式化显示样式js代码分享

    最近开发中需要在页面展示json.特整理了下代码,送给大家,希望能帮到有同样需求的朋友们. 代码: <html> <script src="http://cdn.bootc ...

  7. DFS——hdu5682zxa and leaf

    一.题目回顾 题目链接:zxa and leaf Sample Input 2 3 2 1 2 1 3 2 4 3 9 6 2 1 2 1 3 1 4 2 5 2 6 3 6 5 9   Sample ...

  8. DPDK如何抓包

    原创翻译,转载请注明出处. DPDK的librte_pdump库,提供了在DPDK框架下抓包的功能.这个库通过完全复制Rx和Tx的mbuf到一个新的内存池,因此它降低应用程序的性能,所以只推荐在调试的 ...

  9. C++陷阱系列:让面试官倒掉的题

    http://blog.chinaunix.net/uid-22754909-id-3969535.html 今天和几位同仁一起探讨了一下C++的一些基础知识,在座的同仁都是行家了,有的多次当过C++ ...

  10. HDU 1338 Game Prediction

    http://acm.hdu.edu.cn/showproblem.php?pid=1338 Problem Description Suppose there are M people, inclu ...