RegEx Help - Start with "string" but not include it
Hi Sirs,I am writing a code and I had some problems with the RegEx part. 8=FIX.4.2| 9=253| 35=8| 128=XYZ| 34=124| 49=CCG| 56=ABC_DEFG04| 52=20100208-18:51:42| 55=RRC| 37=NF 0015/02082010| 11=NF...
View ArticleMove-item: The process cannot access the file because it is being used by...
Hey,I have a powershell script where I first use Get-childitem to receive a number of files. Then I do some stuff with it and try to move the file afterwards.Unfortunately if I am using a lot of files...
View ArticleHow do I pin RUN.LNK when there are no Pin To Taskbar verbs
None of the RUN.LNK shortcuts have a Pin To Taskbar verb. I have searched every RUN.LNK on the disk, none have it. Under Win8, I can find the Run icon in the Apps panel, and pin it to both the Taskbar...
View Article[Forum FAQ] Using PowerShell to assign permissions on Active Directory objects
As we all know, theActiveDirectoryAccessRule class is used to represent an access control entry (ACE) in the discretionary access control list (DACL) of an Active Directory Domain Services object.To...
View ArticleHow to Connect to One Server, Extract Data, Connect to Second Server, and...
I have the following code that connect to my Central Management Server and loops through each server extracting data and inserting into a table on a different server. I only want to connect to one...
View ArticleReceive location of job after using Start-job command
Hey all so I have a script that installs software on remote machines. I've recently started using Psexec to start installing as the System account, however now I am not able to keep track of the...
View ArticleRemote query -Class Win32_Service does not show all services when executed by...
when I run the following WMI query on powershell using a domain admin user:gwmi -query "select * from win32_service where name like 'ReportServer%' and started = 1" -computername VM-SRV-01I got the...
View ArticlePowerShell equivelant of "netdom computername [computername]...
I'm adding a name to a workgroup computer, then making it the primary using this method:netdom computername Test-app6 /add:Test-app6.contoso.local netdom computername Test-app6...
View ArticleQuestion when Using A Powershell Script to Create AD Users
Dear all, I want to simply my work, so I wrote a script to crreate AD users, but unfortunately it doesn't work as designed. It's the code:Import-Module ActiveDirectory #import AD module $TempIns =...
View ArticleScope a private variable
Hi,Is it possible scoping a private param?Function Execute-vctest { [CmdletBinding()] Param ( [Parameter(Mandatory=$false)] [ValidateNotNullorEmpty()] [string]$private:LogName ) } execute-vctest...
View ArticleLast logged in user
I am trying to query a list of computers and get last logged in user. First i tired wmi and found out that some or most of the clients do not have that class populated.So i am trying to read users who...
View ArticleNeed Help with for each loop using datatable
cls $error.clear() ### load assembly [Reflection.Assembly]::Load("Microsoft.SqlServer.Smo, ` Version=10.0.0.0, Culture=neutral, ` PublicKeyToken=89845dcd8080cc91") | Out-Null...
View ArticlePowershell Command to check specific user is a part of certain group or not
Hi, I need a powershell script that will check whether specific user is a part of certain group or not and if the user is part of any of those groups, script should remove it. E.x. $User = "Test"...
View Articlescript to check last job run status
I want to create a script which will check if a particular job failed last night. if it failed then the job should be disabled to run next day else should run normally. I know a bit to write powershell...
View ArticleGet list of SharePoint Checkout files "Microsoft.SharePoint.PowerShell" is...
Hello - I have a SharePoint 2013 environment. On my PC (Not the SharePoint Server) I have installed PowerShell version 3. I was trying to use my PC and using PowerShell to get list of checked out...
View Articlewhat is command or syntax for export windows 7 enterprise machines from...
i am looking syntax to for following scenarios Get-ADComputer -Filter {OperatingSystem -like "*Windows 7 Enterprise*"}|Export-Csv C:\group1.CSV -NoTypeInformationso i am getting actual report now...
View ArticleExporting Event Logs to XML - Please help!
Hi All,Can anyone help me out? I suspect this is something to do with the version of PS installed but its driving me crazy! I want to run a script on a remote machine to export a certain type of Event...
View ArticleBasic powerscript to output for loop to file and email
Hi I have this basic script that goes through a text file to ping all listed IP addresses to see if active.I'm trying to output the results of this script to a txt file, that I can auto email results...
View Articlelaunching an application with a PS script
Hi everybody, I'm an absolute beginner with PowerShell, so please be patient :-) I'm going to write my first script for PowerShell. The script core concerns an external software I need to...
View Articlepowershell folks who also use nodejs, looking for input
hey all - I recently had a need to bridge nodejs w/ powershell, in particular maintaining pre-established remote pssessions to o365 and then allow a program to invoke commands over those...
View Article