So kann unter Windows 2008 R2 der Microsoft Powershell Script Editor installiert werden:
Import-Module ServerManager
Add-WindowsFeature PowerShell-ISE
To reinstall the GRUB, after cloning a system. This is for Debian based systems.
If ext2/ext3 is used make sure the filesystem is formated only with 128 Inodes (mkfs.ext3 -I 128 /dev/sda1).
mkdir /target
mount /dev/sda1 /target
mount -o bind /dev /target/dev
mount -t proc none /target/proc
chroot /target /bin/bash
vi /etc/fstab (if required)
mount -a
cat /proc/mounts > /etc/mtab
grub-install —-no-floppy --recheck /dev/sda
vi /boot/grub/menu.lst (if required)
update-grub
[req]
req_extensions = v3_req
[ v3_req ]
# Extensions to add to a certificate request
basicConstraints = CA:FALSE
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
subjectAltName = @alt_names
[alt_names]
DNS.1 = server1.yourdomain.tld
DNS.2 = mail.yourdomain.tld
DNS.3 = www.yourdomain.tld
DNS.4 = www.sub.yourdomain.tld
DNS.5 = mx.yourdomain.tld
DNS.6 = support.yourdomain.tld
openssl genrsa -out srvr1-yourdomain-tld-2048.key 2048
openssl req -new -out srvr1-yourdomain-tld-2048.csr -key srvr1-yourdomain-tld-2048.key -config openssl-san.cfg
openssl req -text -noout -in
Zuweisen von Benutzerrechten für einen anonymen Relay:
New-ReceiveConnector -Name 'TEST' -Usage 'Custom' -Bindings '0.0.0.0:25' -Fqdn 'test.xxx.com' -RemoteIPRanges '192.168.1.53' -Server 'EX1' -ProtocolLoggingLevel 'Verbose' -PermissionGroups 'AnonymousUsers'
Get-ReceiveConnector "Relay" | Add-ADPermission -User "NT-Autorität\Anonymous-Anmeldung" -ExtendedRights "Ms-Exch-SMTP-Accept-Any-Recipient"
Benutzer können mit folgendem Befehl hinzugefügt werden:
Set-DistributionGroup hotline -GrantSendOnBehalfTo @{add='TESTDOM\test'}
und mit folgendem Befehlt entfernt werden:
Set-DistributionGroup hotline -GrantSendOnBehalfTo @{remove='TESTDOM\test'}
Mehr Infos gibt es hier: http://insideactiveroles.com/2013/01/23/modifying-grantsendonbehalfto-without-tears/
So kann man ein Zertifikat für Exchange 2010 von der Microsoft CA signieren lassen (ohne CA-Webseite):
RewriteEngine On
RewriteRule ^t3env/(.*)$ /$1 [L]
Get-Recipient -Results unlimited | where {$_.emailaddresses -match “xxx@xxx.com”} | select name,emailaddresses,recipienttype
SQL_Server: sp_who2
Mit der Powershell kann man den Computer in eine Domain aufnehmen. Dies funktioniert auch wenn ein Computer die Verbindung zur Domain verloren hat. Man spart sich das herausnehmen in eine Arbeitsgruppe und wieder hinzufügen zu Domain.
Add-Computer -DomainName testdomain.de -Credential testdomain\administrator
Restart-Computer