powershell error when invoke another script
I have two scripts that run fine as seperate scripts, but when I invoke one from the other then I get this error message:<br> "Exception Name:...
View ArticleScheduled Remote Reboot using Powershell Script
Hi Guys, Can you help me or share your ideas for a scheduled reboot on a particular server. Actually we are working in an insurance side that requires us to have an atutomation for scheduled Reboot of...
View ArticleI cant connect to remote host without specifying the FQDN
It used to work with netbios name, but now i have to specify the FQDN. This doesnt seems related to DNS and the problem is on my workstation only. Does anyone have a clue ?I'm running windows7 64bits...
View ArticleProblem with Powershell script to check folder sizes on remote servers
My script below is supposed to get the total size of folders and files within acertain directory. However the error shows Get-ChildItem : Cannot find path '\\servername \c$\Documents and Settings'...
View ArticleProbelm importing a text file into excel with powershell
here is my code, I have tried many things I found on the web and none seem to work. it imports to excel but is not broken into cells. I think it has something to do with the format of the mod1.txt...
View ArticleProblem Combining csv files
Hi there my Powershell collegue is on holiday and he gave me the idea to look into powershell hashes to created the report I want. I will try to explain here what I want and what I already retreived...
View ArticleIf else condition not really working.
As part of a script which i am writing, i have a small section for emailing results of the execution to couple of us. I put a if else condition so that we get mail only sometimes when the condition is...
View ArticleNeed some help with parsing this txt file into a CSV format
Hello Everyone,What I am trying to do is take this .txt file and convert it to a .csv with the AD group in column one and the users for each group listed next to it in column two equally matched in the...
View ArticleModifing HomeDirectory Settings
At the college I work at we are removing the students H: drive and I believe I have the correct powershell script to do that. set-aduser -filter * -searchbase "ou=ouName,dc=domain.dc=local) |...
View ArticleHelp formatting a txt file to output to a HTML Report
I'm in a scripting class online and I'm having a hell of a time formatting a txt file and outputting it to HTML with Power Shell. I need to render the HTML report with all the information from the txt...
View ArticleNeed to Process 12 Files parallel using Logparser
Hi All, I am trying to use Logparser to insert IIS log data into SQL on hourly basis. However, I have an issue with the duration it takes to complete one hour data. This way i am lagging behind on...
View ArticleCheck latest file and download
Hi all,only just getting started in powershell and have come up with a question.I have the following script that downloads a file from a sharepoint server.$storageDir =...
View Articledifferents between system.directoryservices.activedirectory.domain and...
Hi, i would like to ask, what is the differents between following classes ?[system.directoryservices.activedirectory.domain]::getcurrentdomain() and microsoft.activedirectory.management.domain...
View Articlewin32_product not returning anything
Hi!Just started to learn powershell and I think I'm loving it :-) Anyways, trying to make a script to determine what roles are installed on a server. And if the roles are missing then install them.I've...
View Articleerror while adding user in local policy
Hi, Below is my script to add user into local policy using powershell script:#********************************* AddUserRights Function AddUserRights {...
View Articledetermine which network drive is mapped in user computer
hi, i have a domain environemnt. I 'd like to determine which network drive is mapped on domain user computer. (i use domain admin account). I type : get-wmiobject win32_logicaldisk and use drivetype=4...
View ArticlePowershell & C# to check if host available
Hi All,I have a c# code segment which process a power-shell script. The following is the code segment. Runspace objRunspace =null; objRunspace =RunspaceFactory.CreateRunspace();...
View ArticlePowershell xml insert parent tag around all siblings?
<root> <parent> <child1> ... </child1> <child2> ... </child2> </parent></root> i would like like...
View ArticleGrabbing the filze size of a group of files from a select-string
I need to grab the file size of a group of files from a select-string. There are two folders that i need to manage. $Source = C:\TEMP\isantillan1 and $Destination = C:\TEMP\isantillan2. The logic here...
View ArticleWhy can't I pass a string variable to the -Query parameter when using...
shouldn't this work?$this = "select * from win32_service where name='WinRM'"Get-WmiObject -Query $thisI need to build a query string by supplying a variable. I've tried various ways to include the...
View Article