Quantcast
Channel: PowerShell
Browsing all 15370 articles
Browse latest View live

Powershell Commands Office 365

I am looking for a way that i can use Powershell to display all current active sessions that a user has. For instance, i want to be able to see that i am logged into my iPhone and my Laptop and my...

View Article


Rename-Computer Script Errors but works

Hi- Working on this script:TextPS C:\Windows\system32 $a = Import-Csv c:\users\TheDude\desktop\rename.csv -Header OldName, NewName Foreach ( $Server in $a ) {Rename-Computer -ComputerName...

View Article


Give a user access to multiple calendars Exchange Online Power Shell

Hi lads,I know how to grant Calendar permissions to a group. The line below will give everyone from the group access to a Calendar. add-MailboxFolderPermission -Identity USERID:\Calendar -User...

View Article

PowerShell script to replication of all Domain Controllers on all Sites

I'm look for a PowerShell script to forcereplication of all Domain Controllers on all Sites.I found the one below on the Internet but it doesn't seem to work. It runs and says "SynchAll Finished with...

View Article

How to prompt for credentials from script in MDT task sequence

Hi all I am trying to do a domain join in MDT, but don't want to put the password in the customsettings.in nor in the domain join script. I want the task sequence to prompt for the password. Normally I...

View Article


How to use the foreach loop in powershell?

This is a Auto print script i'm trying to make for gsuite. I use psgsuite module. The script saves all attachments that go to payables@domain.com to a network share. On the user computer a script then...

View Article

Image may be NSFW.
Clik here to view.

Reducing Office 365 Licenses With Powershell

Hello Spiceheads,I've made an employee termination powershell script that automates a great deal of our workflow for departing employees. I want to add more features to it, so I'm working on having the...

View Article

Image may be NSFW.
Clik here to view.

Reducing Office 365 Licenses With Powershell

Hello Spiceheads,I've made an employee termination powershell script that automates a great deal of our workflow for departing employees. I want to add more features to it, so I'm working on having the...

View Article


No PS-Remoting: "Test-WSman" works locally, but fails from any other machine

Hi everyone, I'm trying to setup a GPO to simply enable PS-Remoting but having trouble. When I run the PowerShell command `Test-WSman` it works locally, but fails from any other machine I...

View Article


adding 100 users using powershell (windows server 2012)

hi ive tryed to use this on windows server 2012 R2 Import-Module ActiveDirectory foreach($i in 1..100) { $AccountName = "Student{0}" -f $i $SecurePassword = "Password01" | ConvertTo-SecureString...

View Article

Import-Csv not handling blank fields on AD contact import

We are using a cloud GAL Sync solution that will sync users from multiple O365 tenants into each others GAL as contacts so all the orgs can have a single GAL. This works great for O365, but since this...

View Article

Clean up output of batch file

Hey guys i"m in the process of learning power shell. I've got this code to check the windows activation and it works fine. i have an input.txt with ip inputs and a output.txt to get the results. but...

View Article

need help yith output for GUI + runspaces

Hi,I'm working on a personnal project and try to learn about GUI and runspaces for multithreading purpose.I would like to run commands ( ping , os info, network info ...) for all computers in the...

View Article


Powershell list memebership of csv users

Hello everyone,I got a list of users in a CSV file (actives.csv) and I have to list the user and its AD memeberships in a csv output file.Text$actives = import-csv -path...

View Article

Powershell list group membership of csv users

Hello everyone,I got a list of users in a CSV file (actives.csv) and I have to list the user and its AD memeberships in a csv output file.Text$actives = import-csv -path...

View Article


FIrstname Surname

hi guys,I have been given a list of users from a legacy system (not AD username) and i have been asked to try and match as many users up as possible with their AD counterpart, i have made the following...

View Article

Connecting to Office365 using PS Function. Can't get cmdlets to work.

I'm trying to use the following function to connect to Office 365 and then run commands outside of the function. If I run the function outside of the function block it works fine, but I keep it in a...

View Article


Try and Catch not working

I am trying to run gpresults remotely. It works but only on one machine instead of the entire list that is in the txt file. Here is the codeTextFunction get-test(){ $Computers = get-content...

View Article

Entry to power shell class?

Hello I am looking for a entry level powershell class or book. I have used powershell and I can copy and paste scripts together but I’m looking to boost my knowledge. I am a new systems administrator...

View Article

Help with import-csv

Hello,I tried searching this, but due to the type of problem it seemed to be hard to word in order to find a current answer on this.I have always been able to import a csv file and then create a user...

View Article
Browsing all 15370 articles
Browse latest View live


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