searching for info about CSV files
please excuse my in-experience. im spending lots of time working with powershell and im learning a lot. im in the process of creating scripts in sapien powershell studio. im learning how to do things...
View ArticleSelect-String
Hi,I'm trying to search for two values in a text file and only return a list of the files that have those two values, so far I only get everything back, any ideas ? gci E:\test | Select-String...
View ArticleGet all users with job title "XYZ" and assign license with options "ABC"
Hello AllWe are in the process of a mass migration from on premise to O365, and as part of that I have the lovely task of assigning the licenses. As this is a phased roll out we are currently only...
View ArticleStart-Transcript
I always run the PS session using Start-Transcript, but the $transcript variable, which is supposed to indicate the file in use, always returns nothing. Why is this?
View ArticleRemote powershell script fails to execute
ExecuteCommand(Directory.GetCurrentDirectory & "\psexec \\myservername -u username-p passsword %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe") Public Sub ExecuteCommand(ByVal Command...
View ArticleResizing a folder full of JPG
Is there a method to resize the pictures in jpg fromat from a folder. using foreach ($_. in $photos) {'' resize/format image etc etc } the resize needs to be specific 400/351 It is a process i am...
View ArticleNeed help with Invoke-Expression
Hello everyone!I am in need of assistance with Invoke-Expression. In my script I need to build function names to match the domain the script is being ran in.For example, a function is named as...
View ArticleExclude OU not working
I have this code that will get all users from AD $old = (Get-Date).AddDays(-90).ToFileTime()$ldapFilter = '(pwdLastSet<={0})' -f $oldGet-QADUser -LdapFilter $ldapFilter -SizeLimit 5000 This returns...
View Articleconvert Text to objects
My PowerShell skills are very limited and I was hoping to get some help. I need to convert output text from a legacy CLI tool into objects so that I can better utilize Powershell's capabilities. The...
View ArticleText in windows forms rich text box not updating properly
Not sure if this is the right place for this question. I have written a windows forms powershell script and I have a function in the script that updates a richtextbox that I have in the form.The...
View ArticlePreparing a string that contains both single and double quotes for PowerShell
I'm using PowerShell in a Microsoft Orchestrator 2012 activity. Manipulating data from Microsoft SCOM 2012 Alert. When subscribing to the Description string from SCOM alert, the string can contain...
View Articleparse strings
I've done a few google searches but would like some help on the following. I need to read a .TXT file of computer names. And then I need to grab just the first 3 characters of each computer name....
View ArticleThe parsing questions made me think of something I'd like to see in PowerShell
I'm an old mainframe admin and I used to do a lot of REXX scripting in VM/CMS. REXX has an amazing parse command that made it extremely simple to parse strings.It would be amazing if we could get this...
View ArticleDefining colors in a html style sheet
Below is a shorted version of a script I'm against my vCenter server. All I want to change is have it color some of the cells red depending on the $f variable.If any item fails the compliance check it...
View ArticleCompare-Object for two CSV files
What I am trying to do is grab two csv files and compare the information and pull the data into a text file or Convertto-html. I would like to match or -IncludeEqual the id's and then out-file the id's...
View ArticleGet-ADUser to Get-Mailbox
I'm running a report with the below script.All our users have an EmployeeID field populated. So I had to create the dump.txt file with:Get-ADUser-Filter'employeeid -like "*" -and employeeid -notlike...
View ArticleParse CSV with udpated Contact details, and update Contacts' details with...
We have a list of email contacts with Customattribute1 set to a 6 digit number.I will be provided with a list of these contacts in csv, some of the details may have changed, such as lastname, title and...
View ArticlePowerShell queries across sites very slow
Hey guys, I am setting up Exchange 2010 on Windows 2012 servers in 2 sites. These are 2 different AD sites and they are connected with a 10MB pipe with no firewalls between them. When I run Exchange...
View ArticleReport for last time user accessed their email account and sorted by department
I've been tasked with creating a report listing users, department, last date/time they accessed their email account sorted by department.The example I have provides a lot of information but not the...
View Articleexchange 2010 - list folders for all users inc number of items
I need to list all folders that our users have in their outlook inc number of items.This is what I have:Get-Mailbox | Get-MailboxFolderStatistics -FolderScope All |Sort-Object FolderSize...
View Article