import-csv user.csv | foreach-object {
echo $_.Displayname
New-Mailbox -name ( $_.Name)`
-Alias $_.Alias`
-SamAccountName $_.SamAccountName`
-RecipientType $_.RecipientType`
-RecipientTypeDetails $_.RecipientTypeDetails`
-Displayname $_.Displayname`
}
Category Archives: Computer
Powershell – Show all users in DistributionGroup
$File = “C:\ita\groupslog.txt”
$Mailboxes = Get-DistributionGroup | select name , alias ,displayname,EmailAddresses
$Mailboxes | ForEach {
echo “”
echo “”
echo $_.name
Get-DistributionGroupMember -id $_.alias
} | out-File $File
Powershell – Show witch users have access to mailboxes
$file = “C:\ita\fulladgang.txt”
$AllUsers = get-mailbox | select SamAccountName, name, alias
$AllUsers | Foreach {
echo “”
echo “”
echo “”
echo $_.name
get-mailboxfolderpermission -identity $Mailbox
} | out-File $File
Powershell get all users with title = “Interneservices” – Search on title on get-user
get-user -filter {Title -eq “InterneServices”} | select name
Powershell – Get Mailbox permission search on title = InterneServices
$File = “C:\ita\fulldadgang-services.txt”
$AllUsers = get-user -filter {Title -eq “InterneServices”} | select name
$AllUsers | Foreach {
echo “”
echo “”
echo “”
echo $_.name
Get-MailboxPermission -identity $_.name
} | out-File $File
Powershell – Get-DistributionGroup with all email addressess
$File = “C:\ita\groupslog.txt”
Get-DistributionGroup | select name , alias ,displayname,EmailAddresses | foreach {
“Name: “+$_.name
“Alias: “+$_.alias
“Displayname“ +$_.displayname
$_.EmailAddresses | foreach {
if($_.SmtpAddress){
“SmtpAddress: “+$_.SmtpAddress
}
}
} | out-File $File
Microsoft Excel har fundet en fejl og afsluttes. Vi beklager ulejligheden ved afslutning af Excel
Nå du lukker et Excel ned, så kan den komme den og sige: Microsoft Excel har fundet en fejl og afsluttes.
Dette kan muligvis løses ved at gå ned i start og vælg kø, skriv her: regedit og tryk kør
Gå nu til HKEY_LOCAL_MACHINE\Software\Microsoft\Office\Excel\Addins
Her er det et punkt der hedder noget med bluetooth, gå ind under denne og sæt LoadBehavior key fra 3 til 0. Således at den nu står til 0 (Nul). Genstart så Excel og prøv at lukke programmet
howto export mailbox size to CSV file Exchange 2007/2010
Howto Export all mailbox’es and there size to a CSV file
get–mailbox | get-mailboxstatistics | select-object DisplayName,TotalItemSize,StorageLimitStatus,LastLogonTime | Export-Csv c:\exchange.csv
Recovery IOS image with help of serial (console) and xmodem
This guide is only for recovery of a broken IOS image on you Cisco switch!.
First download a new image from Cisco. Is require a Cisco login, ask you dealer for a login for Cisco or a IOS image for you switch.
- Download Tera Term Pro: http://hp.vector.co.jp/authors/VA002416/teraterm.html
- Connect to the serial port in Tera Term Pro – Setup -> Serial port.
Port: Com2 (Or what you serial port number is)
Baud rate: 9600
Data: 8 bit
Parity: none
Stop: 1 bit
Flow control: noneThen press OK
- Now you are connect to the switch and the switch shows “switch: “, here type:
flash_init
set BAUD 115200 - Now the serial speed is set to 115200, so the transfer will go a lot faster, so we just need to disconnect tera term and connect again with the new baud rate.
In Tera term go to File – Disconnect - Now we need to setup a new connection – Setup -> Serial port.
Port: Com2 (Or what you serial port number is)
Baud rate: 115200
Data: 8 bit
Parity: none
Stop: 1 bit
Flow control: noneThen press OK.
- Now we are connect with baud rate 115200, then type:
copy xmodem: flash:image_filename.bin
Where image_filename.bin, is the filename of the image, if you image lastname is .tar you need to unpack it first. Use 7zip for that. http://www.7-zip.org/download.html - Then wee need to send the image to switch choise File -> transfer -> send in tera term.
And pick up you new image file, and wait for tera term to finish. - After the upload has finish type:
boot flash:image_filename.bin - Then the image will boot. Now you need to setup the switch so it will boot automatic on that image everytime you reboot the switch, go to configure terminal (conf t)
- Here you type:
boot system flash:image_filename.bin
And maybe you want to set the baud rate to default 9600 agian
line con 0
speed 9600 - exit the configure terminal and type:
wr mem
Now you are finish recovery you switch.
Test Exchange remote connectivity
Microsoft have launch a new webpage to test Exchange remote connectivity.
It can test:
ActiveSync
Activesync autodiscover
Outlook autodiscover
Microsoft Exchange Web Services Connectivity Tests
Outlook Anywhere (RPC over HTTP)
Outbound SMTP E-Mail