Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: kokser
  • Content: Threads
  • Order by date
  1. kokser

    Get mailbox itemcount for items with specific received date

    I have created a small script that can retrieve the itemcount for a mailbox. Is it possible to do the 2nd Where? The output should only be the number of mails received on a given date.
  2. kokser

    searching for file in folders/subfolders, permission denied

    Here is my script This works perfectly fine. It searches the desktop and subfolders for RDP shortcuts, and edits the IP. I tried changing the strDir to a level higher, so C:\Users\dude\ but then I get Permission Denied at line 8 (first For Each). I tried changing to a bunch of difference...
  3. kokser

    Creating a dynamic, two-dimensional array

    I have been spending the last couple of days trying to create this script, but am having some difficulties getting it to work. The scenario: I have a program that exports a csv file with information about several customers. This program cannot split the information into several csv files for...
  4. kokser

    merging to output tables

    I am trying to figure out the best way to do this, and the only thing I can think of is merging two tables into one. the task Export following information for ALL AD users: Name, DN, TSAllowLogon. For all users that have a mailbox, I also want to export the mailbox size. All this information...
  5. kokser

    Exporting ad users tsallowlogon attribute

    As easy as this may sound, I am having some problems with it. Get-Wmiobject -namespace root\MicrosoftExchangeV2 -class Exchange_Mailbox -computer koks-u549ckztx1 | Where {($_.MailboxDisplayName -notmatch "System") -and ($_.MailboxDisplayName -notmatch "SMTP")} | select...
  6. kokser

    get-wmiobject legacydn - how do I get distinguishedname?

    Title may be a little misleading. Currently I have a small simple script that just outputs some information of users mailbox'. $filecsv = "test.csv" $date = get-date -uformat %Y/%m/%d get-wmiobject -class Exchange_Mailbox -Namespace ROOT\MicrosoftExchangev2 -ComputerName koks-u549ckztx1 |...
  7. kokser

    Write to sql table

    Coming from this thread, I hve dug around and it doesn't seem possibl to do it through ps, so I decided to go back to vbscript and try to execute the sql file. I have a script that should work, more or less. But it only connects to the database, without choosing a table to write to. I don't...
  8. kokser

    Execute .sql file through ps

    I have been googling around since my last thread, and can't find any way to execute a sql file. I'll try and explan what I want to do: My script first exports information from my exchange server. It retrieves the mailboxes, items in them, the size of them, and the dn for each. All this is...
  9. kokser

    Getting date into mailbox table?

    Thought I'd make a new thread about this. My current script exports mailbox information to a csv file, but I want to add the date to the table. Script (without export part): get-mailbox | get-mailboxstatistics | where {$_.ObjectClass -eq "Mailbox"} | Select-Object...
  10. kokser

    exporting to csv doesn't work

    I'm using PS 1.0 on a server 2008 with Exchange 2007. Script: ## Add-PSSnapin Microsoft.Exchange.Management.Powershell.Admin get-date -format d get-mailbox | get-mailboxstatistics | where {$_.ObjectClass -eq "Mailbox"} |ft...
  11. kokser

    ldap query - can't get desired values

    I decided that it was a pita to change the script for every domain, so googling aroud I found that almost everywhere the scripts finds the information itself. This part was easy to get working, however, it no longer pulls out all the values I need. Current functioning code...
  12. kokser

    export user "memberOf" for each user -> without ldifde/csvde

    Hello. I am using this script. Dim objFSO, WriteText, strText, strNewText, objFile, objConnection, objCommand, objRecordSet, objUser, strUserDN, strResult, arrProxyAddresses, objMemberOf Set objConnection = CreateObject("ADODB.Connection") Set objCommand = CreateObject("ADODB.Command")...
  13. kokser

    reading a text file and creating variables as strings

    Long story short, I have a small vbscript that looks like this: objshell.run "cmd /c ldifde -f temp.txt -s MyCompany -d ou=TestOU,dc=MyCompany,dc=local -r objectclass=user -l name,samaccountname,proxyaddresses,mail,memberof,homedrive,homedirectory" Set objFSO =...
  14. kokser

    possible to enumerate groups with csvde?

    Hello :) Currently I am running this command: csvde -f test.csv -r "(&(objectClass="User")(objectCategory="person"))" -l "name, samaccountname, mail, homedirectory, homedrive, scriptPath" Is there a way to also enumerate the groups (and OU's?) that every member is in?

Part and Inventory Search

Back
Top