csv to xml conversion, element naming problem
Script:#Convert CSV FILES TO XML #Test if directory has and csv files, if yes then proceed if((test-path c:\temp\csv\*csv) -eq 1){ $csvpath= get-childitem c:\temp\csv\*.csv| foreach-object {...
View ArticleChecking User in AD
Hi Scripting Guys,I am working on a script to automate a task, for that I created one function to check if a user exists in AD before executing the mail function, below is the code, but it seems that...
View ArticleRobocopy to move subdirectores, without deleting root directory
Is it possible to use robocopy to move all folders from C:\robo\test to C:\robo\test1 without deleting C:\robo\test? Here's what I'm currently using : robocopy C:\robo\test C:\robo\test1 /MOVE /E /R:2...
View ArticleMonitor Active Directory
Hi,I just want to know is it possible to create a script which runs everyday and checks for new entries in AD. Is it possible to monitor AD automatically. \m/
View ArticleGenerate SamAccount
Hello @All I´am really new in scripting. I have have a Script that import User from a CSV file to our AD. The worst thing is that we have a name convention for the SamAccountname. there should be 6...
View ArticlePowershell Error Catching for Rundll32 printui.dll,PrintUIEntry
Hello,I need to use rundll32 printui.dll,PrintUIentry command in a powershell script.I use TRY/CATCH with invoke-command cmdlet, but the problem is when an error occurs, it is not catched,...
View ArticleWhy does Get-ADObject not work in this script?
Ok, I've created a form using primalforms (something blogged about on the scripting guys last year) so a coworker will stop complaining that my search and restore deleted accounts script is command...
View ArticleWMI VBScript results error
I have written the following script using scriptomatic to check for the existence of a specific service where I have substituted “my-computer” in the array with the actual list of computer names. The...
View ArticleConnect to (already paired) Bluetooth (Audio) Device and set it as default...
Hi,is there a way to to so using powershell? It's annoying to always open the Sound cpl, then right click the A2DP device connected to my stereo, click "connect" and then set it as Default device.Any...
View ArticleAuto answer Y for batch files.
Hi,I am writing a batch file which runs a command prompt to execute an application. - the command line needs a confirmation Y or N after the line is run - how can I automate the answer to be Y via a...
View ArticleHow can I query a https website used to display the status of an application...
Need assistance on querying the status of an application using Powershell. The status of the application is displayed in a https website. I want to receive a notification when one of the listed...
View ArticleHow can I capture delete user event in Active Directory 2008 using Powershell...
Hi,In my Active Directory every user have own home drive in the file server. When I delete user I also need to delete folder from the server. My target is make the process automated, so that when I...
View ArticleReading WMI (Serialnumber) before windeploy.exe
I have written a Powershell script to read the Serialnumber of a device, and then use this to name the device. The line of code is :$strSerial = gwmi Win32_BIOS | ForEach {$_.SerialNumber}The script...
View ArticlePowershell: force set-content to write UTF-8 with BOM?
Hi!I'm trying to get powershell to use UTF-8 with a BOM.Normally, when I create a new file, set-contents -encoding UTF8 works fine. However, when the file already exists and has no BOM, no BOM gets...
View Articlebatch script to open a macro in remedy which inputs the credentials and runs...
i want a batch script which runs a macro in BMC remedy, can someone please help
View ArticleAdd laptop to particular group in AD
I want to create a script which monitors AD for new Laptop addition and whenever there is addition of laptop in AD it should be added to particular group. I know how to manually add Laptop in group...
View ArticleEnable PowerShell remoting on new Azure VM?
I've created a new VM in Windows Azure to use to act as a host to learn a bit of Powershell Remoting. After the VM was created I RDP'd onto the box and enabled remoting via the following command:>...
View ArticleScript to create file .dmp and .log in .par file.
First File (Batch File Script). this one ok. and this batch file taking user name and password and running the .par file (Second file details following), to create the .dmp file for export., after...
View ArticleHow to create service to reuse PSSession to Exchange online servers (Office365)
Hi,what I want to do is create some service that will create and maintain PSSession to Exchange online server (Office365). So I dont have to always create new session when I have to run some command on...
View ArticleInstalling SQL Server 2012 remotely via Powershell using Invoke-Command
I am trying to perform a SQL Server 2012 command line installation using Powershell Invoke-Command on Windows 2012 Datacenter.The code I am using is as follows: $ret = Invoke-Command -ComputerName...
View Article