Where-Object filtering using an array
Greetings! Trying to use Where-Object to filter out the returned data from Get-ChildItem. I essentially want to include everything that matches "Microsoft Lync Server". This works fine for matching...
View ArticleFinding login events to a list of remote comptuers without using AD
Hello,I've been tasked with finding users who have logged into a list of remote computers. I'm thinking the easiest way is to use the Security Event Log. To that end I found a great script here:...
View ArticleSharePoint Online Recycle Bin and accessing via Powershell
Is it possible to access the SharePoint Online Site Collection Recycle Bin? If there are, are there any samples to review as a template?
View ArticleProblem accessing localhost in powershell
I have two system that are identical. Both run windows 7 pro 64bit. I have a script that I run on both systems. It works on one system but not the other. The script is as follows:$ie = new-object...
View ArticleCannot find path .... because it does not exist. WHY??
Where am I failing guys??I have a directory named Learning Powershell [Do Whatever] in E:\, and when I try to change directory (cd) it pops up a error.I have just started to learn, so if you explain...
View ArticleSet-ADAccountPassword failing
Good morning People of the Powershell!My question isn't as simple as it sounds. To "pre-disable" users in our environment, we run a script which changes their password, removes their group...
View Article$ExecuteContext.InvokeCommand.ExpandString: different behavior in v4 over v2
In PowerShell v2 this would work just fine, but in PS v4 it throws an error "Object reference not set to an instance of an object." Well, color me confused because, yeah, it's a string, what with me...
View Article"Contains" question
Can anyone see what is wrong with the "-contains" logic below? I don't know if I have to somehow refer to an attribute of the $lineitem object or something else but any feedback would be great. The...
View ArticleIssue with variable while in a PSSession connected to an end point
Ok so Ive put together a simple script that will allow our helpdesk to look at permissions on a specified folder or share adn display in a nice html page. I need it to run under different credentials...
View ArticlePowershell Version
I have seen few PSP's are typed "host" for getting the Powershell Version but there is an issue if we are using "Enter-PSSession". We will not get expected result. See the output but there PS ver. is...
View ArticleString Comparison based on EXE output
I got the code below$URL = "http://content3.catalog.video.msn.com/e2/ds/3416835b-d0fc-412a-8de5-d2101ff48341.mp4" $wget = "C:\Program Files (x86)\GnuWin32\bin\wget.exe" $URLfilesize = &$wget -S...
View ArticleWhat permissions are needed on the client side for...
Hi.I am running a remote powershell command from an IIS application to an Exchange server getting the below error. Everything works fine if the IIS application pool identity is in the local...
View Articledon't copy duplicate files
Hello,i must copy files and i want use powershell. I want omit copy if the content of the file is the same (i want have 1 copy this file).i'm know that must use get-content but i don't know how omit...
View ArticleDelete DHCP reservations
Hi allI have identified a high number of dead DHCP reservations (300+) on my DHCP server from old printers and dead computers that are no longer used. I have a list of IPs (from different scopes) in a...
View ArticleExcel vba graph xvalue updating but not showing on the graph
I have a line graph in Excel with 4 sets of data for the lines and one set of data for the labels (months in this case (xvalues)). The data and months work fine. When I change to Weeks it also works...
View ArticlePowerShell Script to fetch Logon/Logoff user on particular server...
Hello, I'm looking for a script which can fetch for me a username that he/she loges in on all the servers.I have tried several scripts, but it doesn't fetch the information i'm looking for.Get-EventLog...
View Articlecopy and edit files
Hello, In directory i have 19 file txt. i must copy the files to other directory and shorten all files name to 10 characters (without extension) Files with the same name i should be added to the end...
View ArticleWhat are these Commands??
I wanted to know what these commands are? and what are they used for?.I have just started to learn PowerShell, so if you explain this to me in a simple language, it would be most appreciated. forfiles...
View ArticleUnpin from Task bar AFTER program is deleted
I have a situation where I am trying to use PowerShell to Unpin a shortcut from the task bar after the program has been deleted. The shortcut has been renamed (from the idiotic name Autodesk used to...
View ArticleBrowse log on remote computers
Hello, this might be a stupid question, but how do i get computername to the output together with value i search for?cat .\remotecomputers.txt | %{cat \\$_\c$\example.log | select-string -Pattern...
View Article