Newbie Scripter College Question need help please
If someone could just point me in the right direction as to how to write this script, I would greatly appreciate it.Q: Write a script using the switch statement to prompt the user for a favorite fruit....
View ArticleHow can I make this command shorter?
Get-WMIObject -Class Win32_ComputerSystem -Computer "COMPUTERNAME" | Get-Member | ? {$_.MemberType -eq "Property"} | % {"$($_.name) = $((Get-WmiObject -Class win32_computersystem -computer...
View ArticleIs it possible to add and element to a foreach loop while looping the elements
Hello All,I wounder if the following is possible as I have a situation where this would be useful.let says I have a variable called $ListOfFiles that reads in a text file containing the names of 8...
View ArticleCopy File with alternate credentials
HiIm looking for a way to copy a file to a destination with alternate credentials.so far I couldent find a better way then mapping network drive. Plz help Naihan
View ArticleDelete Rows in Excel based on a value in a particular column
Hi all,I'm trying to delete rows in an Excel SpreadSheet based on values such as begins with 'A*' in a particular column. the problem is that I can't figure out what the property is to delete rows and...
View ArticleComplete Newby - TSM & dsmadmc.exe
I'm trying to write a script to generate reports from TSM using the built in SELECT statements.Below is what I have that works, when running manually. # First set working directory so it can...
View ArticleISE V3 Extracting console text via script
Windows 7 SP1 PowerShell V3When run from the script pane, with ABC 123 entered in the command line, these lines produce the following:Write-Host $psISE.CurrentPowerShellTab.ConsolePane.TextThe complete...
View Articlecapture second word in a line
Hi,I have an output file were i only need to capture the second word of each line.example: Removed windows6 on esx01I only need to caputre the word "windows6" in this example.
View ArticleInfrastructure Testing on Failover cluster in SERVERS.
Hi Expert, I seen your blog, it’s very interesting, as a entry level windows admin,I don’t know that much experience in power shell. it’s very helpful to my day to day task.In environment we are plan...
View ArticleNeed Infrastructure testing document
hi I need infrastructure Testing document for my project. can any one sent it to my id : babu.sys@hotmail.com Thanks Babu
View Articlewriting text files compatible with notepad
I want to be able to write a file in powershell that can be opened in notepad (and sent as exchange email content).the powershell defaults create a file which notepad doesn't exactly understand.for...
View ArticleActive Directory WMI Event Watcher for a modification on a group within in...
Powershell question, I want to register a WMI Event watcher to monitor an AD group modification and I am getting a WMI quota violation. Any thoughts on how to do this or optimize the WQL query?$query =...
View ArticleAdding global groups to local groups
Hello,Is there a power shell script that would allow me to add global groups created on DC to local groups on various servers without having to do this manually? Servers are in a single domain.
View Articletools and permissions
Hi,I'm currently reading a Powershell Toolmaking book, and was wondering about tools and security... What would be a 'best practice' to accomplish the following:I want to write a tool to add a printer...
View ArticleLast Time Domain Admins Changed Password
My manager just asked me for a report for all domain admins in a group called Domain Admins. The report should include when the last time all members of the group changed their password. I am new to...
View ArticleAD "clean-up" scripts
I'm trying to create (if one doesn't already exist) a couple of PS scripts.1.) Recurse the home directory folders on the server (i.e., \\server_name\share\jsmith , \\server_name\share\tjones etc.) and...
View ArticleQuery OU for expired accounts within specified date/time - real time?
Hi Folks: I am trying to find a way to query AD for user accounts that are set to expire, but that's the easy part.I need to run a scheduled task that ties into a Quest system we use that does a whole...
View ArticleGPO delegation Custom security settings
Hello!I'm not sure if this is the correct section, so please point me in the right direction if i'm wrong. Altso before i start i want to inform you that I'm still kinda new to PS scripting so the code...
View ArticleGet a list AD users that have logged onto a computer
I am looking for a way to get a list of AD users that have logged onto a more or less public computer. I can get all the local users, but not AD\users.I have not found any references and have no idea...
View ArticleDomain Controller extended attributes
I'm looking for a way to query all domain controllers in AD and return a specific attribute of each one. The attribute is the msDS-AdditionalDnsHostName which I can see through ADSIedit but I can't...
View Article