Looping Test-Path
I am attempting to create a looping PowerShell script for see if a folder named after a computer is created. This is going to be used to kick off a process once the folder is created. I cannot seem...
View Articletakeown recursive not working on redirected My Documents folder
So I'm trying to set owner Local\Administrators group on users folder(s) recursively, all works good until it hits a redirected folder, like My Documents. We had the GPO setting 'Grant user exclusive...
View ArticleRestricting certain users groups to read only for certain folders
HiI'm not sure if this is the correct forum, but hey, hopefully someone might now the answer or direct me to the correct one.I'm writing a VB program to amend ACLs for specific user groups.Effectively,...
View ArticleSearching for calendar items older than a specific date with search-mailbox...
I need to find the total size of all calendar items in a mailbox older than a specified date using PowerShell through the search-mailbox cmdlet's searchquery parameter. My problem is that I cannot...
View ArticleHow to convert a CR+LF (DOS/Windows) to LF (Unix)?
Hi everyone,I work on T-SQL and have no idea about VBScripts. I'm trying to do a bcp on SQL Server. However, the file I'm bcp'ing is writing CRLF to the file. I'll be moving this file later to an Unix...
View ArticleStruggling substringing within an Array Pattern
Hi, I have some clunky code and I'm sure it can be better. Looking for suggestions. I search a file and to file lines before a search pattern. Sample log file.Date Line 1 - Blah Blah Blah Dynamic...
View ArticleUsing XMLReader in a VB Script
Hi,The code below works well for me in VB.NET, however, I need to perform this using VBScript. I have been unable to find any documentation or examples of how to create an object that references the...
View ArticleTechNet Script by Ongle : "ModernAppRegFix.ps1" Get Modern W8 Apps to Work -...
10.03.2014TechNet Navigation Help, please.I found a script (ModernAppRegFix.ps1) written by Ongle on TechNet>Script Center>Repository>Operating System>Re-Registers Modern Appx packages that...
View ArticleWindows icacls and saving NTFS security data of subfolders
I’m trying to save all NTFS shares security data using icaclsAnd I want to achieve this only for the upper folderIn other way, let’s assume, I have a directory; “D:\Share” and too many subfolders in...
View ArticlePowershell - List all servers in the domain and the OU they reside in
Hi thereI am trying to list all servers in my single domain with the OU that they reside in and then export to either a .csv or txt file using Powershell. (Very new to Powershell). I have so far...
View ArticleGroup Members List
I have a script that works, and creates a list of all the groups in my domain and spills them out on screen.I would like to enhance it so that it changes the distiguished name format to just the CN...
View Articleusing 3rd party binary in script that is run as job
Hi all,I have several scripts to do various tasks with IIS logs we receive from all our various web servers. One script unzips logs, another logparses to grab a few fields then sftp to a 3rd party for...
View ArticlePowershell Script
I'm looking for a powershell script that will list mail enabled distribution groups (also dynamic distribution groups) for a AD user.
View ArticlePowershell Connection to Database: Issues Writing Data back to Database
Afternoon;I'm updating a script file we have that we use in a remote assistance application and I am able to get into a database to read the information that I need but now I need to write back to the...
View Articlehow to use wild card with variable in powershell
HIi am trying to use wild card with variable but getting an error message, "You cannot call a method on a null-valued expression."$src = 'C:\Temp'$TabletzipPath = $src + "tab*.zip"i would like to copy...
View ArticleFilter mails by date - user mailbox, exchange 2007
Hi, I have exchange 2007. I need to get a report (powershell command) that contain the numbers of emails that the user received from DATE X to DATE Y. I need to connect to a user's mailbox and pull...
View ArticleReplace a string
Hi I have this script but not working. I need to loop through all the profiles c:\users\* and when you find the "config.ini" file which is usually C:\users\profile01\AppData\Dir modifies a string by...
View ArticleHow to manage get-child item, then foreach child move the item some where
Hi,I have a directory structure like the following:RootFolder-> SubFolder1 * page1.txt* page2.txt* thumb1.jpg* thumb2.jpg-> SubFolder2* page1.txt* thumb1.jpgNow, what I want to achieve is like I...
View ArticleObject Required: 'Wscript'
I've used the below VB script in my .hta application for selecting the folder. But when there is no folder is selected and I click 'Cancel' button then am getting Script error: Object Required:...
View ArticleAppend to CSV in PowerShell?
I'd like to find a way to append to an outputted csv file in Powershell. Out-File has too much wasted space and duplicate lines. Here's the script I'm trying to run:$a=Get-Content users.txtforeach...
View Article