Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $UserName= "Admin"
- $PlainTextPassword = "P@ssword!"
- # Create password using: Read-Host "Password" -AsSecureString | ConvertFrom-SecureString
- $password = "01000000d08c9ddf0115d1118c7a00c04fc297eb01000000dbb2c795524b584c97b990024d8880f1000000000200
- 000000001066000000010000200000001680d4f4bbd149973c6bbb2761eb3eadced811d77537b256688f029a54d6
- 269d000000000e80000000020000200000005bcfa40b9c81c1cc597304f753b915829185adf2ebcddc0ae6ee23cd
- 44f48435200000009d53fdeb4880dee469b14e5d439ecb7ac4ebeae83d5f6b545d6f491890b89ceb40000000b020
- 498b196aa5bd239ce0d239f3a1d2f5f3d1af7d7e630f8a5fafcd228582e48d5ad27aa8dd9ab468edaed49a90fd2e
- 73233ec814e17233491add6da3a204b2" | ConvertTo-SecureString
- $Credential = new-object -typename System.Management.Automation.PSCredential -argumentlist $SPAdmin, $Password
- $CompanyName = "Contoso"
- $ServerName = "MyServer"
- $NetbiosName = "contoso"
- $DNSName = "contoso.local"
- $Settings="None"
- Start-WssConfigurationService `
- -CompanyName $CompanyName `
- -DNSName $DNSName `
- -NetBiosName $NetbiosName `
- -ComputerName $ServerName `
- –NewAdminCredential $Credential `
- -Setting $Settings
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement