This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import vmware powershell modules | |
Get-Module *vm*|import-module | |
#Connect to vCenter | |
connect-viserver vcentername.thecloudwiki.com -ea silentlycontinue | |
#Get the VM details | |
$vm=(Get-View -ViewType "Virtualmachine" -Filter @{"Runtime.PowerState" ="poweredOn";"Config.GuestFullName"=".*windows*.*"}).name | |
$percentWarning = 15; | |
$percentWarning = 15; | |
$percentCritcal = 10; | |
$percent50 = 50; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module Active* | |
$userdata=get-content c:\temp\useraccounts.txt | |
foreach($user in $userdata) | |
{ | |
try | |
{ | |
$Disabled=(Get-ADUser -Identity $user).Enabled | |
if($Disabled -match "False") | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Helps in increasing the IP based on the input | |
$IP="10.1.2.3" | |
$split=$IP.Split(".",4) | Select -Index 3 | |
[int]$lastpart=$split | |
$ipnew=($ip.split(".",4)|select -index 0,1,2) -join "." | |
$add=$lastpart+25 | |
$ip25th=$IPnew +"." +$add | |
Write-Output "$ip25th" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.Synopsis | |
VM to User mapping Powershell Script | |
.Details required to run the script | |
1) Enter the Portal URL for $tenanturl | |
2) Enter the Domain Name for $Domain | |
3) Change the Path of CSV file in $csvfile | |
4) Enter Credentials information in $ADCredentials section which need below inputs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.Synopsis | |
find the clusters are not in ready state | |
.Note | |
Copy the vcenter names into a text file named "vcenter" and place it into C:\temp before executing the script | |
#> | |
Get-Module -listavailable *vm*|Import-Module | |
Get-Module -listavailable *nsx*|Import-Module | |
$cred=Get-Credential | |
$redColor = "#FF0000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.Synopsis | |
Unassign all users mappings from a specific pool | |
.Details required to run the script | |
1) Enter the Portal URL for $tenanturl | |
2) Enter Credentials information in $ADCredentials section which need below inputs | |
3) You will get a prompt to input pool id of the vm's | |
.Limitations |
OlderNewer