Unable to import ActiveDirectory module
I'm running Windows 7 Pro with PowerShell 4. The AD cmdlets I had been using have stopped working since upgrading from PSv3. I've enabled the Active Directory Module for Windows PowerShell in the...
View ArticleNeed help with using Get-Process in Conditional Logic
Hi, So i'm trying to write this small script to get the status of a process on a list of servers using Get-Process. So when i run the below code i dont get the results as expected. It doesnt check for...
View Articlehow to get log for each share
Hi, everyone i m new in powershell and scripting looking for your advie on below query Here i am not able to get the log as per requirment my requirment is to get the log for each shares in the...
View ArticleAdd Global Security Group from Domain B to Domain Local Security Group in...
Hi to all. I need to add multiple Global Security Groups from Domain B to Domain Local Security Group in Domain A.A forest wide trust is in place.Group "SGDL Test" is in Domain AGroup "GSG Test" is in...
View ArticleLooking to fix my powershell script for updating secondary site...
I'm not a professional at this and I didn't even stay in a holiday inn last night, so I'm hoping to get some assistance with a script... or maybe a good suggestion for how we can easily resolve a...
View ArticleDelete CR LF characters within a specific block of text in a file
Hi, I have an XML file that contains something similar to this:<Address1> some text here CR LFanother text here</Address1><Address2>text here</Address2>How do I use...
View ArticleAssist with my SQL Reporting Script
I have started writing a HTML SQL reporting script based off of Jeffrey Hicks tutorialHere is my entire script:###################START SCRIPT######################################requires -version...
View ArticlePost xml on a webservice
Hi,I'm trying to do an xml post on a webservice. But i think i'm doing something wrong with the XML string. It seems to expect an integer. Does anybody have a tip to get this post working? Please...
View ArticleMy xml post seems to work only i get a unknown error
Hi Guys,Thanks to this forum my post finally works. But i get an unknown error in this script:# Setup data in variables$Login = "login" $Password = "password" $Reference = "Technisch beheer" $BodyType...
View ArticleWhen to use foreach in a pipeline?
HelloI keep running into this confusion - when to use foreach cmdlet in a command line and when not to? (Please note I am not talking about foreach loop construct).For example I have seen the following...
View ArticlePowerShell web scraping
Hi Folks,I've an automation in PERL that scrapes various web pages and extracts data from tables under those HTML pages. It uses WebScraping Perl Modules to ease all that processing. We are now...
View ArticleNeed to invoke functions but can't escape from loop
I need to write a script to check a mailbox every 15 seconds for new mail. I've made some progress but thinking forwards I'm gonna want to run the script against multiple mailboxes. It's something like...
View ArticleActive Directory Powershell "internal error..."
Hey all,Need help on this. I have two domains A and B. I was able to do powershell AD queries on both domains. Starting yesterday, I can no longer run queries on A domain. I keep getting the error...
View ArticlePowerShell Script to fetch Logon/Logoff user on particular server...
Hello, I'm looking for a script which can fetch for me a username that he/she loges in on all the servers.I have tried several scripts, but it doesn't fetch the information i'm looking for.Get-EventLog...
View ArticleHow Do I Edit a Text File in PowerShell??
How do i edit the text (or paragraphs) in text files using PowerShell?Thak You
View ArticleImport Multiple Excel Into Sql Server
I have 4 Excel spreadsheets all with different formatting and column names that I want to use powershell to import into ONE Sql Server Table that I will want to create with powershell. I have found...
View Articleinsert multiple objects into variable (array)
Hello, I need to create PS script to which gets logged on users(get-rdusersession | select UserName), puts them into variable $users=@(user1,user2,...,userN) and runs foreach {something} - something...
View ArticleEWS - Error subscribing to streaming notifications
I'm using the sample code I was pointed to at Glen's Exchange Dev Blog, to open up streaming subscriptions for new mail notifications via EWS. I've changed it a little bit because I want to listen to...
View ArticleHow do you enumerate domain users mapped drives????
I'm migrating file shares from Windows 2003 file cluster to a Windows 2012 R2 DFS shares. Unfortunately, users that are mapped to those shares off the file cluster are not being mapped via GPO or logon...
View Articleadding timeout limit to System.Diagnostics.Process
Hi, I am running an application perfcalc.exe by sending some parameters through "System.Diagnostics.Process". The purpose is, I want to receive back the exitcode and standard-output. It's working...
View Article