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

struggle with where clause

Hey All.I'm struggling with a script. I snagged a check logon/logoff time script off the net and edited it a little by adding a remote computer option and  date picker. After that i wanted to extend it...

View Article


Does Update-Help actually run only once a day unless the -force switch is used?

From the Get-Help for Update-Help"You can even automate the running of Update-Help by adding an Update-Help command to your Windows PowerShell profile. By default, Update-Help runs only once per day on...

View Article


How to redirect verbose to the log file...

Test1.ps1 has below code.....## Calling script to spool the verbose log to a log file ##$ScriptPath = Split-Path $MyInvocation.MyCommand.Path Invoke-Expression "& `"$ScriptPath\Test2.ps1`"...

View Article

Simple Logging Function

I was using the following commands in a loop to look for conditions and output a few variables to a CSV.$object = New-Object -TypeName psobject -Property @{ UserName=$member.username Path=$Path...

View Article

How to speed up powershell script that utilizes .csv files

I have used this script several times to bulk import users into AD, but now it seems to slow down considerably.  It works fine as the information is correct.  I am typically importing around 300-400...

View Article


If statement question

Would anyone know why my function works except for the first "If" statement I have in the process block?I swear all of this worked last night...#Gets Java version from a computer list entered by...

View Article

3 Part File sorting with Powershell Script according to Date

Hello,I have one script ready for power shell which can read .PDF file and according to its file format it goes to particular year and month folder,Now I have one other file which require sorting and...

View Article

Howto set permissions on disk under mountpoint powershell?

I have three file servers and need to automate tasks regarding setting permissions on folders on these.I have no problems setting permissions on the folders of the mountpoints, but cannot find a way to...

View Article


Enumerating IIS:\SSLBindings gives failure on one machine, works on another

Hi,I'm struggling to find the correct forum for this question, but as I'm working on a PowerShell script this looks like the one that's closest to my issue. The following issue occurs. I have a script,...

View Article


Regular expression

Hello,I need to split a string (a Distinguished Name) in 2 parts: CN and OUsHere is an example of the string:$DNString = "CN=MyGroup,OU=OU3,OU=OU2,OU=OU1,DC=mydomain,DC=local"With this command, I can...

View Article

Need's help in power shell Commands

Hi All, I have a CSV file with the Structure below Id,Name,Text, ---------------"1","A","joined "Newly"","2","B","joined "10 month Back"","3",="c","joined 1 yr back", I need help in writing commands...

View Article

Powershell help script help....ima noob :(

So i normally do not have to do task like this..so please dont give me a tutorial...I just need some help finishing this. all i need is a script that will calls actions against the chosen service....

View Article

Running through an array and do something - Where is my mistake?

Hey,I'm still working at my script and ran into another issue.Now I have an Array which is called $Groups. In this Array are are informations from an AD Group like Name, Member, Info, ... .I like to...

View Article


Check web site availability

Hi i manage a few internal sites like$sites = site1.mycompany.com , site2.mycompany.com , site3.mycompany.com I would like to monitor them and make sure they are up.What is the best way to do...

View Article

Grouping Application eventlogs

Hi Team,I tried to group the event IDs reported on my application logs using following command -get-winevent -logname "Application" | select id, Message | group-object idI am facing a challenge that...

View Article


File Share Witness

I need to get the File Share Witness for all clusters. I already have a report in place which queries the cluster, clusternode, and if they are online or offline. Does anyone know a the syntax to get...

View Article

create an empty multi-dimensional arraylist

"Well, how did I get here?"I'm running through a large number of users (>100K) returned from AD (findall) and need to check attributes (samAccountName, mail, etc) for specific errors.  Those will...

View Article


Help with scripting remote desktop and pinging

Hey guys, What I want to do is hopefully simple.  It's 2 things actually that should be simple.1. Under the Remote Desktop function I want to do a check to see if fDenyTSConnections is already set to 0...

View Article

WinRm

How can I start a winrm in a remote machine? I'm trying to have access to machine to use Invoke-Command but WinRm is stop in the remote machinemichael john ocasio

View Article

get-content for a one-liner file

Hello,i am using get-content to build an array of lines of text in a file, for further processing.this works beautifully, except....when the file has only one line, the array is not an array of one...

View Article
Browsing all 21975 articles
Browse latest View live


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