Quantcast
Channel: Windows PowerShell forum
Browsing all 21975 articles
Browse latest View live

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 Article


Move-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 Article


How 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

Image may be NSFW.
Clik here to view.

[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 Article

How 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 Article


Receive 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 Article

Image may be NSFW.
Clik here to view.

Remote 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 Article

PowerShell 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 Article


Question 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 Article


Scope 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 Article

Last 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 Article

Need 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 Article

Powershell 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 Article


script 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 Article

Get 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 Article


what 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 Article

Exporting 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 Article


Basic 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 Article

launching 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 Article

powershell 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
Browsing all 21975 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>