Remoting issues
Very new to powershell here........I've got a script that I've pieced together to remove and reinstall java. The script runs fine locally, runs fine when I enter-pssession on a remote workstation and...
View ArticleWinRM Remote Powershell session (wsmprovhost.exe) not exiting after calling...
The company I work for has a powershell based deployment process for deploying a web application to many internal web and database servers. We use remote powershell sessions and winrm to run an...
View ArticleStart-Process in a for loop Powershell
Hi,I am trying to write a script that starts a defrag on selected volumes. The idea is to get the volume letters of volumes that are greater than 50GB, loop through each letter and add it to a line...
View ArticleI have a working script that copies items, but I want to "Move" them
I know just enough about powershell to be dangerous. Anyway, this script works. It's used to look the the Exif data on photo's and organize them in folders based on date. This script copy's the...
View ArticleNOOBIE script question
ok, so I found a script and altered the text to say what I want, here is the script:$host.ui.RawUI.WindowTitle = "Running Performance Counters Collecting" $Source = “Bstats”$UserIopsIntervalInput =...
View Article"Timestamp" format change
What I would like to do is instead of displaying this:$obj = $metric.CounterSamples | Select-Object -Property Path, CookedValue, Timestamp;I would like it to do this:$obj = $metric.CounterSamples |...
View Articledir/s print cmd window resluts to a file
I am not a programmer but an old DOS user. I want to execute dir/s from my command prompt and have the results saved to a file. What would be the syntax to achieve this in Windows 7?
View ArticleCan Powershell be used to make a text based game?
I've been experimenting with different programs trying to find an easy to understand language to make a simple text based game, I learned about BATCH but most of the documentation I have on that shows...
View ArticleAdminstrative Center History
I understand that PS save the history per PS-session up to 32767 cmdlets. I know that i can export the history to a .xml file, but...Where is the ADAC history saved?I can see that the history is still...
View ArticleGet-AD-Group, filter Member, work with duplicats and go on..
Hi! Description of what I'm trying to do: I filter some groups out of my Active Directory, All these groups contain "ABC-I", those groups got a value (persons) in the "Name" field of "ManagedBy" tab....
View ArticleExchange Message Count
Hi There,I am using the cmdlet below to extract the number of messages received by a users in Exchange 2010. it works fine and give me the message count however I cannot find a way to output the...
View ArticleGet-Content b.log | Select-Object -last 5 | -Wait -- Need help with syntax
Folks,I am new to Powershell and i'm coming from Linux; however, I am eager to learn Powershell since it looks very rich. Yet, I am having some problems with my Powershell code.I need "tail -f"...
View ArticlePowershell Script - Email Output Failure
Folks,I'm using QAD CMDLets to produce CSV reports on inactive accounts then at the end of the script a simple send-mailMessage command to email the output to a specified account. All works great if I...
View ArticleHow to use Powershell to set delegate for user mailbox in Exchange 2010 and...
Hello, Can you please tell me if I can set delegate for user mailbox in Exchange 2010 or Office 365 using Powershell?If I can, then how can I do that? (which Powershell commands for setting the...
View ArticleWhy WebClient DownloadComplete Event is not executed
$webClient = New-Object System.Net.WebClient $Global:downloadComplete = $False Register-ObjectEvent $webclient DownloadFileCompleted ` -SourceIdentifier WebClient.DownloadFileComplete `...
View ArticleRead servernames from text file and perform action for all of them
Hi allI have the following code$CheckOut =Get-EventLog-ComputerNameNameofServer-LogNameSystem|where{$_.eventID-eq1074} |ft-AutoSize-Wrap|Out-String$today = Get-Date -format dSend-MailMessage...
View ArticleReset variable powershell
Hello This is my script$Computers= gc .\CSV\1.csv foreach ($ComputerName in $Computers) { Try { $DNS =[System.Net.Dns]::GetHostEntry($ComputerName) } Catch { "There was a resolution error: $_ " # Do...
View ArticleNET.EXE with variable doesn't run
Hi Folks,Our Service Desk have granted Users Full Mailbox access to users rather than groups and I am looking to correct this. I've not got a Windows 2008 DC so I'm looking to modify group membership...
View ArticleXML - Change node value selected by attribute. Is it possible?
I got a xml file with this content:<?xml version="1.0" encoding="utf-8"?><configuration> <applicationSettings> <MyApp> <setting name="Button1"...
View ArticleComparison of dhcp scope with AD sites & service through power shell
Hi All,I am thinking of something that could parse through all Scopes in all DHCP servers and then make sure that there is a site and a subnet associated with that DHCP Scope. How can we get this done...
View Article