Change part of text file and keep other content in the text file
I'm writing a script to edit out template .opt files. I need to edit a couple of things in the file but otherwise keep all the other content in the .opt file. The script I wrote will replace the...
View ArticleModify printer properties
I’m attempting to modify printer properties for all printers on a print server. The specific properties that I need to change are to disable the setting “Enable bidirectional support”, and disable the...
View ArticleExecuting a SQL query using Powershell
I hope this is the place to ask "super basic" newbie questions because I have one which may have to do with script placement of the following sql query:"USE DATABASENAMEGO IF...
View ArticleAuto export database/tables from Local Sql Server to Azure.
Hi, I'm new to powershell and currently we use a c# app on the local to export data from local to our azure db. I now want to explore other options for auto exporting and have pegged looking at...
View Articlead user export wont return all values of select-object
Hello,this is my code:$When = ((Get-Date).AddDays(-7)).DateGet-ADUser -Filter {whenCreated -ge $When} -Properties * whenCreated | Select-Object givenName, sn, SamAccountName, mail | Export-csv -path...
View ArticleHow to split one big text file into multiple files in powershell
Hello I have one big text file like this BIGFILE.TXT COLUMN1,COLUMN2,COLUMN3,COLUMN4,COLUMN5,COLUMN6,COLUMN7,COLUMN8 # HEADER 11/24/2013,50.67,51.22,50.67,51.12,17,0,FILE1...
View ArticleWhich machine or user AD accounts have received a particular group policy
I have created a new user group policy that that pushes a new wallpaper to machines if the user logs onto an XP machine only. Is there a way to get a list of all the accounts that the policy is being...
View ArticleHow to use PowerShell to Build Azure Storage Connection Strings
I needed to create a bunch of connection strings to use in my code. But this can be error prone and painful, especially if you have many data centers. In addition, you may decide to regenerate the...
View ArticleSetting up and using the Tintri PowerShell Toolkit
With the release of Tintri OS v3.0 the good folks at Tintri surprised us with a PowerShell Toolkit. The toolkit provides a nice list of cmdlets to get people started with automating tasks with VMstores...
View ArticleA Timely PowerShell Prompt
During the course of writing a few scripts that refresh a specific part of the console, such as the recent Read-Host alternative, I realized that flashing colors wasn’t always necessary. The fact that...
View ArticleNeed help with reading dynamic columns from csv file
Hello,I am trying to write a script which will accept dynamic columns. Currently, I am using a discrete number of columns specifying the element number. What I ultimately want is to be able to run the...
View Article[Help] Trying to get the host IP from web server
Ok, there are tons of ways to get IP addresses via Powershell:What I have is a web server that has several IP's assigned to it as it runs multiple sites. I want to get the actual IP address of the...
View ArticleChanging targetAddress and proxyAddresses
I'm turning to update the settings in targetAddress and proxyAddreses. But I am having for issues.Here is the code I have. I run without error but doesn't seem to do anything. I know this is only...
View Articlecompare information
I have a Machines.TXT file that has 1 machine per line. I need to find out if any of the systems in Machines.txt are in a specific OU within AD. I can get all of the machines from my target OU and...
View ArticleBrand New to PowerShell
Hi Everyone,I'm brand new to PowerShell and am looking for guidance/input for my very first script. I'm certain this will be child's play for most of you guys/girls, but will ask anyway. 1. I have a...
View ArticleGetting started with PowerShell and Azure
I am a big time supporter of PowerShell and automation when it comes to working with Azure. In the recent past, I have seen SQL Developer ask me – how I can start playing with PowerShell for Azure....
View ArticleSending email - by not using SMTP
Hello Guys, Find can find many script to send mail using powershell scripting, but all are using SMTP to send mail.In my environment, the SMTP server Port 25 is blocked, am not able to succesfully run...
View ArticleCtrl+C and a prompt
I have a PS script that runs to gather info on remote servers, I'd like to be able to pressCtrl+c and have a prompt "would you like to terminate (Y/N)?" and of course if you press "Y" then it...
View Article耐吉慢跑鞋 vfid ppxu gymg
ugg boots台灣專櫃台北撲通跌在地上,急忙爬起,那井裡竟有一死人!這裡太恐怖了,把王介嚇的夠嗆,月吟告訴 ugg 耐吉慢跑鞋澳洲 死神的難度比生化危機4要高的多,可那裡沒這麼恐怖! ugg 澳洲 拿著最後的一絲勇氣,又朝前行了一段距離,路旁不遠處的屋子的門開了,一老頭從門裡出來,見王介就喊了句: ugg 澳洲 是什麼人!王介看那老頭, ugg 澳洲...
View ArticleRevisiting Get-FileTimestamp with Reflection
Ever since I wrote my function to locate a file’s MFT (ChangeTime) timestamp, I wanted to take on an extra challenge by taking all of the C# code that included using pinvoke and rewrite it using...
View Article