How to get network with prefix for enabled interfaces?
Is there an easy way to get all the networks in which a server has interfaces?I can get IP addresses like this:$nics = Get-WmiObject Win32_NetworkAdapterConfiguration -Namespace "root\CIMV2" | Where {...
View ArticleHow does $(......) work?
Hello,Can someone plz explain and provide references to how $(....) works below and why we use it.$mycred = Get-Credential$CompName = Read-Host -Prompt "Enter Computer Name"Write-Debug "user name:...
View ArticleRemoving item by list
HI,i have file egz1.pdf, egz2.pdf, egz3.pdf, egz4.pdf and file list list.txt (where is egz2.pdf name), how make script open list.txt find name and search in folder and delete him. gc list.txt |% {gci...
View ArticleSpecifying multiple names in a windows feature using DSC
Hi,I'm playing around with Desired State Configuration and had a (simple?) question around it. All the example I have seen so far demonstrate on how to install IIS using DSC - well and good. Now, I...
View Articleoutputting a function to a file.
Hi Guys, I am new to scripting and I can't get my head around how to output a function to a text file.The function I have is to go away and get the external IP of a machine when a user logs in.Function...
View ArticleAzure AD Managment
Hi, I recently ran into the situation where we wanted to create multiple Azure AD's from a particular subscription. However, I quickly discovered there are no management options from within powershell....
View ArticleDelete Files older then X with Log
Hi all,I have found a lot about that topic but nothing was solving my Problem maybe you can help me. The Target of the script is to clean up a Public share drive with Files they are older then 2day's...
View ArticleUsing a lookup from one CSV file to another CSV file errors with a name clash
HiI have a master CSV file created by querying the AD. I need to populate the "Team" attribute by doing a lookup using Name against the Name Column any of 6 CSVs, someone has prepared for me . The...
View ArticleSearch & extract data from Excel for certain dates using powershell
Hello All,Actually, I am very new to powershell and I dont have much knowledge about it. My requirement is:I am working in MNC where we have to do shifts for 24/7. In our roster we have 3 shifts A,B...
View ArticleComplete data not getting returned when running IIS (v7.5) commands remotely.
Hello All,I searched quite a number of forums before posting and all that I have come to know is that some have mentioned it to be related to COM. I do not have experience dealing with COM and no idea...
View ArticlePowerShell: How to do AD LDAP queries from an stand alone machine?
Hello,I need to do LDAP query to an AD server from a standalone (not domain joined) machine. I have the user name and password for a domain member user available for the script.Is there any PowerShell...
View ArticleConfigure IE proxy settings based on IP address
Hi,I'm using a laptop with Windows 8.1. At home I use the wifi, at work I use a USB network adapter. I want to create a PowerShell script that will configure a few registry keys (IE proxy settings)...
View ArticleCreate System DSN with Powershell
Hello, I have created a script to create system DSN for a Teradata Server. However it creates a DSN with incorrect parameters.Following is my...
View Articlehow to get Time source DCs in domain
HI Friends,I got below script to checkout Time Source of domain controllers in my domain.But this script is appending the output file and instead of this I need to override to output file every time.Or...
View ArticlePowershell changes xml even if not asked to
Im reading an xml file into powershell xml variable. Originally I was modifying some values in the file, and saving it back out, but found the app that uses the file was discarding it as it found...
View ArticlePowershell confirm Drive
Hello,I am writing a powershell script to copy files. I do not want these files copied to a local disk or network share. They must be copied to a USB drive. We actually currently have people mistyping...
View ArticleHow do I search a spreadsheet for a list of URL's | then search those URL's...
Fist, I should mention I am not a programmer but am eagerly learning powershell!I am looking for an automated solution to accomplish what I am currently doing manually. I need a script that would...
View Articleupdate-hybridconfiguration Commandlet Fails
I ran the Update-hybridconfiguration commandlet in Exchange 2010 SP3 Management Shell and it fails with the following errorUpdating hybrid configuration failed with error...
View ArticleFind values from a multi-column array
Hi, I have an array $summary that has multiple columns and values. I am not sure what-typed of array it is. $summary = @() $summary += New-Object Psobject -property @{PID = "NY01"; DATE = (Get-Date...
View Articleget values from import-csv for loading
I capturing data from a csv file that has specfic attributes to the data and looking for best way to import that to SQL server table. The data appears like this in file:One row of data from the...
View Article