Need help with my first ever powershell Script
So I want to Query AD and get a list of all users with the Display name, Phone number and email address.On Spiceworksforums, I found a Powershell script that kind of meets my requirements but it seems...
View ArticleLync Powershell Client Policy Report
I am needing to pull all the enabled users from a certain pool on the lync server that do not have the correct client policy. Then export it to a csv.Any help ism appreciated.
View ArticlePowershell Remove text in all files in a directory
I am trying to read all files in a directory and delete the matching string from all the filesPowershell$file="C:\temp\*.eml"$string="by archiver.simsbury.k12.ct.us with POP3 (Message...
View ArticleStruggling to get my script to by-pass a few directories
I am looking for a way to skip a couple named directories to the following code:Powershell#Using the OR || switch to unzip all files with .zip or...
View ArticleStart Powershell and ISE with modules
Hi All, I have a 2 part question. 1. I currently have shortcuts on my machine that just start powershell along with running a .ps1 script to load AD and exchange modules. Is that the correct way to do...
View ArticleRemove Duplicate Lines from an HTML file using powershell
Ok so I have been trawling the interwebz looking for a method to do this but I cannot for the life of me figure it out. I am trying to eliminate duplicates in the page and can't figure it out and would...
View ArticleGet New Users who have not changed their password
I am trying to come up with a way to scan for users who have just started and have not changed their password since they started.I'm sure I can do this through PowerShell.Here's what I'd like to...
View ArticlePower Shell Script
I have a script I am writing to help deploy printers on our network. The user will be able to pick from a selection of 4 printers and that will be the default printer.Here is the codePowershell[void]...
View ArticlePowershell Report Script
Hi Guys,Anyone please help to generate the report for eventlog for multiple computers.The condition is if i check the server there is no log for past 10 hours then its should exclude it from report,...
View ArticlePowershell and HTML tables
Hi guys,I'll say right away i don't like html and i know basics.I'm Revamping my user creation scripts and it outputs the content in a html format.The problem i have is the html in itself if i open it...
View ArticleInvisible Properties
Some of you may recognise this code snippet!PowershellDo{$TemplateUser=Get-ADuser-filter*-PropertiesDisplayName-SearchBase"OU=Template User...
View ArticleHow to search classes in PowerShell?
Hey all, I'm new to PowerShell and I'm having trouble grasping some of the concepts. One of my bigger questions right now is on WMI classes when using Get-WmiObject. I want a way to list all of the...
View ArticleCreating Powerhell VM Build Script
Hi Guys, Am stuck with a Powershell Look issue and ive spent hours on it so I turn to you to help fix it.This Powershell script ive written (still wip and needs some tidying) basically is being using...
View ArticlePowershell "A device attached to the system is not functioning" error
Hello All,I'm trying to make a powershell script that will enable the powermanagement features on a NIC to All the NIC to wake up the computer and allow a magic packet to wake up the computer. Every...
View ArticleWhy didn't my NULL test work?
This code works:Powershellif($TemplateUser.info){Write-Output"Which tells us, from the info field, that the OU for the new user will be $($TemplateUser.info)"}ELSE{Write-Output"This template account...
View ArticleNeed to delete a portion of text from text file
Hi,I am just a beginner in scripting . I am using power shell an want to achieve following thing.Remove the text in the text file which comes in between []E.g[2016-11-9 ......] some text [2016-11-9...
View ArticleNeed to remove file path from output
Powershell$dir="D:\TTL"$dest="D:\test"$FileName="D:\outputfile.txt"$FinalLog="D:\FinalLog.txt"$SearchString="failure"$latest=Get-ChildItem-Path$dir|Sort-ObjectLastAccessTime-Descending|Select-Object-Fi...
View ArticleAD User Report with attribs and email CSV
HowdyI'm trying to use this script I found on technet and modify it to fit a task I have to do.I am stuck on trying to do a couple of things:1. I have to query all of AD, but exclude certain OUs, ad...
View ArticleController Script examples
As I'm sure many of you know, Don Jones advocates writing lots of small scripts that do one thing (or just a few things) each - rather than one big script that does many things and has 100s of lines of...
View ArticlePowershell Script to forward the last sent item
Hi Guys,I am trying to come up with a powershell script that would (forward/view in outlook) the last sent itemI was able to use the below code to return the item, but I would like it to inspect it...
View Article